Skip to content

Commit 18ae57c

Browse files
committed
Merge branch 'bug_fixes'
2 parents b48b605 + a760d90 commit 18ae57c

38 files changed

+1316
-788
lines changed

ci/regression.sh.in

+5-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ regression()
105105
./ci/blackbox.sh --driver=simx --app=vecadd --rebuild=3
106106

107107
# test for matmul
108-
CONFIGS="-DTC_NUM=4 -DTC_SIZE=8" ./ci/blackbox.sh --cores=4 --app=matmul --driver=simx --threads=32 --warps=32 --args="-n128 -d1"
108+
CONFIGS="-DTC_NUM=4 -DTC_SIZE=8" ./ci/blackbox.sh --cores=4 --app=matmul --driver=simx --threads=32 --warps=32 --args="-n128 -d1"
109109

110110
echo "regression tests done!"
111111
}
@@ -322,6 +322,10 @@ config2()
322322
CONFIGS="-DPLATFORM_MEMORY_INTERLEAVE=1" ./ci/blackbox.sh --driver=opae --app=mstress
323323
CONFIGS="-DPLATFORM_MEMORY_INTERLEAVE=0" ./ci/blackbox.sh --driver=opae --app=mstress
324324

325+
# test memory ports
326+
CONFIGS="-DPLATFORM_MEMORY_BANKS=2" ./ci/blackbox.sh --driver=simx --app=demo
327+
CONFIGS="-DPLATFORM_MEMORY_BANKS=2" ./ci/blackbox.sh --driver=simx --app=demo --threads=32
328+
325329
echo "configuration-2 tests done!"
326330
}
327331

hw/rtl/VX_config.vh

+36-16
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
`ifndef VX_CONFIG_VH
1515
`define VX_CONFIG_VH
1616

17-
18-
1917
`ifndef MIN
2018
`define MIN(x, y) (((x) < (y)) ? (x) : (y))
2119
`endif
@@ -170,8 +168,8 @@
170168
`define L3_LINE_SIZE `MEM_BLOCK_SIZE
171169
`endif
172170

173-
`ifndef MEMORY_BANKS
174-
`define MEMORY_BANKS 2
171+
`ifndef PLATFORM_MEMORY_BANKS
172+
`define PLATFORM_MEMORY_BANKS 1
175173
`endif
176174

177175
`ifdef XLEN_64
@@ -193,7 +191,7 @@
193191
`endif
194192

195193
`ifdef VM_ENABLE
196-
`ifndef PAGE_TABLE_BASE_ADDR
194+
`ifndef PAGE_TABLE_BASE_ADDR
197195
`define PAGE_TABLE_BASE_ADDR 64'h0F0000000
198196
`endif
199197

@@ -218,7 +216,7 @@
218216
`endif
219217

220218
`ifdef VM_ENABLE
221-
`ifndef PAGE_TABLE_BASE_ADDR
219+
`ifndef PAGE_TABLE_BASE_ADDR
222220
`define PAGE_TABLE_BASE_ADDR 32'hF0000000
223221
`endif
224222

@@ -303,13 +301,13 @@
303301
`ifndef VM_ADDR_MODE
304302
`define VM_ADDR_MODE SV32 //or BARE
305303
`endif
306-
`ifndef PT_LEVEL
304+
`ifndef PT_LEVEL
307305
`define PT_LEVEL (2)
308306
`endif
309307
`ifndef PTE_SIZE
310308
`define PTE_SIZE (4)
311309
`endif
312-
`ifndef NUM_PTE_ENTRY
310+
`ifndef NUM_PTE_ENTRY
313311
`define NUM_PTE_ENTRY (1024)
314312
`endif
315313
`ifndef PT_SIZE_LIMIT
@@ -319,13 +317,13 @@
319317
`ifndef VM_ADDR_MODE
320318
`define VM_ADDR_MODE SV39 //or BARE
321319
`endif
322-
`ifndef PT_LEVEL
320+
`ifndef PT_LEVEL
323321
`define PT_LEVEL (3)
324322
`endif
325323
`ifndef PTE_SIZE
326324
`define PTE_SIZE (8)
327325
`endif
328-
`ifndef NUM_PTE_ENTRY
326+
`ifndef NUM_PTE_ENTRY
329327
`define NUM_PTE_ENTRY (512)
330328
`endif
331329
`ifndef PT_SIZE_LIMIT
@@ -604,7 +602,7 @@
604602

605603
// Number of Banks
606604
`ifndef DCACHE_NUM_BANKS
607-
`define DCACHE_NUM_BANKS `MIN(`NUM_LSU_LANES, 4)
605+
`define DCACHE_NUM_BANKS `MIN(DCACHE_NUM_REQS, 16)
608606
`endif
609607

610608
// Core Response Queue Size
@@ -647,6 +645,15 @@
647645
`define DCACHE_REPL_POLICY 1
648646
`endif
649647

648+
// Number of Memory Ports
649+
`ifndef L1_MEM_PORTS
650+
`ifdef L1_DISABLE
651+
`define L1_MEM_PORTS `MIN(DCACHE_NUM_REQS, `PLATFORM_MEMORY_BANKS)
652+
`else
653+
`define L1_MEM_PORTS `MIN(`DCACHE_NUM_BANKS, `PLATFORM_MEMORY_BANKS)
654+
`endif
655+
`endif
656+
650657
// LMEM Configurable Knobs ////////////////////////////////////////////////////
651658

652659
`ifndef LMEM_DISABLE
@@ -674,7 +681,7 @@
674681

