vu_capture.v 3.7 KB

reg [31:0] fpC_vu;

initial 
begin
  if ($test$plusargs("qsim_capture_vu"))
      begin

        fpC_vu = $fopen("capture_vu.tab");

        $fwrite(fpC_vu,
		    "clk                    @C 1(8) 0(8.5)\n",
                    "reset_l                @I @E 2     \n",
                    "su_instvld_rd          @I @E 2     \n",
                    "su_storeinst_rd        @I @E 2     \n",
                    "su_storecfc2_rd        @I @E 2     \n",
                    "su_vseqone_rd          @I @E 2     \n",
                    "su_instelem_rd[3:0]    @I @E 2     \n",
                    "su_instfunc_rd[5:0]    @I @E 2     \n",
                    "su_rdcmpcd_rd          @I @E 2     \n",
                    "su_rdcryout_rd         @I @E 2     \n",
                    "su_rdcmpcdad_rd        @I @E 2     \n",
                    "su_wrcmpcd_wb          @I @E 2     \n",
                    "su_wrcryout_wb         @I @E 2     \n",
                    "su_wrcmpcdad_wb        @I @E 2     \n",
                    "su_st_rnum_rd[4:0]     @I @E 2     \n",
                    "su_xp_rnum_rd[4:0]     @I @E 2     \n",
                    "su_ld_rnum_ac[4:0]     @I @E 2     \n",
                    "su_vs_addr_rd[4:0]     @I @E 2     \n",
                    "su_vt_addr_rd[4:0]     @I @E 2     \n",
                    "su_vd_addr_ac[4:0]     @I @E 2     \n",
                    "su_wbv_wr_en_ac        @I @E 2     \n",
                    "su_bwe_ac[15:0]        @I @E 2     \n",
                    "su_xposeop_rdac        @I @E 2     \n",
                    "temp        	    @I @E 0     \n",
                    "su_data_to_from[127:0] @B su_storecfc201_mu 1 @E 4 @S 10 \n",
                    "su_storecfc201_mu   @O @S 10  \n",
                    "su_storecfc223_mu   @O @S 10  \n",
                    "su_storecfc245_mu   @O @S 10  \n",
                    "su_storecfc267_mu   @O @S 10  \n",
                    "vdi_divrslt_wb[15:0] @O @S 9 \n"
	        );
        $fdisplay(fpC_vu); 
    
         @(posedge `CLK);

        forever 
	  begin
	    @(posedge `CLK);
            #4;

        $fwrite(fpC_vu,
                    "%b ",	`vu_path.reset_l,
                    "%b ",	`vu_path.su_instvld_rd,
                    "%b ",	`vu_path.su_storeinst_rd,
                    "%b ",	`vu_path.su_storecfc2_rd,
                    "%b ",	`vu_path.su_vseqone_rd,
                    "0x%h ",	`vu_path.su_instelem_rd[3:0],
                    "0x%h ",	`vu_path.su_instfunc_rd[5:0],
                    "%b ",	`vu_path.su_rdcmpcd_rd,
                    "%b ",	`vu_path.su_rdcryout_rd,
                    "%b ",	`vu_path.su_rdcmpcdad_rd,
                    "%b ",	`vu_path.su_wrcmpcd_wb,
                    "%b ",	`vu_path.su_wrcryout_wb,
                    "%b ",	`vu_path.su_wrcmpcdad_wb,
                    "0x%h ",	`vu_path.su_st_rnum_rd[4:0],
                    "0x%h ",	`vu_path.su_xp_rnum_rd[4:0],
                    "0x%h ",	`vu_path.su_ld_rnum_ac[4:0],
                    "0x%h ",	`vu_path.su_vs_addr_rd[4:0],
                    "0x%h ",	`vu_path.su_vt_addr_rd[4:0],
                    "0x%h ",	`vu_path.su_vd_addr_ac[4:0],
                    "%b ",	`vu_path.su_wbv_wr_en_ac,
                    "0x%h ",	`vu_path.su_bwe_ac[15:0],
                    "%b ",	`vu_path.su_xposeop_rdac,
                    "%b ",	`vu_path.su_storecfc201_mu,
                    "0x%h ",	`vu_path.su_data_to_from[127:0],
                    "%b ",	`vu_path.su_storecfc201_mu,
                    "%b ",	`vu_path.su_storecfc223_mu,
                    "%b ",	`vu_path.su_storecfc245_mu,
                    "%b ",	`vu_path.su_storecfc267_mu,
                    "0x%h ",	`vu_path.vdi_divrslt_wb[15:0]
	        );

            $fdisplay(fpC_vu); 
          end
      end
end