diff --git a/driver/opae/vlsim/opae_sim.cpp b/driver/opae/vlsim/opae_sim.cpp index 1aaa7e6d..e821fa52 100644 --- a/driver/opae/vlsim/opae_sim.cpp +++ b/driver/opae/vlsim/opae_sim.cpp @@ -312,8 +312,7 @@ void opae_sim::avs_bus() { // process DRAM requests if (!dram_stalled) { assert(!vortex_afu_->avs_read || !vortex_afu_->avs_write); - if (vortex_afu_->avs_write) { - assert(0 == vortex_afu_->mem_bank_select); + if (vortex_afu_->avs_write) { uint64_t byteen = vortex_afu_->avs_byteenable; unsigned base_addr = vortex_afu_->avs_address * DRAM_BLOCK_SIZE; uint8_t* data = (uint8_t*)(vortex_afu_->avs_writedata); @@ -329,7 +328,6 @@ void opae_sim::avs_bus() { printf("\n");*/ } if (vortex_afu_->avs_read) { - assert(0 == vortex_afu_->mem_bank_select); dram_rd_req_t dram_req; dram_req.addr = vortex_afu_->avs_address; ram_.read(vortex_afu_->avs_address * DRAM_BLOCK_SIZE, DRAM_BLOCK_SIZE, dram_req.data.data()); diff --git a/driver/opae/vlsim/vortex_afu_shim.sv b/driver/opae/vlsim/vortex_afu_shim.sv index 8d38fc53..c69dfe09 100644 --- a/driver/opae/vlsim/vortex_afu_shim.sv +++ b/driver/opae/vlsim/vortex_afu_shim.sv @@ -9,9 +9,7 @@ import ccip_if_pkg::*; import local_mem_cfg_pkg::*; /* verilator lint_on IMPORTSTAR */ -module vortex_afu_shim #( - parameter NUM_LOCAL_MEM_BANKS = 2 -) ( +module vortex_afu_shim ( // global signals input clk, input reset, @@ -83,14 +81,14 @@ module vortex_afu_shim #( output t_local_mem_burst_cnt avs_burstcount, input avs_readdatavalid, - output logic [$clog2(NUM_LOCAL_MEM_BANKS)-1:0] mem_bank_select + output logic [$clog2(`PLATFORM_PARAM_LOCAL_MEMORY_BANKS)-1:0] mem_bank_select ); t_if_ccip_Rx cp2af_sRxPort; t_if_ccip_Tx af2cp_sTxPort; vortex_afu #( - .NUM_LOCAL_MEM_BANKS(NUM_LOCAL_MEM_BANKS) + .NUM_LOCAL_MEM_BANKS(`PLATFORM_PARAM_LOCAL_MEMORY_BANKS) ) afu ( .clk(clk), .reset(reset), diff --git a/hw/rtl/VX_config.vh b/hw/rtl/VX_config.vh index cf09d93c..40c33428 100644 --- a/hw/rtl/VX_config.vh +++ b/hw/rtl/VX_config.vh @@ -1,8 +1,6 @@ `ifndef VX_CONFIG `define VX_CONFIG -`include "VX_user_config.vh" - `ifndef NUM_CLUSTERS `define NUM_CLUSTERS 1 `endif diff --git a/hw/rtl/afu/vortex_afu.vh b/hw/rtl/afu/vortex_afu.vh index 3eb8cfd2..05a5654e 100644 --- a/hw/rtl/afu/vortex_afu.vh +++ b/hw/rtl/afu/vortex_afu.vh @@ -5,6 +5,10 @@ `define PLATFORM_PROVIDES_LOCAL_MEMORY +`ifndef PLATFORM_PARAM_LOCAL_MEMORY_BANKS +`define PLATFORM_PARAM_LOCAL_MEMORY_BANKS 2 +`endif + `ifndef PLATFORM_PARAM_LOCAL_MEMORY_DATA_SIZE_BITS `define PLATFORM_PARAM_LOCAL_MEMORY_DATA_SIZE_BITS 6 `endif