CFS Interrupt Enable in mis or mie CSR #740
-
Based on the most updated Data sheet, it seems that
However, I don’t seem to find mis CSR only the mie CSR, is it a typo? In addition, (1) While the address of mie (0x304), mip (0x344), the size corresponding to those two CSRs on vhdl neorv32_package seems to be only 12 bits, while the assumed size is 32 bits, what’s the purpose behind this? (2) I just want to confirm that we first need to manually set its corresponding bit in mie to 1 before we set cfs_irq to 1; additionally after triggering the cfs_irq, we need to clear it manually by set its corresponding bit in mip to 0. (3) As for the process of (interpreting address allocation during bootloader file upload) : If I upload (using uart) a simple hello_world_exe.bin at 0x00, since uart0 put bytes by bytes at 0x00, does it actually imply the exact 0x304 byte position on that binary file I just uploaded should be the content of mie? (4) Follow up (3), if file uploaded at 0x00 is a zephyr file while I boot from 0x20000, generally speaking will neorv32 recognize mie at (0x304)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey there!
Yes, this is a typo 🙈 I just fixed that: f82b211
What do you mean by "size"? Both CSRs are 32 bits wide but not all of these bits are actually used so they're hardwired to zero.
That's right. Each bit in
I think there is just a misunderstanding 😉 Memory addresses and CSR (= control and status register) addresses are two separate things. The CSRs are mapped to a "private" 12-bit address space right inside of the CPU core that is only accessible via special CSR instructions. These registers are not memory-mapped and cannot be accessed using load/store operations. |
Beta Was this translation helpful? Give feedback.
You're welcome!
The VHDL code describes the digital circuit behind the CSRs on which the actual application software (C) is based upon. RISC-V defines special instructions to read/write/clear/set those CSRs. The NEORV32 software framework provides some simplified wrappers functions for this that are defined in
sw/lib/include/neorv32_cpu.h
. Here are some quick links to the Doxygen documentation of those functions:…