-
Notifications
You must be signed in to change notification settings - Fork 428
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
IRQ arrive on the last instruction of HW loop #107
Comments
Thanks a lot Itay! I will try to reproduce it and fix it as soon as possible, this issue has the top priority to me |
Hello, can you please send me the piece of assembly that you used? or the binary of the HW loop part so that I can replicate it? I need to replicate the bug with the same compressed instructions that you are using. Thanks |
I confirm it is a bug, can you please check with this fix? |
the fix for #148 fixes this issue also |
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 <notifications@github.com>
Sent: Tuesday, November 12, 2019 10:17:32 AM
To: pulp-platform/riscv <riscv@noreply.github.com>
Cc: Yaron Bercovitz <Yaron.Bercovitz@dspg.com>; Mention <mention@noreply.github.com>
Subject: [EXT]Re: [pulp-platform/riscv] IRQ arrive on the last instruction of HW loop (#107)
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<#107>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AL6XB2FUKIYXF7E4WJJOV3DQTJRBZANCNFSM4IJER3BA>.
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.
_____________________________________________________________________
|
In the waveform we can see next coincidence: hardware loop #1 is enabled, number of iterations is 6, the pointer to the last instruction in the loop is 0x8000_065E.
Instruction in the pointer 0x8000_065C executed normally, but before execution of instruction in pointer 0x8000_065E, interrupt arrived.
After exiting from interrupt processing function CPU finished loop iteration and moved to pointer 0x8000_064C. (pointer 0x8000_065C is the beginning of the loop).
Screenshot of waveform:
So we can conclude that last instruction in the loop was interrupted by IRQ processing and after it not executed.
To perform jump in hardware loop execution next signal is used: hwlp_jump_o of the riscv_hwloop_controller module.
This signal takes into account account next PC after execution of current instruction and if next PC is equal to HW loop end address hwlp_jump_o becomes 1.
In the next wavefrom we can see that hwlp_jump_o is active on ID stage of 0x8000_064C instruction.
Next time signal hwlp_jump_o was active for a short time during mret instruction execution.
It looks like design mixed up execution of mret with the last instruction in the loop.
The text was updated successfully, but these errors were encountered: