In reply to dave_59:
Hi Dave,
I'm currently trying to do the same that this post is asking - accessing random register address where the register does not exist as part of an error test. However, I'm not too sure where the pseudo that you've provided should go?
I'm guessing I will need to add a new register into the Register Model (let's call it random_address_reg), and put the pseudo code you've provided in the RAL Adapter reg2bus() method? So that whenever random_address_reg is accessed, I then randomise the address and replace the rw.address with the randomised address?
So instead of having:
apb.addr = rw.addr;
I should do:
apb.addr = address;
Not sure if this is what you meant but I would be grateful if you could clarify further please?
Also, in this case, the randomised address will be used in the bus2reg() method and since there is no register at this address in the Register Model, would the Register Model give any errors or would it just ignore the data?
Kind regards,
Po