Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class our_sequence extends uvm_sequence;
- `uvm_component_utils(our_sequence)
- our_packet pkt; //instantiated the packet class
- function new(string name="our_sequence");
- super.new(name);
- endfunction
- task body();
- pkt = our_packet :: type_id ::create ("our_packet"); //created memory, i.e. object for packet
- repeat(10)
- begin
- start_item(pkt); //to start generating stimulus from tha sequence(packet) class pkt
- pkt.randomize(); //will assign random values to variables having rand keyword
- finish_itrm(pkt); //to stop generating the stimulus
- end
- endtask
- endclass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement