diff --git a/driver/opae/vlsim/opae_sim.cpp b/driver/opae/vlsim/opae_sim.cpp index dc1f8b07..a5a6454e 100644 --- a/driver/opae/vlsim/opae_sim.cpp +++ b/driver/opae/vlsim/opae_sim.cpp @@ -8,8 +8,6 @@ #define CCI_RQ_SIZE 16 #define CCI_WQ_SIZE 16 -#define RESET_DELAY 4 - #define ENABLE_MEM_STALLS #ifndef MEM_LATENCY diff --git a/hw/rtl/VX_config.vh b/hw/rtl/VX_config.vh index 1af50aab..e1648aca 100644 --- a/hw/rtl/VX_config.vh +++ b/hw/rtl/VX_config.vh @@ -120,6 +120,8 @@ `define LATENCY_FCVT 5 `endif +`define RESET_DELAY 6 + // CSR Addresses ////////////////////////////////////////////////////////////// // User Floating-Point CSRs diff --git a/hw/rtl/afu/vortex_afu.sv b/hw/rtl/afu/vortex_afu.sv index 7b828923..3dd38958 100644 --- a/hw/rtl/afu/vortex_afu.sv +++ b/hw/rtl/afu/vortex_afu.sv @@ -37,8 +37,6 @@ module vortex_afu #( input avs_readdatavalid [NUM_LOCAL_MEM_BANKS] ); -localparam RESET_DELAY = 3; - localparam LMEM_LINE_WIDTH = $bits(t_local_mem_data); localparam LMEM_ADDR_WIDTH = $bits(t_local_mem_addr); localparam LMEM_BURST_CTRW = $bits(t_local_mem_burst_cnt); @@ -170,7 +168,7 @@ wire [2:0] cmd_type = (cp2af_sRxPort.c0.mmioWrValid // disable assertions until full reset `ifndef VERILATOR -reg [$clog2(RESET_DELAY+1)-1:0] assert_delay_ctr; +reg [$clog2(`RESET_DELAY+1)-1:0] assert_delay_ctr; initial begin $assertoff; end @@ -179,7 +177,7 @@ always @(posedge clk) begin assert_delay_ctr <= 0; end else begin assert_delay_ctr <= assert_delay_ctr + 1; - if (assert_delay_ctr == RESET_DELAY) begin + if (assert_delay_ctr == (`RESET_DELAY-1)) begin $asserton; // enable assertions end end @@ -293,7 +291,7 @@ reg cmd_write_done; wire cmd_run_done; reg vx_started; -reg [$clog2(RESET_DELAY+1)-1:0] vx_reset_ctr; +reg [$clog2(`RESET_DELAY+1)-1:0] vx_reset_ctr; always @(posedge clk) begin if (state == STATE_IDLE) begin vx_reset_ctr <= 0; @@ -365,7 +363,7 @@ always @(posedge clk) begin `endif end end else begin - if (vx_reset_ctr == $bits(vx_reset_ctr)'(RESET_DELAY)) begin + if (vx_reset_ctr == (`RESET_DELAY-1)) begin vx_started <= 1; vx_reset <= 0; end diff --git a/hw/simulate/simulator.cpp b/hw/simulate/simulator.cpp index 547351e7..88cb8134 100644 --- a/hw/simulate/simulator.cpp +++ b/hw/simulate/simulator.cpp @@ -3,8 +3,6 @@ #include #include -#define RESET_DELAY 4 - #define ENABLE_MEM_STALLS #ifndef MEM_LATENCY