How to use a sequence instead of a sequence item in the register adpater?

I am using the UVM-REG API for modeling my DUT registers. We have an internal bus which we have the register adapter implemented for, and it’s working fine.

We can also access our registers via JTAG, and I want to use the UVM-REG API to access via JTAG. I am planning to create another address map with the same blocks (I think this is the correct approach) for access via JTAG.

To do this I need to create a new register adapter to convert generic reads/writes to a sequence that I run on my JTAG agent. It seems the normal register adapter is expecting to work on a sequence item, not a sequence.

How should this be handled?
Am I approaching this correctly?

Thanks
Doug

I am trying to do something similar. This either needs uvm_reg_adpater:reg2bus() to translate from register operations to a sequence instead of a sequence item (as Doug mentioned) or provide an ability to return an array of sequence items from reg2bus(), which can be run sequentially on the protocol agent.

Kindly let me know if this can be approached any other way.

If you have an agent driving the JTAG interface, then surely you are using sequence items for that and you will need to write a register adapter to convert generic register items into JTAG agent sequence items and hook it up in the same way as you did for the bus interface.

If this is not the way things work in your case, then it sounds like you need to put a sequence layering in place so that the adapter does a conversion to an intermediate sequence item type that you can then a “driver” interface to get_next_item() into a layering sequence which is started on the JTAG sequencer.

See:

https://verificationacademy.com/cookbook/Sequences/Layering

In reply to mperyer:

I ended up taking the layering approach. The basic register adapter would not work because a single register access requires many individual JTAG transactions (sequence items).