[chip,dv] How should the chip-level csr_rw tests understand regwen signals?
While trying to connect rom_ctrl to KMAC in #6373, I've stumbled into (yet) another problem. The chip-level csr_rw test is writing to KMAC's entropy_seed_lower register and then trying to read it back. Unfortunately, this is at the same time as rom_ctrl is using KMAC to do some processing.
This means that the write-enable signal for KMAC's registers is false. The result is that the write seems to go through, but has no effect. When we happen to read that register back a little later, we get the reset value instead of the value we were expecting, failing the test.
Presumably chip-level tests haven't seen this before because nothing was ever causing the write enable signal to be false on any blocks.
Approaches I can see to fix things:
- Disable all CSR tests for KMAC at chip level.
- Snoop on the write-enable signal somehow and factor that in to our calculation about whether a write should have any effect.
- Change the design to fail a bus transaction that writes when a write-enable is false.
- ... something else?
@sriyerg, @udinator, @cindychip, @weicaiyang: Any ideas?
At the moment, this is blocking rom_ctrl integration, so it's kind of urgent.
Is entropy_seed_lower the only register that will cause this trouble? If so, maybe we can exclude writing this register?
If a regwen is HW-controlled, the test has no way of predicting events that will cause it to trigger. If it is SW-controlled, then the our UVM reg extensions handle it.
The main question here is what's causing the ROM ctrl to use KMAC for processing? Is it the initial ROM checker kicking into action? If yes, then we should either:
- Wait until ROM checker is complete before starting the CSR test
- If its some previous write to a ROM ctrl CSR that triggered a repeat KMAC operation, then exclude that bit from writes
- Force the
kmac_cmd_ooutput of the ROM ctrl to 0 for the sake of this test (I dont prefer this).
The CSR tests are relatively dumb - their purpose is to only test whether the SW interface is solid. Any writes that cause side effects resulting in other CSRs being updated (or put the HW in state where the test cannot reliably complete successfully), those fields need to be excluded.
I think we should either prevent the ROM from triggering a KMAC operation in the chip level automation tests (if possible), or try to wait until the ROM has finished using KMAC to access KMAC registers.
You're right, this KMAC operation is triggered by rom_ctrl at start-up. I don't think that you'll be able to stop rom_ctrl from starting a KMAC operation without lots of hacky forced signals. Let's try postponing the csr_rw tests until it's done.
I've just amended #6373 to wait as discussed. Let's close this issue once that's merged and seems to be working.
Can this issue be closed now?
Yes! Sorry for forgetting it.