View Full Version : Virtual Subsequences
Navnit
06-16-2008, 12:10 AM
Hi,
I've a basic doubt that, how to call a virtual subsequence to virtual sequencer.
In my case all the virtual subsequences need to be randomize with different constraints then call it into one of the many virtual sequences.
I've referred "OVM for systemVerilog User Guide 6.2" page no. 2-43, but i'm not clear.
Could you plz explain me with basic example.
Regards
Navnit
umery
06-16-2008, 04:40 AM
Hi Navnit,
If I understand your question correctly, you have a virtual sequencer that has a bunch of virtual sequences defined for it. These virtual sequences randomize and call sequences for non-virtual or driver sequencers. Page 2-43 of the user guide shows an example of this scenario:
class simple_virt_seq extends ovm_sequence;
`ovm_sequence_utils(simple_virt_seq, virtual_sequencer)
function new(string name=simple_virt_seq);
super.new(name);
endfunction
// A sequence from the CPU sequencer library
cpu_config_seq conf_seq;
// A sequence from the Ethernet subsequencer library
eth_large_payload_seq frame_seq;
// A virtual sequence from this sequencer’s library
random_traffic_virt_seq rand_virt_seq;
virtual task body();
// Invoke a sequence in the CPU subsequencer.
‘ovm_do_seq(conf_seq, p_sequencer.seq_cons_if[“cpuâ€])
// Invoke a sequence in the Ethernet subsequencer.
‘ovm_do_seq(frame_seq, p_sequencer.seq_cons_if[“ethâ€])
// Invoke another virtual sequence in this sequencer.
‘ovm_do(rand_virt_seq)
endtask : body
endclass : simple_virt_seq
conf_seq and frame_seq are class handles for driver sequences, i.e., defined on cpu and ethernet sequencers. rand_virt_seq is a handle to another virtual sequence that could do some random traffic generation on some interfaces using driver sequences. In this case all three sequences are randomized "without" additional inline constraints. If you want to inline constraints for sub-sequences on driver sequences, you could use the following variants of the `do macros:
`ovm_do_seq_with(variable, seq_cons_if, {constraint-block} )
`ovm_do_seq_with (frame_seq, p_sequencer.seq_cons_if[“ethâ€], {frame_errors==FALSE} )
To randomize another virtual sequence with inline constraints, you can use the `ovm_do_with macro.
If I didn't understand your question, please elaborate on what you are trying to do :)
Thanks,
Umer
Navnit
06-17-2008, 05:35 AM
Thanks Umer. I understood.
Powered by vBulletin™ Version 4.0.3 Copyright © 2010 vBulletin Solutions, Inc. All rights reserved.