Hi All,
I need some help with my uvm_monitor. I need to capture the “mirror_data[127:0]” and “mirror_byte_wr_en[15:0]” when “mirror_wr_addr[18:0]” changes.
mirror_wr_addr does NOT change every posedge of clk. It changes every few clocks. I need to capture the transaction only when “mirror_wr_addr” changes and “mirror_byte_wr_en > 0”. Even if “mirror_wr_addr” changes and “mirror_byte_wr_en” is at 0, I should NOT capture the transaction. The below code does not do it.
Any inputs on where I could be wrong?
task run_phase(uvm_phase phase);
egress_transaction tr;
forever begin
//@ (posedge vif.clock);
@(vif.mirror_wr_addr)
@(vif.mirror_byte_wr_en);
tr = egress_transaction ::type_id::create("tr");
tr.mirror_data = vif.mirror_wr_data;
tr.mirror_wr_byte_en = vif.mirror_byte_wr_en;
tr.mirror_wr_addr = vif.mirror_wr_addr;
`uvm_info(get_type_name(),$sformatf("mirror_data = 0x%x, mirror_byte_wr_en = 0x%x, mirror_wr_addr = 0x%x\n",
tr.mirror_data,tr.mirror_wr_byte_en, tr.mirror_wr_addr),UVM_LOW);
end
endtask : run_phase
Thanks in advance!