Hi, I have an requirement where I need thoughts to handle a situation.
Requirement;
I have 1 register block called A. Under block A there are group of registers. Reg1, Reg2, …
In the design there are 2 interfaces. AHB and SPI.
Now to access register under block A (A.Reg1) from AHB and SPI has different offsets. Base addresses are different. Register can be accessed from both interfaces with different offsets. As there is only 1 physical address in RTL with different offsets would like to have UVM RAL model same way. In the DV we have 2 adapter, SPI, AHB with Reg block A instantiated. I do not want two different Reg block with offset hard-coded.
For an example in the RTL if from AHB adaptor we have a top_reg_blk.Reg1.write(status, 32’hbabacafe), same value can be read from SPI top_reg_blk.Reg1.read(). Mirror value from both of interface should be same.
This is an often situation when multiple interfaces have an access to dut regs with different offsets seen from them.
How we can implement this through RAL? Somewhere I read we need to create 2 different maps for such cases. Need example code with more details.
P.S. Ignore raise condition user will take care of accessing them together.