-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instruction corrupted on return from interrupt to last instruciton of HW loop #148
Comments
Can be disregarded, duplicated issue, see 107 |
might be separate bug |
might be separate bug |
Can you please check again if this test passes with this fix? |
after applying the fix we have found the following issue: Here we can see active HW loop #1 with start address 0x80000424 and end address 0x80000582. If we analyze instruction that ri5cy tried to execute with PC 0x80000582, we can see that it differs from instruction in the firmware and composed from parts of instruction at the beginning and end of the loop body. Data on the firmware : for DSPG internal: To open simulation results use next command: |
On top of all the other changes I made for this bug, can you also add this one: please? thanks |
fix seems OK |
Ok then I wait for #158 before merging to master |
Fixed by f19f072 |
The solution proposed contains a combinational loop, I will merge to master once I get feedback from your functional verification and sorry for inconvenience |
Is also this one fixed? @yaronbe1 |
Yes
…________________________________
From: Pasquale Davide Schiavone <[email protected]>
Sent: Tuesday, November 12, 2019 10:16:50 AM
To: pulp-platform/riscv <[email protected]>
Cc: Yaron Bercovitz <[email protected]>; Mention <[email protected]>
Subject: [EXT]Re: [pulp-platform/riscv] Instruction corrupted on return from interrupt to last instruciton of HW loop (#148)
External Email - Use caution when responding, clicking and/or downloading attachments.
Is also this one fixed? @yaronbe1<https://github.com/yaronbe1>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#148>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AL6XB2FDORXQIANRVD3WRMTQTJQ7FANCNFSM4IT25BUA>.
DSP Group, Inc. automatically scans all emails and attachments using MessageLabs Email Security System.
______________________________________________________________________
DSP Group, Inc. automatically scans all emails and attachments using MessageLabs Email Security System.
_____________________________________________________________________
|
Issue happen when ri5cy tried to execute instruction with PC 0x800002fa. Instruction is 0x03f699b3. Decoded instruction is "mulh s3,a3,t6".
This instruction is the last instruction of the HW loop #0. We can see in the waveform signal "hwlp_end[0]" is set to 0x800002fa.
We can also conclude that IRQ interrupted execution of this instruction because MEPC register set to 0x800002fa.
We expect to see after execution of mret instruction (end of interrupt handling procedure), execution of instruction with PC 0x800002fa and jump to the start of the HW loop #0.
In the waveform we see that instruction 0x8C0199B3 was executed instead of 0x03f699b3 as it described in the firmware.
Instruction 0x8C0199B3 was decoded as illegal instruction by ri5cy.
Here is path of the firmware with lines describing loop #0:
80000264: 8c01 sub s0,s0,s0
...
800002fa: 03f699b3 mulh s3,a3,t6
From this lines we can conclude that ilegal instruction 0x8C0199B3 that ri5cy tried to execute is concatenation of 2 instructions located at the beginning of the loop and at the end of the loop.
The text was updated successfully, but these errors were encountered: