class awgreg_monitor; virtual awgreg_if aif; virtual sram_if#(25,32) xif; //collect awgreg_trans act_trans[$]; function new(); endfunction extern task collect(); extern task do_mon(); endclass : awgreg_monitor task awgreg_monitor::do_mon(); while(1) begin @(negedge xif.wren); collect(); end endtask: do_mon task awgreg_monitor::collect(); awgreg_trans tr_temp; @(posedge xif.clk); @(negedge xif.clk); tr_temp = new(); tr_temp.mcu_param0 = aif.mcu_param0 ; tr_temp.mcu_param1 = aif.mcu_param1 ; tr_temp.mcu_param2 = aif.mcu_param2 ; tr_temp.mcu_param3 = aif.mcu_param3 ; tr_temp.fb_st_o = aif.fb_st_o ; tr_temp.mod_sel_sideband = aif.mod_sel_sideband; tr_temp.qam_nco_clr = aif.qam_nco_clr ; tr_temp.qam_nco_sclr_en = aif.qam_nco_sclr_en ; tr_temp.qam_fcw = aif.qam_fcw ; tr_temp.qam_pha = aif.qam_pha ; tr_temp.qam_mod = aif.qam_mod ; tr_temp.qam_sel_sideband = aif.qam_sel_sideband; tr_temp.intp_mode = aif.intp_mode ; tr_temp.role_sel = aif.role_sel ; tr_temp.dac_mode_sel = aif.dac_mode_sel ; tr_temp.dout_sel = aif.dout_sel ; act_trans.push_back(tr_temp); endtask: collect