34 `uvm_object_utils(apb_seq_item)
41 rand logic[31:0] addr;
44 rand logic[31:0]
data;
65 constraint delay_bounds {
66 delay inside {[1:20]};
78 extern function new(
string name =
"apb_seq_item");
83 extern function void do_copy(uvm_object rhs);
88 extern function bit do_compare(uvm_object rhs, uvm_comparer comparer);
93 extern function string convert2string();
98 extern function void do_print(uvm_printer printer);
103 extern function void do_record(uvm_recorder recorder);
114 if(!$cast(rhs_, rhs)) begin
115 `uvm_fatal(
"do_copy",
"cast of rhs object failed")
126 function bit
apb_seq_item::do_compare(uvm_object rhs, uvm_comparer comparer);
129 if(!$cast(rhs_, rhs)) begin
130 `uvm_error("do_copy", "cast of rhs
object failed")
133 return super.do_compare(rhs, comparer) &&
138 endfunction:do_compare
143 $sformat(s, "%s\n", super.convert2string());
145 $sformat(s, "%s\n addr\t%0h\n data\t%0h\n we\t%0b\n delay\t%0d\n", s, addr, data, we, delay);
148 endfunction:convert2string
151 if(printer.knobs.sprint == 0) begin
152 $display(convert2string());
155 printer.m_string = convert2string();
160 super.do_record(recorder);
163 `uvm_record_field("addr", addr)
164 `uvm_record_field("data", data)
165 `uvm_record_field("we", we)
166 `uvm_record_field("delay", delay)
167 endfunction:do_record
bit error
Indicates a failure to drive the item on the bus.
new(string name="apb_seq_item")
Conventional UVM object constructor.
void do_copy(uvm_object rhs)
constraint addr_alignment()
Constrains the randomized transactions for double-word alignment.
rand int delay
Number of APB clock cycles since the apb_driver received the transaction to the actual start of the t...
uvm_object_utils(apb_seq_item) rand logic< 31 rand logic< 31:0 > data
Bus address.
rand logic we
Read/write (=0/1) transaction type.