Do we need separate register UVM adapter & predictor to attack different register sub-blocks within a register top-level block parallely?

Hello Folks,

Need a clarification while using multiple agents attacking separate sub-blocks within a top level block.

a. I have a top level register block and which internally has multiple sub-blocks.
b. And each sub-blocks can work parallelly, so planned to use separate agents attacking them for verifying their operations.
c. If I wanted to do register write/read process to all the sub-blocks parallelly, do I need to define separate adapters? which takes care of bus2reg and reg2bus of each blocks separately ? OR is there any better approach ??

Please share your through process !! Thanks in adv !!
Desperado !!

In reply to desperadorocks:

If I understand your question correctly you want to access registers through different agents (or interfaces). What you need is to define a uvm_reg_map for each of these agents to the register. So for instance if you want to write to a register in your RAL:

my_ral.my_block.my_register.write(.status(status_e), .value(data), .map(my_map1));

This will run that sequence on the RAL adapter for the map. You also need to set the sequencer for your RAL map in the connect phase of your environment. Here is a code snippet:

ral.my_map1.set_sequencer(.sequencer(my_agent1.seqr), .adapter(my_agent1.ral_adptr));
ral.my_map2.set_sequencer(.sequencer(my_agent2.seqr), .adapter(my_agent2.ral_adptr));

The RAL write will call the reg2bus method of the adapter that is assigned to the map. If no map is passed to the write method then the default map will be used.

Bottom line is that if you want to perform RAL accesses over multiple agents, each agent needs a RAL adapter and an independent uvm_reg_map to the register block. I think the main reason this is needed is because each agent could have different base addresses (which is set in the uvm_map) to the same register block. It gets even hairier when you have multiple layers of register block hierarchy.

Hope this answers your question.