Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into riscv-vector-isa-simx
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelJSr committed Nov 16, 2024
2 parents 0ffe41e + 8230b37 commit 33074aa
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions hw/rtl/afu/opae/vortex_afu.sv
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ module vortex_afu import ccip_if_pkg::*; import local_mem_cfg_pkg::*; import VX_
);
localparam LMEM_DATA_WIDTH = $bits(t_local_mem_data);
localparam LMEM_DATA_SIZE = LMEM_DATA_WIDTH / 8;
localparam LMEM_ADDR_WIDTH = `VX_MEM_ADDR_WIDTH + ($clog2(`VX_MEM_DATA_WIDTH) - $clog2(LMEM_DATA_WIDTH));
localparam LMEM_ADDR_WIDTH = $bits(t_local_mem_addr);

localparam LMEM_BYTE_ADDR_WIDTH = LMEM_ADDR_WIDTH + $clog2(LMEM_DATA_SIZE);
localparam CCI_VX_ADDR_WIDTH = `VX_MEM_ADDR_WIDTH + ($clog2(`VX_MEM_DATA_WIDTH) - $clog2(LMEM_DATA_WIDTH));

localparam LMEM_BURST_CTRW = $bits(t_local_mem_burst_cnt);

localparam CCI_DATA_WIDTH = $bits(t_ccip_clData);
Expand Down Expand Up @@ -103,8 +107,8 @@ module vortex_afu import ccip_if_pkg::*; import local_mem_cfg_pkg::*; import VX_
wire [127:0] afu_id = `AFU_ACCEL_UUID;

wire [63:0] dev_caps = {8'b0,
5'(`PLATFORM_MEMORY_ADDR_WIDTH-20),
3'(`CLOG2(`PLATFORM_MEMORY_BANKS)),
5'(LMEM_BYTE_ADDR_WIDTH-20),
3'(`CLOG2(NUM_LOCAL_MEM_BANKS)),
8'(`LMEM_ENABLED ? `LMEM_LOG_SIZE : 0),
16'(`NUM_CORES * `NUM_CLUSTERS),
8'(`NUM_WARPS),
Expand Down Expand Up @@ -480,15 +484,15 @@ module vortex_afu import ccip_if_pkg::*; import local_mem_cfg_pkg::*; import VX_

VX_mem_bus_if #(
.DATA_SIZE (LMEM_DATA_SIZE),
.ADDR_WIDTH (LMEM_ADDR_WIDTH),
.ADDR_WIDTH (CCI_VX_ADDR_WIDTH),
.TAG_WIDTH (AVS_REQ_TAGW)
) cci_vx_mem_bus_if[2]();

VX_mem_adapter #(
.SRC_DATA_WIDTH (CCI_DATA_WIDTH),
.DST_DATA_WIDTH (LMEM_DATA_WIDTH),
.SRC_ADDR_WIDTH (CCI_ADDR_WIDTH),
.DST_ADDR_WIDTH (LMEM_ADDR_WIDTH),
.DST_ADDR_WIDTH (CCI_VX_ADDR_WIDTH),
.SRC_TAG_WIDTH (CCI_ADDR_WIDTH),
.DST_TAG_WIDTH (AVS_REQ_TAGW),
.REQ_OUT_BUF (0),
Expand Down Expand Up @@ -538,7 +542,7 @@ module vortex_afu import ccip_if_pkg::*; import local_mem_cfg_pkg::*; import VX_
.SRC_DATA_WIDTH (`VX_MEM_DATA_WIDTH),
.DST_DATA_WIDTH (LMEM_DATA_WIDTH),
.SRC_ADDR_WIDTH (`VX_MEM_ADDR_WIDTH),
.DST_ADDR_WIDTH (LMEM_ADDR_WIDTH),
.DST_ADDR_WIDTH (CCI_VX_ADDR_WIDTH),
.SRC_TAG_WIDTH (`VX_MEM_TAG_WIDTH),
.DST_TAG_WIDTH (AVS_REQ_TAGW),
.REQ_OUT_BUF (0),
Expand Down Expand Up @@ -579,14 +583,14 @@ module vortex_afu import ccip_if_pkg::*; import local_mem_cfg_pkg::*; import VX_
//--
VX_mem_bus_if #(
.DATA_SIZE (LMEM_DATA_SIZE),
.ADDR_WIDTH (LMEM_ADDR_WIDTH),
.ADDR_WIDTH (CCI_VX_ADDR_WIDTH),
.TAG_WIDTH (AVS_REQ_TAGW+1)
) mem_bus_if[1]();

VX_mem_arb #(
.NUM_INPUTS (2),
.DATA_SIZE (LMEM_DATA_SIZE),
.ADDR_WIDTH (LMEM_ADDR_WIDTH),
.ADDR_WIDTH (CCI_VX_ADDR_WIDTH),
.TAG_WIDTH (AVS_REQ_TAGW),
.ARBITER ("P"), // prioritize VX requests
.REQ_OUT_BUF (0),
Expand All @@ -602,8 +606,8 @@ module vortex_afu import ccip_if_pkg::*; import local_mem_cfg_pkg::*; import VX_

VX_avs_adapter #(
.DATA_WIDTH (LMEM_DATA_WIDTH),
.ADDR_WIDTH_IN (LMEM_ADDR_WIDTH),
.ADDR_WIDTH_OUT($bits(t_local_mem_addr)),
.ADDR_WIDTH_IN (CCI_VX_ADDR_WIDTH),
.ADDR_WIDTH_OUT(LMEM_ADDR_WIDTH),
.BURST_WIDTH (LMEM_BURST_CTRW),
.NUM_BANKS (NUM_LOCAL_MEM_BANKS),
.TAG_WIDTH (AVS_REQ_TAGW + 1),
Expand Down

0 comments on commit 33074aa

Please sign in to comment.