`include "ahb_typedefs.v"
class ahb_mtran extends uvm_sequence_item;
  rand bit [`AW-1:0] haddr;
  rand HTRANS_t htrans;
  rand bit hwrite;
  rand bit [2:0] hsize;
  rand HBURST_t hburst;
  rand integer BL;
  rand bit [3:0] hprot;
  rand bit [`DW-1:0] hwdata;
  rand integer b2b_delay; //this is the delay between 2 consequtive trans issued by a master
  rand bit en_b2b_delay; //0 => disable b2b_delay.,1=> enable b2b_delay

  `uvm_object_utils_begin(ahb_mtran)
     `uvm_field_enum  (HTRANS_t, htrans,    UVM_ALL_ON)
     `uvm_field_enum  (HBURST_t, hburst,    UVM_ALL_ON)
     `uvm_field_int   (haddr,               UVM_ALL_ON +  UVM_HEX)
     `uvm_field_int   (BL,                  UVM_ALL_ON +  UVM_DEC)
     `uvm_field_int   (b2b_delay,           UVM_ALL_ON +  UVM_DEC)
     `uvm_field_int   (en_b2b_delay,        UVM_ALL_ON +  UVM_DEC)
     `uvm_field_int   (hwrite,              UVM_ALL_ON +  UVM_BIN)
  `uvm_object_utils_end

  constraint ahb_bl {BL inside {[1:16]};}
  constraint b2b_delay_c {b2b_delay inside {[0:3]};}



  function new (string name = "");
    super.new(name);
  endfunction: new
endclass: ahb_mtran