nomem_rsp_capture.v 12.2 KB

reg [31:0] fpC_nomem_rsp;

wire cbus_write_enable = `rsp_path.sp_cbus_write_enable ||
			 `rsp_path.mem_cbus_write_enable ||
			 `rsp_path.cmd_cbus_write_enable;


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

        fpC_nomem_rsp = $fopen("capture_nomem_rsp.tab");

        $fwrite(fpC_nomem_rsp,

		    "clk                    @C 1(10) 0(10)\n",
                    "reset_l                @I @E 2     \n",
                    "iddq_test              @I @E 2     \n",

                    "frozen                 @I @E 2     \n",
                    "sp_cbus_read_enable    @I @E 2     \n",
                    "sp_cbus_write_enable   @I @E 2     \n",
                    "mem_cbus_write_enable  @I @E 2     \n",
                    "cmd_cbus_read_enable   @I @E 2     \n",
                    "cmd_cbus_write_enable  @I @E 2     \n",
                    "cbus_select[1:0]       @I @E 2     \n",
                    "cbus_command[2:0]      @I @E 2     \n",
                    "dma_start              @I @E 2     \n",
                    "dma_last               @I @E 2     \n",
                    "sp_dma_grant           @I @E 2     \n",
                    "sp_read_grant          @I @E 2     \n",
                    "cmd_dma_grant          @I @E 2     \n",
                    "cmd_read_grant         @I @E 2     \n",
                    "sp_dbus_read_enable    @I @E 2     \n",
                    "sp_dbus_write_enable   @I @E 2     \n",
                    "cbuf_ready             @I @E 2     \n",
                    "cmd_busy               @I @E 2     \n",
                    "pipe_busy              @I @E 2     \n",
                    "tmem_busy              @I @E 2     \n",

                    "cbus_data[31:0] @B cbus_write_enable    1 @E 5 @S 15 \n",
                    "dbus_data[63:0] @B sp_dbus_write_enable 1 @E 5 @S 15 \n",

		    "cbus_write_enable     @I @E 0   \n",
		    "dbus_write_enable	   @I @E 0   \n",

		    "sp_dma_request        @O @S 15  \n",
		    "sp_read_request       @O @S 15  \n",
		    "mem_read_request      @O @S 15  \n",
		    "cmd_dma_request       @O @S 15  \n",
		    "cmd_read_request      @O @S 15  \n",
		    "cbuf_write 	   @O @S 15  \n",
		    "flush 		   @O @S 15  \n",
		    "freeze 		   @O @S 15  \n",
		    "unfreeze 		   @O @S 15  \n",
		    "sp_interrupt 	   @O @S 15  \n",
		    "xbus_data[63:0]       @O @S 15  \n",

		    //VU interface probe
                    "su_instvld_rd          @O @S 14 \n",
                    "su_storeinst_rd        @O @S 14 \n",
                    "su_vseqone_rd          @O @S 14 \n",
                    "su_instelem_rd[3:0]    @O @S 14 \n",
                    "su_instfunc_rd[5:0]    @O @S 14 \n",
                    "su_rdcmpcd_rd          @O @S 14 \n",
                    "su_rdcryout_rd         @O @S 14 \n",
                    "su_rdcmpcdad_rd        @O @S 14 \n",
                    "su_wrcmpcd_wb          @O @S 14 \n",
                    "su_wrcryout_wb         @O @S 14 \n",
                    "su_wrcmpcdad_wb        @O @S 14 \n",
                    "su_st_rnum_rd[4:0]     @O @S 14 \n",
                    "su_xp_rnum_rd[4:0]     @O @S 14 \n",
                    "su_ld_rnum_ac[4:0]     @O @S 14 \n",
                    "su_vs_addr_rd[4:0]     @O @S 14 \n",
                    "su_vt_addr_rd[4:0]     @O @S 14 \n",
                    "su_vd_addr_ac[4:0]     @O @S 14 \n",
                    "su_wbv_wr_en_ac        @O @S 14 \n",
                    "su_bwe_ac[15:0]        @O @S 14 \n",
                    "su_xposeop_rdac        @O @S 14 \n",
                    "su_data_to_from[127:0] @O @S 14 \n",

		    //DMEM interface probe
                    "df_chip_sel_l          @O @S 14 \n",
                    "df_wen_l[15:0]         @O @S 14 \n",
                    "df_addr_low[7:0]       @O @S 14 \n",
                    "df_addr_high[7:0]      @O @S 14 \n",
                    "df_datain_15[7:0]      @O @S 14 \n",
                    "df_datain_14[7:0]      @O @S 14 \n",
                    "df_datain_13[7:0]      @O @S 14 \n",
                    "df_datain_12[7:0]      @O @S 14 \n",
                    "df_datain_11[7:0]      @O @S 14 \n",
                    "df_datain_10[7:0]      @O @S 14 \n",
                    "df_datain_09[7:0]      @O @S 14 \n",
                    "df_datain_08[7:0]      @O @S 14 \n",
                    "df_datain_07[7:0]      @O @S 14 \n",
                    "df_datain_06[7:0]      @O @S 14 \n",
                    "df_datain_05[7:0]      @O @S 14 \n",
                    "df_datain_04[7:0]      @O @S 14 \n",
                    "df_datain_03[7:0]      @O @S 14 \n",
                    "df_datain_02[7:0]      @O @S 14 \n",
                    "df_datain_01[7:0]      @O @S 14 \n",
                    "df_datain_00[7:0]      @O @S 14 \n",
                    "dmem_dataout_15[7:0]   @I @E 2 \n",
                    "dmem_dataout_14[7:0]   @I @E 2 \n",
                    "dmem_dataout_13[7:0]   @I @E 2 \n",
                    "dmem_dataout_12[7:0]   @I @E 2 \n",
                    "dmem_dataout_11[7:0]   @I @E 2 \n",
                    "dmem_dataout_10[7:0]   @I @E 2 \n",
                    "dmem_dataout_09[7:0]   @I @E 2 \n",
                    "dmem_dataout_08[7:0]   @I @E 2 \n",
                    "dmem_dataout_07[7:0]   @I @E 2 \n",
                    "dmem_dataout_06[7:0]   @I @E 2 \n",
                    "dmem_dataout_05[7:0]   @I @E 2 \n",
                    "dmem_dataout_04[7:0]   @I @E 2 \n",
                    "dmem_dataout_03[7:0]   @I @E 2 \n",
                    "dmem_dataout_02[7:0]   @I @E 2 \n",
                    "dmem_dataout_01[7:0]   @I @E 2 \n",
                    "dmem_dataout_00[7:0]   @I @E 2 \n",

		    //IMEM interface probe
                    "imem_csb           @O @S 14 \n",
                    "imem_web           @O @S 14 \n",
                    "imem_datain[63:0]  @O @S 14 \n",
                    "final_pc[8:0]      @O @S 14 \n",
                    "rd_inst[63:0]      @I @E 2 \n",

		    // Misc  
                    "dma_busy          @O @S 14 \n",
                    "halt              @O @S 14 \n",
                    "set_broke         @O @S 14 \n"
	        );

        $fdisplay(fpC_nomem_rsp); 
    
         @(negedge `CLK);

        forever 
	  begin
	    @(negedge `CLK);
            #4;
        $fwrite(fpC_nomem_rsp,

                    "%b ",   `rsp_path.reset_l,
                    "%b ",   `rsp_path.iddq_test,

                    "%b ",   `rsp_path.frozen,
                    "%b ",   `rsp_path.sp_cbus_read_enable,
                    "%b ",   `rsp_path.sp_cbus_write_enable,
                    "%b ",   `rsp_path.mem_cbus_write_enable,
                    "%b ",   `rsp_path.cmd_cbus_read_enable,
                    "%b ",   `rsp_path.cmd_cbus_write_enable,
                    "0x%h ",   `rsp_path.cbus_select[1:0],
                    "0x%h ",   `rsp_path.cbus_command[2:0],
                    "%b ",   `rsp_path.dma_start,
                    "%b ",   `rsp_path.dma_last,
                    "%b ",   `rsp_path.sp_dma_grant,
                    "%b ",   `rsp_path.sp_read_grant,
                    "%b ",   `rsp_path.cmd_dma_grant,
                    "%b ",   `rsp_path.cmd_read_grant,
                    "%b ",   `rsp_path.sp_dbus_read_enable,
                    "%b ",   `rsp_path.sp_dbus_write_enable,
                    "%b ",   `rsp_path.cbuf_ready,
                    "%b ",   `rsp_path.cmd_busy,
                    "%b ",   `rsp_path.pipe_busy,
                    "%b ",   `rsp_path.tmem_busy,

                    "0x%h ",   `rsp_path.cbus_data[31:0],
                    "0x%h ",   `rsp_path.dbus_data[63:0],

                    "%b ",   cbus_write_enable,
                    "%b ",   `rsp_path.sp_dbus_write_enable,

                    "%b ",   `rsp_path.sp_dma_request,
                    "%b ",   `rsp_path.sp_read_request,
                    "%b ",   `rsp_path.mem_read_request,
                    "%b ",   `rsp_path.cmd_dma_request,
                    "%b ",   `rsp_path.cmd_read_request,
                    "%b ",   `rsp_path.cbuf_write,
                    "%b ",   `rsp_path.flush,
                    "%b ",   `rsp_path.freeze,
                    "%b ",   `rsp_path.unfreeze,
                    "%b ",   `rsp_path.sp_interrupt,
                    "0x%h ",   `rsp_path.xbus_data[63:0],

                    "%b ",	`vu_path.su_instvld_rd,
                    "%b ",	`vu_path.su_storeinst_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,
                    "0x%h ",	`vu_path.su_data_to_from[127:0],

                    "%b ",	`rsp_path.dmemx2.df_chip_sel_l,
                    "0x%h ",	`rsp_path.dmemx2.df_wen_l,
                    "0x%h ",	`rsp_path.dmemx2.df_addr_low[11:4],
                    "0x%h ",	`rsp_path.dmemx2.df_addr_high[11:4],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[7:0],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[15:8],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[23:16],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[31:24],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[39:32],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[47:40],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[55:48],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[63:56],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[71:64],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[79:72],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[87:80],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[95:88],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[103:96],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[111:104],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[119:112],
                    "0x%h ",	`rsp_path.dmemx2.df_datain[127:120],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[7:0],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[15:8],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[23:16],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[31:24],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[39:32],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[47:40],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[55:48],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[63:56],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[71:64],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[79:72],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[87:80],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[95:88],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[103:96],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[111:104],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[119:112],
                    "0x%h ",	`rsp_path.dmemx2.dmem_dataout[127:120],

		    //IMEM interface probe
                    "%b ",	`rsp_path.imem.csb,
                    "%b ",	`rsp_path.imem.web,
                    "0x%h ",	`rsp_path.imem.di,
                    "0x%h ",	`rsp_path.imem.a,
                    "0x%h ",	`rsp_path.imem.dout,

		    // Misc  
                    "%b ",	`rsp_path.io_mem_dma.dma_busy,
                    "%b ",	`rsp_path.io_mem_dma.halt,
                    "%b ",	`rsp_path.io_mem_dma.set_broke
	        );

            $fdisplay(fpC_nomem_rsp); 
          end
      end
end