28 lines
872 B
Systemverilog
28 lines
872 B
Systemverilog
|
|
`ifndef CALC_SIMPLE_SEQ_SV
|
||
|
|
`define CALC_SIMPLE_SEQ_SV
|
||
|
|
|
||
|
|
//-----------------------------------------------------------------------------
|
||
|
|
// Default random sequence: send a configurable number of fully random,
|
||
|
|
// legal+illegal transactions to random ports.
|
||
|
|
//-----------------------------------------------------------------------------
|
||
|
|
class calc_simple_seq extends calc_base_seq;
|
||
|
|
|
||
|
|
`uvm_object_utils (calc_simple_seq)
|
||
|
|
|
||
|
|
rand int unsigned num_of_tr = 10; // default when the sequence is not randomized
|
||
|
|
constraint c_num { num_of_tr inside {[1:20]}; }
|
||
|
|
|
||
|
|
function new(string name = "calc_simple_seq");
|
||
|
|
super.new(name);
|
||
|
|
endfunction
|
||
|
|
|
||
|
|
virtual task body();
|
||
|
|
`uvm_info(get_type_name(), $sformatf("Generating %0d random transactions", num_of_tr), UVM_LOW)
|
||
|
|
repeat (num_of_tr)
|
||
|
|
`uvm_do(req)
|
||
|
|
endtask : body
|
||
|
|
|
||
|
|
endclass : calc_simple_seq
|
||
|
|
|
||
|
|
`endif
|