How to get a UVM sequence/agent to generate random triggers on multiple lines independently

Hello,

I have a very silly problem and I hope it can be easily fixed with UVM.

Basicaly my module has a series of triggers, this triggers are grouped in a logic vector, each bit being a trigger line.
Since I am very new to UVM i though I would try to build an agent/sequence to generate this random triggers. I am aware it could be done very easily using RTL or even just normal tasks, but I though I would start easy by packing it into an agent.

A trigger event is basicaly when one of the trigger lines goes up for one cycle. In my testbench I want to constraint the minimum and maximum time that can pass between pulses in a trigger line, however, I want each trigger line to be independent to each other. So my sequence item could look as simple as this:


class trigger_item extends uvm_sequence_item;
    ...
    rand time DeltaTime;
    constraint delta_time {
      DeltaTime inside {[min:max]};
    };
    ...
endclass

I would like to have an agent with multiple driver objects (or a single driver object that can handle all lines).
Then what I need is a way for the agent/driver to distinguish which item is for each trigger_line. Let’s say I put a field in the trigger_item object with the trigger_line index, but still if all the items go through the same port how will each driver know if the object in the queue is for them before taking it out by seq_item_port.get_nest_item(…) ?
I have been searching for a method to have drivers/agents with multiple item ports but found nothing… Perhaps the sequencer could somehow distribute the different triggerItems to the different drivers?

I would like to know what is the best (and specially the cleanest) way to approach this. I have gotten it to work with a single agent/sequence for each trigger_line but the code looks awfull.

Thanks,
Albert.

In reply to arquer:

To be honest I’m not sure if I got your point. Let me ask back.
You have a certain number of ports you want to trigger/stimulate with 1’b0 and 1’b1 randomly generated. Do you want to stimualte all ports at the same time or do you want to trigger 1 bit and a certain time later the next one and so on?
Or should be the distance between each trigger word be of random size, triggering all ports at the same time?