-
Notifications
You must be signed in to change notification settings - Fork 25
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
[BUG] Update interrupt vector table description #268
Comments
MAYBE: comparing cve2_if_stage.sv with ibex_if_stage.sv it seems that the CVE2 starts boot_addr_i and not at boot_addr_i+0x80. looking further it seems that the old ibex has 32 irq, or 32 addresses in the IRQ vector table whereas the CVE2 seems to have 64 "IRQS": 32 dedicated to actual IRQ and other 32 for exc, right? so we can say that IRQ[0] is actually the boot address. correct? |
If you are ok with that I could create a PR that updates the documentation |
yes that would be very welcome :) |
Noice, but do you think that the intuition is correct?
|
yes it has been done here: be70b26 |
so combining page 43 of Volume 2, Privileged Specification version 20240411 and [cve2 repo e.g. cve2_pkg, cve2_controller]:( Line 299 in 42f76f4
so the vector interrupt table is as follows ( the addresses are indicated as word offset from the
so the vector table starts at boot_addr and arrives till 0x7C (included) |
can you please confirm? |
a wait, the exception are also "multiplexed" on this vector table, right? |
I am not so sure because I can see some overlapping in the
|
interrupts are not related to the boot address, when an interrupt occurs you jump to the address pointed by the mtvec CSR https://github.com/openhwgroup/cve2/blob/main/rtl/cve2_if_stage.sv#L124C23-L124C29 |
but Line 502 in 42f76f4
|
only at reset state, so you can imagine the boot_address being the reset value of the mtvec, the reason that is not the reset value itself is that you do not want to reset a flip flop with a NON CONSTANT (as boot address is an input signal) value |
very right, thanks. You have entries in the vector interrupt table that mix exceptions and interrupts? |
I think I made a mistake: so the vector table starts at boot_addr and arrives till 0x80 (included) |
Something like this #273 ? |
#273 seems indeed correct, but you modifed the RTL of the controller - can you pls revert it back? thanks @DanieleParravicini-Synthara |
Sure, my bad apologies |
Hello @davideschiavone, I fixed a typo and added a new line of comments on cve2_controller.sv. |
I am not sure I understand correctly, so apologies if I don't get it right. Line 125 in cd43ee5
is used only for IRQs. If an exception happens it gets stored in Line 589 in cd43ee5
depending on debug_mode_q Line 592 in cd43ee5
exc_pc_mux_o is set to a value that then results in one of the following two: Line 124 in cd43ee5
Line 127 in cd43ee5
This reflects So, #273 is wrong and
exception handler . Correct?
|
Bug Description
The CVE2 documentation read online at ReadTheDocs at cve2-user-manual/en/latest/internal says that CVE2 should start at [boot_addr_i + 0x80] (https://docs.openhwgroup.org/projects/cve2-user-manual/en/latest/02_user/integration.html#interfaces) but I do not find any information on the interrupt vector table.
We tried to use a vector table that was compatible with this other version of Ibex and used its documentation on ReadTheDocs.
But it does not work,
As you can see boot_addr_i is set to 0x80000, and the crush_dump_o.current_pc and crush_dump_o.next_pc goes to 0x80000, then to 0x80004, and then 0x800a6 and not to 0x80000+0x80 as indicated in (https://docs.openhwgroup.org/projects/cve2-user-manual/en/latest/02_user/integration.html#interfaces).
Where can I find more information on the interrupt vector table description?
If you are ok we could submit a PR to fix the simple-system firmware to reflect the change.
The text was updated successfully, but these errors were encountered: