/****************************************************************************
    +-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+ +-+-+-+-+-+-+-+-+
    |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            apb_master_read_seq.sv

    DESCRIPTION     sequence for reading from one address

 ****************************************************************************/

`ifndef APB_MASTER_READ_SEQ_SV
`define APB_MASTER_READ_SEQ_SV
    
/**
 * Class: apb_master_read_seq
 */
class apb_master_read_seq extends apb_master_base_seq;
    
    rand int unsigned delay; // transaction delay
    rand bit [ADDR_WIDTH - 1 : 0] addr; // address to read
    
    // constraints
    constraint delay_cst { delay inside {[1 : 10]};}
    
    // UVM factory registration
    `uvm_object_utils(apb_master_read_seq)

    // new - constructor
    function new(string name = "apb_master_read_seq");
        super.new(name);
    endfunction : new

    // sequence generation logic in body
    virtual task body();
        `uvm_do_with( req, 
                      {req.addr == addr;
                       req.dir == APB_READ;
                       req.delay == delay;})     
    endtask : body
endclass : apb_master_read_seq

`endif

