OpenCores
URL https://opencores.org/ocsvn/xgate/xgate/trunk

Subversion Repositories xgate

[/] [xgate/] [trunk/] [bench/] [verilog/] [tst_bench_top.v] - Diff between revs 41 and 50

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 41 Rev 50
Line 43... Line 43...
 
 
module tst_bench_top();
module tst_bench_top();
 
 
  parameter MAX_CHANNEL = 127;    // Max XGATE Interrupt Channel Number
  parameter MAX_CHANNEL = 127;    // Max XGATE Interrupt Channel Number
  parameter STOP_ON_ERROR = 1'b0;
  parameter STOP_ON_ERROR = 1'b0;
  parameter MAX_VECTOR = 2200;
  parameter MAX_VECTOR = 2300;
 
 
  parameter L_BYTE = 2'b01;
  parameter L_BYTE = 2'b01;
  parameter H_BYTE = 2'b10;
  parameter H_BYTE = 2'b10;
  parameter WORD   = 2'b11;
  parameter WORD   = 2'b11;
 
 
Line 237... Line 237...
          $display("\n ------ !!!!! Simulation Timeout at vector=%d\n -------", vector);
          $display("\n ------ !!!!! Simulation Timeout at vector=%d\n -------", vector);
          wrap_up;
          wrap_up;
        end
        end
    end
    end
 
 
  // Add up errors tha come from WISHBONE read compares
  // Add up errors that come from WISHBONE read compares
  always @host.cmp_error_detect
  always @host.cmp_error_detect
    begin
    begin
      error_count <= error_count + 1;
      error_count <= error_count + 1;
    end
    end
 
 
 
 
  // Throw in some wait states from the memory
  // Throw in some wait states from the memory
  always @(posedge mstr_test_clk)
  always @(posedge mstr_test_clk)
    if (((vector % 5) == 0) && (xgate.risc.load_next_inst || xgate.risc.data_access))
    if (((vector % 5) == 0) && (xgate.risc.load_next_inst || xgate.risc.data_access))
//    if ((vector % 5) == 0)
//    if ((vector % 5) == 0)
      wbm_ack_i <= 1'b0;
      wbm_ack_i <= 1'b1;
    else
    else
      wbm_ack_i <= 1'b1;
      wbm_ack_i <= 1'b1;
 
 
 
 
  // Special Memory Mapped Testbench Registers
  // Special Memory Mapped Testbench Registers
Line 788... Line 788...
    read_ram_cmp(16'h0068,16'h2fcc);
    read_ram_cmp(16'h0068,16'h2fcc);
    read_ram_cmp(16'h0022,16'hccxx);
    read_ram_cmp(16'h0022,16'hccxx);
    read_ram_cmp(16'h0026,16'hxx99);
    read_ram_cmp(16'h0026,16'hxx99);
    read_ram_cmp(16'h0052,16'hxx66);
    read_ram_cmp(16'h0052,16'hxx66);
    read_ram_cmp(16'h0058,16'h99xx);
    read_ram_cmp(16'h0058,16'h99xx);
 
 
 
    data_xgmctl = 16'hff00;
 
    host.wb_write(0, XGATE_XGMCTL, data_xgmctl, WORD);   // Disable XGATE
 
 
  end
  end
endtask
endtask
 
 
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// check register bits - reset, read/write
// check register bits - reset, read/write
Line 1107... Line 1111...
 
 
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
task activate_thread_sw;
task activate_thread_sw;
  input [ 6:0] chan_val;
  input [ 6:0] chan_val;
  begin
  begin
      $display("Activating Sofrware Thread - Channel #%d", chan_val);
      $display("Activating Software Thread - Channel #%d", chan_val);
 
 
      data_xgmctl = XGMCTL_XGEM | XGMCTL_XGE;
      data_xgmctl = XGMCTL_XGEM | XGMCTL_XGE;
      host.wb_write(0, XGATE_XGMCTL, data_xgmctl, WORD);   // Enable XGATE
      host.wb_write(0, XGATE_XGMCTL, data_xgmctl, WORD);   // Enable XGATE
 
 
      channel_req[chan_val] = 1'b1; //
      channel_req[chan_val] = 1'b1; //

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.