Skip to content

address2register return out of range register index when PLIC base address is not 0x0 #8

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

Open
Elie1968 opened this issue Jul 6, 2020 · 0 comments

Comments

@Elie1968
Copy link

Elie1968 commented Jul 6, 2020

Hello

Function address2register (L. 269) in file plic/rtl/verilog/core/plic_dynamic_registers.sv return out of range index when base address of PLIC is not 0.
It should compute register index from the lower bits of the address only.
The number of bits to take into account depends on the allocatted space for the PLIC in the system memory map.
For example it it 4Kb [bits 11 to 0) on the APB bus protocols for each peripheral.

svn diff plic_dynamic_registers.sv
Index: plic_dynamic_registers.sv
===================================================================
--- plic_dynamic_registers.sv (revision 1522)
+++ plic_dynamic_registers.sv (working copy)
@@ -270,7 +270,7 @@
//Translate 'address' into register number
input [ADDR_SIZE-1:0] address;

- return address / DATA_BYTES;
+ return address[7:0] / DATA_BYTES;
endfunction : address2register

Regards
Jean-Marc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant