init
This commit is contained in:
30
code/vezba9/verif/Sequences/calc_base_seq.sv
Normal file
30
code/vezba9/verif/Sequences/calc_base_seq.sv
Normal file
@@ -0,0 +1,30 @@
|
||||
`ifndef CALC_BASE_SEQ_SV
|
||||
`define CALC_BASE_SEQ_SV
|
||||
|
||||
class calc_base_seq extends uvm_sequence#(calc_seq_item);
|
||||
|
||||
`uvm_object_utils(calc_base_seq)
|
||||
`uvm_declare_p_sequencer(calc_sequencer)
|
||||
|
||||
function new(string name = "calc_base_seq");
|
||||
super.new(name);
|
||||
endfunction
|
||||
|
||||
// objections are raised in pre_body
|
||||
virtual task pre_body();
|
||||
uvm_phase phase = get_starting_phase();
|
||||
if (phase != null)
|
||||
phase.raise_objection(this, {"Running sequence '", get_full_name(), "'"});
|
||||
uvm_test_done.set_drain_time(this, 200us);
|
||||
endtask : pre_body
|
||||
|
||||
// objections are dropped in post_body
|
||||
virtual task post_body();
|
||||
uvm_phase phase = get_starting_phase();
|
||||
if (phase != null)
|
||||
phase.drop_objection(this, {"Completed sequence '", get_full_name(), "'"});
|
||||
endtask : post_body
|
||||
|
||||
endclass : calc_base_seq
|
||||
|
||||
`endif
|
||||
11
code/vezba9/verif/Sequences/calc_seq_pkg.sv
Normal file
11
code/vezba9/verif/Sequences/calc_seq_pkg.sv
Normal file
@@ -0,0 +1,11 @@
|
||||
`ifndef CALC_SEQ_PKG_SV
|
||||
`define CALC_SEQ_PKG_SV
|
||||
package calc_seq_pkg;
|
||||
import uvm_pkg::*; // import the UVM library
|
||||
`include "uvm_macros.svh" // Include the UVM macros
|
||||
import calc_agent_pkg::calc_seq_item;
|
||||
import calc_agent_pkg::calc_sequencer;
|
||||
`include "calc_base_seq.sv"
|
||||
`include "calc_simple_seq.sv"
|
||||
endpackage
|
||||
`endif
|
||||
19
code/vezba9/verif/Sequences/calc_simple_seq.sv
Normal file
19
code/vezba9/verif/Sequences/calc_simple_seq.sv
Normal file
@@ -0,0 +1,19 @@
|
||||
`ifndef CALC_SIMPLE_SEQ_SV
|
||||
`define CALC_SIMPLE_SEQ_SV
|
||||
|
||||
class calc_simple_seq extends calc_base_seq;
|
||||
|
||||
`uvm_object_utils (calc_simple_seq)
|
||||
|
||||
function new(string name = "calc_simple_seq");
|
||||
super.new(name);
|
||||
endfunction
|
||||
|
||||
virtual task body();
|
||||
// simple example - just send one item
|
||||
`uvm_do(req);
|
||||
endtask : body
|
||||
|
||||
endclass : calc_simple_seq
|
||||
|
||||
`endif
|
||||
Reference in New Issue
Block a user