How do you assign different sequencers to different reg_map?

Hi

I’m currently having this problem where I’m trying to have different UVM Agent driving registers in the DUT via the same Register Model.

My Register Model structure is:-

  1. There is a top_reg_block. This top_reg_block has two other reg_block within its hierarchy (agent1_reg_block and agent2_reg_block).
  2. agent1_reg_block and agent2_reg_block contain some registers.
  3. There are two UVM Agent in my testbench (Agent1 and Agent2) in which I intend to use Agent1 to drive the registers under agent1_reg_block and Agent2 to drive the registers under agent2_reg_block.
  4. agent1_reg_block has an agent1_reg_map and agent2_reg_block has an agent2_reg_map. These maps contain the register address of registers in its corresponding reg_block.
  5. top_reg_block has a top_reg_map which is linked to agent1_reg_map and agent2_reg_map so that this top_reg_map contains the register address both Agents is driving.
  6. I have set: my_predictor.map = register_model.top_reg_map;
  7. I have set: register_model.agent1_reg_block.agent1_reg_map.set_sequencer(agent1_sequencer, my_adapter); (THIS DOESN’T WORK)
  8. I have set: register_model.agent2_reg_block.agent2_reg_map.set_sequencer(agent2_sequencer, my_adapter); (THIS DOESN’T WORK)
  9. Register Model set to do explicit predicting e.g. register_model.top_reg_map.auto_predict(0);
  10. In my sequence class, I’ve got 2 write operation for each Agent:
    register_model.agent1_reg_block.reg1.write(status, value, UVM_FRONTDOOR, .map(register_model.agent1_reg_block.agent1_reg_map), .parent(this)); - to write to reg1 via Agent1 and
    register_model.agent2_reg_block.reg2.write(status, value, UVM_FRONTDOOR, .map(register_model.agent2_reg_block.agent2_reg_map), .parent(this)); - to write to reg2 via Agent 2. (THIS DOESN’T WORK)

The above structure gave me this error: “UVM_FATAL: [SEQ] neither the item’s sequencer nor dedicated sequencer has been supplied to start item in seq”

I have tried various different method to achieve what I ultimately intend to do which is to drive DUT registers using multiple UVM Agents but it seems like I have to set the top_reg_map to a sequencer for everything to work and simulate. However, setting top_reg_map to an Agent sequencer would have the registers under both agent1_reg_block and agent2_reg_block driven by the same UVM Agent. Ultimately I’d like to have different reg_map under the same reg_block to be assigned to different UVM Agent sequencer.

Another approach is that I separate the reg_maps that each UVM Agent will drive and have it on the top level e.g. top_reg_block now has agent1_reg_map and agent2_reg_map. In this case I can assign the UVM Agent sequencer separately to those two reg_maps, however, using this approach there won’t be a top_level_map that contains the register address for all reg_maps that will be used by my_predictor (explicit) as they are now all separated e.g. agent1_reg_map won’t have the register address of agent2_reg_map. I am struggling to find an approach that will work.

Could someone tell me the best way to structure the Register Model in this case and how it would work please.