I have registers instantiated in a Register block Regblock
as such:
DUT.Regblock.Register1
DUT.Regblock.RegisterA
DUT.Regblock.RegisterABC
...
All these registers have the same inner structure. I would like to simulate the effects of bit flips in these registers.
//Here an attempt to do bit flips
bitFlipLocation = $random;
force DUT.RegBlock.Register1.reg[bitFlipLocation] = ~DUT.RegBlock.Register1.reg[bitFlipLocation];
release DUT.ABCStar1.RegBlock.Register1.reg[bitFlipLocation];
Is there a way to create a loop over all DUT.Regblock.Register1, RegisterA, RegisterABC, ...
inside RegBlock
and create these bit flips?