Is it really necessary to zero out all registers at reset? #57
-
Current reset flow includes 5 nops (clear pipeline) and then reset all registers. This is a good practice (in general, deterministic state is much healthier), but it has an overhead of 15/31 instructions (i vs. e). If that's too much, I believe it's a reasonable to expect software not to read uninitialized registers/memory (and if it does happen, it's a software bug). It can be improved by zeroing only untouched registers, but it will make the entry point code slightly more complicated (because changes might leave leave uninitialized registers). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I agree to reset all register is not really necessary for correct functionality. After we are done enabling all the features and we want to start reducing the Assembly as much as possible - we might remove the "reset" sequence. |
Beta Was this translation helpful? Give feedback.
I agree to reset all register is not really necessary for correct functionality.
But in this stage of the project, when we want to "debug" the behavior of CORE registers having 0 as the register Value and not 'X' can ease the debug. especially if we want to "freeze and dump" the register content.. (getting random values can be more confusing than helpful)
After we are done enabling all the features and we want to start reducing the Assembly as much as possible - we might remove the "reset" sequence.