init
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
/****************************************************************************
|
||||
+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+-+
|
||||
|F|u|n|c|t|i|o|n|a|l| |V|e|r|i|f|i|c|a|t|i|o|n| |o|f| |H|a|r|d|w|a|r|e|
|
||||
+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+-+
|
||||
|
||||
FILE reset_transaction.sv
|
||||
|
||||
DESCRIPTION reset sequence item
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
`ifndef RESET_TRANSACTION_SV
|
||||
`define RESET_TRANSACTION_SV
|
||||
|
||||
/**
|
||||
* Class: reset_transaction
|
||||
*/
|
||||
class reset_transaction extends uvm_sequence_item;
|
||||
|
||||
// delay before asserting reset (#clk cycles)
|
||||
rand int unsigned transmit_delay;
|
||||
// duration of reset (#clk cycles)
|
||||
rand int unsigned duration;
|
||||
|
||||
// constraints
|
||||
constraint c_transmit_delay { transmit_delay <= 10; }
|
||||
constraint c_duration { duration inside {[0:5]}; }
|
||||
|
||||
// UVM factory registration
|
||||
`uvm_object_utils_begin(reset_transaction)
|
||||
`uvm_field_int(transmit_delay, UVM_DEFAULT)
|
||||
`uvm_field_int(duration, UVM_DEFAULT)
|
||||
`uvm_object_utils_end
|
||||
|
||||
// new - constructor
|
||||
function new (string name = "reset_transaction");
|
||||
super.new(name);
|
||||
endfunction : new
|
||||
|
||||
endclass : reset_transaction
|
||||
|
||||
`endif
|
||||
Reference in New Issue
Block a user