init
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
/****************************************************************************
|
||||
+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+-+
|
||||
|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 i2c_slave_base_seq.sv
|
||||
|
||||
DESCRIPTION base sequence to be extended by other sequences
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
`ifndef I2C_SLAVE_BASE_SEQ_SV
|
||||
`define I2C_SLAVE_BASE_SEQ_SV
|
||||
|
||||
/**
|
||||
* Class: i2c_slave_base_seq
|
||||
*/
|
||||
class i2c_slave_base_seq extends uvm_sequence #(i2c_transaction, i2c_transaction);
|
||||
|
||||
// UVM factory registration
|
||||
`uvm_object_utils(i2c_slave_base_seq)
|
||||
|
||||
// new - constructor
|
||||
function new(string name = "i2c_slave_base_seq");
|
||||
super.new(name);
|
||||
endfunction : new
|
||||
|
||||
endclass : i2c_slave_base_seq
|
||||
|
||||
`endif
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/****************************************************************************
|
||||
+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+-+
|
||||
|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 i2c_slave_seq_lib.sv
|
||||
|
||||
DESCRIPTION sequence includes
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
`ifndef I2C_SLAVE_SEQ_LIB_SV
|
||||
`define I2C_SLAVE_SEQ_LIB_SV
|
||||
|
||||
`include "slave/sequences/i2c_slave_base_seq.sv"
|
||||
`include "slave/sequences/i2c_slave_simple_seq.sv"
|
||||
|
||||
`endif
|
||||
@@ -0,0 +1,38 @@
|
||||
/****************************************************************************
|
||||
+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+-+
|
||||
|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 i2c_slave_simple_seq.sv
|
||||
|
||||
DESCRIPTION simple sequence; always respond with random data
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
`ifndef I2C_SLAVE_SIMPLE_SEQ_SV
|
||||
`define I2C_SLAVE_SIMPLE_SEQ_SV
|
||||
|
||||
/**
|
||||
* Class: i2c_slave_simple_seq
|
||||
*/
|
||||
class i2c_slave_simple_seq extends i2c_slave_base_seq;
|
||||
|
||||
// UVM factory registration
|
||||
`uvm_object_utils(i2c_slave_simple_seq)
|
||||
|
||||
// new - constructor
|
||||
function new(string name = "i2c_slave_simple_seq");
|
||||
super.new(name);
|
||||
endfunction : new
|
||||
|
||||
// sequence generation logic in body
|
||||
virtual task body();
|
||||
forever begin
|
||||
`uvm_do(req)
|
||||
end
|
||||
endtask : body
|
||||
|
||||
endclass : i2c_slave_simple_seq
|
||||
|
||||
`endif
|
||||
|
||||
Reference in New Issue
Block a user