ms_tab.v 10.5 KB
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module:      ms_tab.v
// description: dumps out ms i/o .tab file
//
// designer:    Tony DeLaurier
// date:        12/19/94
//
////////////////////////////////////////////////////////////////////////

module ms_tab();

  integer	tab_file_ptr;

  // open tab file and dump header
  initial 
  begin

      tab_file_ptr = $fopen("ms.tab");
    
      // dump out header
      $fwriteh(tab_file_ptr, "#\n"); 
      $fwriteh(tab_file_ptr, "# ms tab file\n"); 
      $fwriteh(tab_file_ptr, "#\n"); 
      $fwriteh(tab_file_ptr, "clk_2x                  @DC 1(4) 0(4)\n"); 
      $fwriteh(tab_file_ptr, "clk_1x                  @DC 1(8) 0(8)\n"); 
      $fwriteh(tab_file_ptr, "clock                   @I @E 0 @C clk_2x\n");
      $fwriteh(tab_file_ptr, "gclock                  @I @E 0 @C clk_2x\n"); 
      $fwriteh(tab_file_ptr, "bist_done               @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "bist_fail[7:0]          @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "reset_l                 @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "stb_sync_full           @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "freeze_gclk             @I @E 2 @C clk_1x\n");
      $fwriteh(tab_file_ptr, "unfreeze_gclk           @I @E 2 @C clk_1x\n");
      $fwriteh(tab_file_ptr, "grant                   @I @E 2 @C clk_1x\n");
      $fwriteh(tab_file_ptr, "start                   @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "finish                  @I @E 2 @C clk_1x\n");
      $fwriteh(tab_file_ptr, "dma_write_enable        @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "dma_read_enable         @I @E 2 @C clk_1x\n");
      $fwriteh(tab_file_ptr, "cbus_read_enable        @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "cbus_write_enable       @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "cbus_select[1:0]        @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "cbus_command[2:0]       @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "read_grant              @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "cycle_type[1:0]         @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "image_read_en           @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "z_update_en             @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "z_compare_en            @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "color_base[25:0]        @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "color_size[1:0]         @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "color_format[2:0]       @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "z_base[25:0]            @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "tex_base[25:0]          @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "tex_size[1:0]           @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "tex_format[2:0]         @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "load_tlut_en            @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "fillcolor[31:0]         @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "alphacompen             @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "dithalphaen             @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "blendalpha[7:0]         @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "noise[2:0]              @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "startspant0             @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "nextspanxi[19:0]        @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "nextspanxf[11:0]        @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "nextspancount[11:0]     @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "nextspanxdec            @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "load_en                 @I @E 8 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "spanbufmt               @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "rdpwdepthin[17:0]       @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "rdpwredin[7:0]          @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "rdpwgreenin[7:0]        @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "rdpwbluein[7:0]         @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "rdpwalphain[2:0]        @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "rdpcolorwen             @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "ccalpha[7:0]            @I @E 2 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "dithrgben               @I @E 8 @C clk_1x\n"); 
    
      $fwriteh(tab_file_ptr, "load_dv                 @O @S 15 @C clk_1x\n");
      $fwriteh(tab_file_ptr, "rdramreq                @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "rdramrw                 @O @S 15 @C clk_1x\n");
      $fwriteh(tab_file_ptr, "read_request            @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "stopgclock              @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "start_gclk              @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "rel_sync_full           @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "pipe_busy               @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "spanbufrd               @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "rdprred[7:0]            @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "rdprgreen[7:0]          @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "rdprblue[7:0]           @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "rdpralpha[2:0]          @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "rdprdepthd[17:0]        @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "bist_go                 @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "bist_check              @O @S 15 @C clk_1x\n"); 
  
      $fwriteh(tab_file_ptr, "copy_load[63:0]         @B copy_load_oe 1 @E 5 @S 15  @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "copy_load_oe            @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "copy_load_dummy         @I @E 0  @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "cbus_data[31:0]         @B cbus_data_oe 1 @E 5 @S 15  @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "cbus_data_oe            @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "cbus_dummy              @I @E 0  @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "dbus_data[63:0]         @B dbus_data_oe 1 @E 5 @S 15  @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "dbus_data_oe            @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "dbus_dummy              @I @E 0  @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "ebus_data[7:0]          @B ebus_data_oe 1 @E 5 @S 15  @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "ebus_data_oe            @O @S 15 @C clk_1x\n"); 
      $fwriteh(tab_file_ptr, "ebus_dummy              @I @E 0  @C clk_1x\n"); 
  
      $fwriteh(tab_file_ptr, "\n");
  
  end // initial

  // generate sample clk

  reg smp_clk;

  initial
  begin
    smp_clk = 1;
    #7.9 smp_clk = 0;
    
    forever 
    begin
      #8 smp_clk = ~smp_clk;
    end // forever
  end // initial

  integer vector_count;
  initial vector_count = 0;

  always @(smp_clk) 
  begin
    if (vector_count >= 0) 
    begin

      $fwriteh(tab_file_ptr, 
 	  reality.rcp_0.rdp_0.ms.clock,,
 	  reality.rcp_0.rdp_0.ms.gclock,,
 	  reality.rcp_0.rdp_0.ms.bist_done,,
 	  "0x", reality.rcp_0.rdp_0.ms.bist_fail,,
 	  reality.rcp_0.rdp_0.ms.reset_l,,
 	  reality.rcp_0.rdp_0.ms.stb_sync_full,,
 	  reality.rcp_0.rdp_0.ms.freeze_gclk,,
 	  reality.rcp_0.rdp_0.ms.unfreeze_gclk,,
 	  reality.rcp_0.rdp_0.ms.grant,,
 	  reality.rcp_0.rdp_0.ms.start,,
 	  reality.rcp_0.rdp_0.ms.finish,,
 	  reality.rcp_0.rdp_0.ms.dma_write_enable,,
 	  reality.rcp_0.rdp_0.ms.dma_read_enable,,
 	  reality.rcp_0.rdp_0.ms.cbus_read_enable,,
 	  reality.rcp_0.rdp_0.ms.cbus_write_enable,,
 	  "0x", reality.rcp_0.rdp_0.ms.cbus_select,,
 	  "0x", reality.rcp_0.rdp_0.ms.cbus_command,,
 	  reality.rcp_0.rdp_0.ms.read_grant,,
 	  "0x", reality.rcp_0.rdp_0.ms.cycle_type,,
 	  reality.rcp_0.rdp_0.ms.image_read_en,,
 	  reality.rcp_0.rdp_0.ms.z_update_en,,
 	  reality.rcp_0.rdp_0.ms.z_compare_en,,
 	  "0x", reality.rcp_0.rdp_0.ms.color_base,,
 	  "0x", reality.rcp_0.rdp_0.ms.color_size,,
 	  "0x", reality.rcp_0.rdp_0.ms.color_format,,
 	  "0x", reality.rcp_0.rdp_0.ms.z_base,,
 	  "0x", reality.rcp_0.rdp_0.ms.tex_base,,
 	  "0x", reality.rcp_0.rdp_0.ms.tex_size,,
 	  "0x", reality.rcp_0.rdp_0.ms.tex_format,,
 	  reality.rcp_0.rdp_0.ms.load_tlut_en,,
 	  "0x", reality.rcp_0.rdp_0.ms.fillcolor,,
 	  reality.rcp_0.rdp_0.ms.alphacompen,,
 	  reality.rcp_0.rdp_0.ms.dithalphaen,,
 	  "0x", reality.rcp_0.rdp_0.ms.blendalpha,,
 	  "0x", reality.rcp_0.rdp_0.ms.noise,,
 	  reality.rcp_0.rdp_0.ms.startspant0,,
 	  "0x", reality.rcp_0.rdp_0.ms.nextspanxi,,
 	  "0x", reality.rcp_0.rdp_0.ms.nextspanxf,,
 	  "0x", reality.rcp_0.rdp_0.ms.nextspancount,,
 	  reality.rcp_0.rdp_0.ms.nextspanxdec,,
 	  reality.rcp_0.rdp_0.ms.load_en,,
 	  reality.rcp_0.rdp_0.ms.spanbufmt,,
 	  "0x", reality.rcp_0.rdp_0.ms.rdpwdepthin,,
 	  "0x", reality.rcp_0.rdp_0.ms.rdpwredin,,
 	  "0x", reality.rcp_0.rdp_0.ms.rdpwgreenin,,
 	  "0x", reality.rcp_0.rdp_0.ms.rdpwbluein,,
 	  "0x", reality.rcp_0.rdp_0.ms.rdpwalphain,,
 	  reality.rcp_0.rdp_0.ms.rdpcolorwen,,
 	  "0x", reality.rcp_0.rdp_0.ms.ccalpha,,
 	  reality.rcp_0.rdp_0.ms.dithrgben,,"  ",
  
 	  reality.rcp_0.rdp_0.ms.load_dv,,
 	  reality.rcp_0.rdp_0.ms.rdramreq,,
 	  reality.rcp_0.rdp_0.ms.rdramrw,,
 	  reality.rcp_0.rdp_0.ms.read_request,,
 	  reality.rcp_0.rdp_0.ms.stopgclock,,
 	  reality.rcp_0.rdp_0.ms.start_gclk,,
 	  reality.rcp_0.rdp_0.ms.rel_sync_full,,
 	  reality.rcp_0.rdp_0.ms.pipe_busy,,
 	  reality.rcp_0.rdp_0.ms.spanbufrd,,
 	  "0x", reality.rcp_0.rdp_0.ms.rdprred,,
 	  "0x", reality.rcp_0.rdp_0.ms.rdprgreen,,
 	  "0x", reality.rcp_0.rdp_0.ms.rdprblue,,
 	  "0x", reality.rcp_0.rdp_0.ms.rdpralpha,,
 	  "0x", reality.rcp_0.rdp_0.ms.rdprdepthd,,
 	  reality.rcp_0.rdp_0.ms.bist_go,,
 	  reality.rcp_0.rdp_0.ms.bist_check,,"  ",
  
 	  "0x", reality.rcp_0.rdp_0.ms.copy_load,,
 	  reality.rcp_0.rdp_0.ms.load_dv,,
 	  reality.rcp_0.rdp_0.ms.load_dv,,
 	  "0x", reality.rcp_0.rdp_0.ms.cbus_data,,
 	  reality.rcp_0.rdp_0.ms.cbus_write_enable,,
 	  reality.rcp_0.rdp_0.ms.cbus_write_enable,,
 	  "0x", reality.rcp_0.rdp_0.ms.dbus_data,,
 	  reality.rcp_0.rdp_0.ms.dma_write_enable,,
 	  reality.rcp_0.rdp_0.ms.dma_write_enable,,
 	  "0x", reality.rcp_0.rdp_0.ms.ebus_data,,
 	  reality.rcp_0.rdp_0.ms.dma_write_enable,,
 	  reality.rcp_0.rdp_0.ms.dma_write_enable,,
  
          "\n");
    end // if
    vector_count = vector_count + 1;

  end // always
  
endmodule // ms_tab