675682
// Number of Banks
676683
`ifndef L2_NUM_BANKS
677-
`define L2_NUM_BANKS `MIN(4, `NUM_SOCKETS)
684+
`define L2_NUM_BANKS `MIN(L2_NUM_REQS, 16)
678685
`endif
679686

680687
// Core Response Queue Size
@@ -717,6 +724,15 @@
717724
`define L2_REPL_POLICY 1
718725
`endif
719726

727+
// Number of Memory Ports
728+
`ifndef L2_MEM_PORTS
729+
`ifdef L2_ENABLE
730+
`define L2_MEM_PORTS `MIN(`L2_NUM_BANKS, `PLATFORM_MEMORY_BANKS)
731+
`else
732+
`define L2_MEM_PORTS `MIN(L2_NUM_REQS, `PLATFORM_MEMORY_BANKS)
733+
`endif
734+
`endif
735+
720736
// L3cache Configurable Knobs /////////////////////////////////////////////////
721737

722738
// Cache Size
@@ -726,7 +742,7 @@
726742

727743
// Number of Banks
728744
`ifndef L3_NUM_BANKS
729-
`define L3_NUM_BANKS `MIN(8, `NUM_CLUSTERS)
745+
`define L3_NUM_BANKS `MIN(L3_NUM_REQS, 16)
730746
`endif
731747

732748
// Core Response Queue Size
@@ -769,9 +785,13 @@
769785
`define L3_REPL_POLICY 1
770786
`endif
771787

772-
// Number of Memory Ports from LLC
773-
`ifndef NUM_MEM_PORTS
774-
`define NUM_MEM_PORTS `MIN(`MEMORY_BANKS, `L3_NUM_BANKS)
788+
// Number of Memory Ports
789+
`ifndef L3_MEM_PORTS
790+
`ifdef L3_ENABLE
791+
`define L3_MEM_PORTS `MIN(`L3_NUM_BANKS, `PLATFORM_MEMORY_BANKS)
792+
`else
793+
`define L3_MEM_PORTS `MIN(L3_NUM_REQS, `PLATFORM_MEMORY_BANKS)
794+
`endif
775795
`endif
776796

777797
// ISA Extensions /////////////////////////////////////////////////////////////

hw/rtl/VX_platform.vh

+3
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ endgenerate
163163
`define USE_BLOCK_BRAM (* ramstyle = "block" *)
164164
`define USE_FAST_BRAM (* ramstyle = "MLAB, no_rw_check" *)
165165
`define NO_RW_RAM_CHECK (* altera_attribute = "-name add_pass_through_logic_to_inferred_rams off" *)
166+
`define RW_RAM_CHECK (* altera_attribute = "-name add_pass_through_logic_to_inferred_rams on" *)
166167
`define DISABLE_BRAM (* ramstyle = "logic" *)
167168
`define PRESERVE_NET (* preserve *)
168169
`define BLACKBOX_CELL (* black_box *)
@@ -173,6 +174,7 @@ endgenerate
173174
`define USE_BLOCK_BRAM (* ram_style = "block" *)
174175
`define USE_FAST_BRAM (* ram_style = "distributed" *)
175176
`define NO_RW_RAM_CHECK (* rw_addr_collision = "no" *)
177+
`define RW_RAM_CHECK (* rw_addr_collision = "yes" *)
176178
`define DISABLE_BRAM (* ram_style = "registers" *)
177179
`define PRESERVE_NET (* keep = "true" *)
178180
`define BLACKBOX_CELL (* black_box *)
@@ -183,6 +185,7 @@ endgenerate
183185
`define USE_BLOCK_BRAM
184186
`define USE_FAST_BRAM
185187
`define NO_RW_RAM_CHECK
188+
`define RW_RAM_CHECK
186189
`define DISABLE_BRAM
187190
`define PRESERVE_NET
188191
`define BLACKBOX_CELL

hw/rtl/core/VX_mem_unit.sv

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module VX_mem_unit import VX_gpu_pkg::*; #(
4747

4848
for (genvar i = 0; i < `NUM_LSU_BLOCKS; ++i) begin : g_lmem_switches
4949
VX_lmem_switch #(
50-
.REQ0_OUT_BUF (3),
50+
.REQ0_OUT_BUF (1),
5151
.REQ1_OUT_BUF (0),
5252
.RSP_OUT_BUF (1),
5353
.ARBITER ("P")
@@ -78,7 +78,7 @@ module VX_mem_unit import VX_gpu_pkg::*; #(
7878
.TAG_SEL_BITS (LSU_TAG_WIDTH - `UUID_WIDTH),
7979
.ARBITER ("P"),
8080
.REQ_OUT_BUF (3),
81-
.RSP_OUT_BUF (0)
81+
.RSP_OUT_BUF (2)
8282
) lmem_adapter (
8383
.clk (clk),
8484
.reset (reset),

0 commit comments

Comments
 (0)