arb_tab.v 7.91 KB
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module:      arb_tab.v
// description: dumps out arb i/o .tab file
//
// designer:    Tony DeLaurier
// date:        12/06/94
//
////////////////////////////////////////////////////////////////////////

module arb_tab();

  integer	tab_file_ptr;

  // open tab file and dump header
  initial
  begin

      tab_file_ptr = $fopen("arb000.tab");
      
      // dump out header
      $fwriteh(tab_file_ptr, "#\n"); 
      $fwriteh(tab_file_ptr, "# arb tab file\n"); 
      $fwriteh(tab_file_ptr, "#\n"); 
      $fwriteh(tab_file_ptr, "clock                   @C 1(8) 0(8)\n"); 
      $fwriteh(tab_file_ptr, "reset_l                 @I @E 2 @C clock\n"); 

      $fwriteh(tab_file_ptr, "dma_ready               @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "sp_dma_request          @I @E 2 @C clock\n");
      $fwriteh(tab_file_ptr, "sp_read_request         @I @E 2 @C clock\n");
      $fwriteh(tab_file_ptr, "mem_read_request        @I @E 2 @C clock\n");
      $fwriteh(tab_file_ptr, "mi_dma_request          @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "mi_write_request        @I @E 2 @C clock\n");
      $fwriteh(tab_file_ptr, "mi_read_request         @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "cmd_dma_request         @I @E 2 @C clock\n");
      $fwriteh(tab_file_ptr, "cmd_read_request        @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "ri_read_request         @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "pi_dma_request          @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "pi_read_request         @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "si_dma_request          @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "si_read_request         @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "ai_dma_request          @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "ai_read_request         @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "vi_dma_request          @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "vi_read_request         @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "span_dma_request        @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "span_read_request       @I @E 2 @C clock\n"); 
      $fwriteh(tab_file_ptr, "refresh_strobe          @I @E 2 @C clock\n"); 
  
      $fwriteh(tab_file_ptr, "sp_cbus_read_enable     @O @S 15 @C clock\n");
      $fwriteh(tab_file_ptr, "sp_cbus_write_enable    @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "sp_dma_grant            @O @S 15 @C clock\n");
      $fwriteh(tab_file_ptr, "sp_read_grant           @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "mem_cbus_write_enable   @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "mi_cbus_read_enable     @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "mi_cbus_write_enable    @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "mi_cbus_grant           @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "cmd_cbus_read_enable    @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "cmd_cbus_write_enable   @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "cmd_dma_grant           @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "cmd_read_grant          @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "ri_cbus_read_enable     @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "ri_cbus_write_enable    @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "ri_read_grant           @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "pi_cbus_read_enable     @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "pi_cbus_write_enable    @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "pi_dma_grant            @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "pi_read_grant           @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "si_cbus_read_enable     @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "si_cbus_write_enable    @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "si_dma_grant            @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "si_read_grant           @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "ai_cbus_read_enable     @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "ai_cbus_write_enable    @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "ai_dma_grant            @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "ai_read_grant           @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "vi_cbus_read_enable     @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "vi_cbus_write_enable    @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "vi_dma_grant            @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "vi_read_grant           @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "span_cbus_read_enable   @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "span_cbus_write_enable  @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "span_dma_grant          @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "span_read_grant         @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "cbus_select[1:0]        @O @S 15 @C clock\n"); 
      $fwriteh(tab_file_ptr, "cbus_command[2:0]       @O @S 15 @C clock\n"); 

      $fwriteh(tab_file_ptr, "\n");
  end // initial

  // dump arb at pos edge of clock 
  always @(posedge reality.rcp_0.arb_0.clock)
  begin
        $fwriteh(tab_file_ptr, 
	    reality.rcp_0.arb_0.reset_l,,"  ",
  
	    reality.rcp_0.arb_0.dma_ready,,
	    reality.rcp_0.arb_0.sp_dma_request,,
	    reality.rcp_0.arb_0.sp_read_request,,
	    reality.rcp_0.arb_0.mem_read_request,,
	    reality.rcp_0.arb_0.mi_dma_request,,
	    reality.rcp_0.arb_0.mi_write_request,,
	    reality.rcp_0.arb_0.mi_read_request,,
	    reality.rcp_0.arb_0.cmd_dma_request,,
	    reality.rcp_0.arb_0.cmd_read_request,,
	    reality.rcp_0.arb_0.ri_read_request,,
	    reality.rcp_0.arb_0.pi_dma_request,,
	    reality.rcp_0.arb_0.pi_read_request,,
	    reality.rcp_0.arb_0.si_dma_request,,
	    reality.rcp_0.arb_0.si_read_request,,
	    reality.rcp_0.arb_0.ai_dma_request,,
	    reality.rcp_0.arb_0.ai_read_request,,
	    reality.rcp_0.arb_0.vi_dma_request,,
	    reality.rcp_0.arb_0.vi_read_request,,
	    reality.rcp_0.arb_0.span_dma_request,,
	    reality.rcp_0.arb_0.span_read_request,,
	    reality.rcp_0.arb_0.refresh_strobe,,"  ",
  
	    reality.rcp_0.arb_0.sp_cbus_read_enable,,
	    reality.rcp_0.arb_0.sp_cbus_write_enable,,
	    reality.rcp_0.arb_0.sp_dma_grant,,
	    reality.rcp_0.arb_0.sp_read_grant,,
	    reality.rcp_0.arb_0.mem_cbus_write_enable,,
	    reality.rcp_0.arb_0.mi_cbus_read_enable,,
	    reality.rcp_0.arb_0.mi_cbus_write_enable,,
	    reality.rcp_0.arb_0.mi_cbus_grant,,
	    reality.rcp_0.arb_0.cmd_cbus_read_enable,,
	    reality.rcp_0.arb_0.cmd_cbus_write_enable,,
	    reality.rcp_0.arb_0.cmd_dma_grant,,
	    reality.rcp_0.arb_0.cmd_read_grant,,
	    reality.rcp_0.arb_0.ri_cbus_read_enable,,
	    reality.rcp_0.arb_0.ri_cbus_write_enable,,
	    reality.rcp_0.arb_0.ri_read_grant,,
	    reality.rcp_0.arb_0.pi_cbus_read_enable,,
	    reality.rcp_0.arb_0.pi_cbus_write_enable,,
	    reality.rcp_0.arb_0.pi_dma_grant,,
	    reality.rcp_0.arb_0.pi_read_grant,,
	    reality.rcp_0.arb_0.si_cbus_read_enable,,
	    reality.rcp_0.arb_0.si_cbus_write_enable,,
	    reality.rcp_0.arb_0.si_dma_grant,,
	    reality.rcp_0.arb_0.si_read_grant,,
	    reality.rcp_0.arb_0.ai_cbus_read_enable,,
	    reality.rcp_0.arb_0.ai_cbus_write_enable,,
	    reality.rcp_0.arb_0.ai_dma_grant,,
	    reality.rcp_0.arb_0.ai_read_grant,,
	    reality.rcp_0.arb_0.vi_cbus_read_enable,,
	    reality.rcp_0.arb_0.vi_cbus_write_enable,,
	    reality.rcp_0.arb_0.vi_dma_grant,,
	    reality.rcp_0.arb_0.vi_read_grant,,
	    reality.rcp_0.arb_0.span_cbus_read_enable,,
	    reality.rcp_0.arb_0.span_cbus_write_enable,,
	    reality.rcp_0.arb_0.span_dma_grant,,
	    reality.rcp_0.arb_0.span_read_grant,,
	    "0x", reality.rcp_0.arb_0.cbus_select,,
	    "0x", reality.rcp_0.arb_0.cbus_command,,
    
            "\n");
  end // always

endmodule // arb_tab