-
Hi Stephan, Sorry for bothering you as I'm sure you're busy 😅. Is there a reason why the DMEM module doesn't have a global reset? I am running multiple individual fault injection experiments in a single batch and rely on the global reset input signal to reset the Neorv32 core back to a default state so each fault injection experiment doesn't influence the next one. I have noticed that unless I re-cycle power to the FPGA between experiments, I can see different datasets from Neorv32. I am just thinking that as I inject faults during the boot code (e.g. <500 cycles), the stack etc in DMEM might not be setup correctly and the core won't function correctly anymore, so without powering down or resetting DMEM, this could be the culprit of my problem I ma experiencing! Also are there any other modules that store state between global reset inside the Neorv32 RTL? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Hey @DS-567!
The processor's instruction and data memories (as well as all other memories like caches) were designed for optimal FPGA utilization. Hence, they are described in a way that the synthesizer can map them to FPGA blockRAM. Unfortunately, blockRAM does not provide a full hardware reset (by the way, no "main memory" provides a real reset - think of the computer's RAM chips or even the HDD). The blockRAM of a FPGA is highly optimized in terms of their elementary flip flops. Adding a dedicated reset to each flip flop would require additional chip area (and would increase power consumption). I guess this might be the reason why absolutely no FPGA vendor has implemented something like this (so far?).
Very good question! All memories of the NEORV32 that implement "large" and "flat"/RAM-like read/write data storage are described in a way so they can be mapped to blockRAM in order to optimize FPGA utilization, timing and energy consumption. Hence, these memories do not have a reset capability. Right now, the following modules are mapped to blockRAM and do not have a dedicated reset:
|
Beta Was this translation helpful? Give feedback.
-
I would not rely on synthesis tools initialize BRAMs with zero as this is very technology dependent. There are even FPGA-architectures which BRAMs can't be initialized with user data at all by a FW-file. For these FPGAs (mostly flash based) you have to load the BRAM data from other memories in or outside the FPGA. |
Beta Was this translation helpful? Give feedback.
That's right.
Just a note: when you (re-)upload the bitstream all the block RAMs (and so IMEM + DMEM as well) will get initialized with all zeros - at least that is default config for most FPGA toolchains.
Yeah, these are the caches. But you can ignore them if they are not explicitly enabled via the according generics.