PDA

View Full Version : configuring DUT using a sequence



rocker
02-14-2008, 09:56 AM
Hi Forum,
How do I control the order in which sequences are executed? Example I want to create a sequence that configures the DUT and after this sequence completes, another sequence is started to send traffic to the DUT.
How do I synchronize these two?

kurts
02-14-2008, 10:13 PM
Probably the easiest way to do this is to create a third sequence that calls the other two sequences in series:

class parent_sequence extends ovm_sequence;
`ovm_sequence_utils(parent_sequence, some_sequencer)

config_sequence first;
traffic_sequence second;

task body();
`ovm_do(first)
`ovm_do(second)
endtask

endclass

-Kurt

gordon
02-20-2008, 07:42 AM
Hi Forum,
How do I control the order in which sequences are executed? Example I want to create a sequence that configures the DUT and after this sequence completes, another sequence is started to send traffic to the DUT.
How do I synchronize these two?

Another useful tool to solve this kind of problem is ovm_barrier, which enables the logic of a large-scale fork...join_all construct across multiple threads or sequences. You can declare a global barrier to represent the 'dut is configured' point, have single or multiple threads executing sequences as a prerequisite to that barrier being lifted, and other threads or sequence drivers which are awaiting it before they proceed with their traffic. You can have as many such 'pinch points' as you need, to bracket parts of your high-level intent, each one referenced by name from any thread.
It may not cover all such situations but may be useful to you. There's an example of ovm_barrier already on the forum (http://www.ovmworld.org/forums/showthread.php?t=60).