From 3c5b0ab1641409a09252b488c7f08ced631753d8 Mon Sep 17 00:00:00 2001 From: "N. Engelhardt" Date: Fri, 1 Dec 2023 10:47:39 +0100 Subject: [PATCH] fix test setup for synth_quicklogic memory tests --- tests/arch/quicklogic/qlf_k6n10f/bram_tdp.ys | 5 +- .../arch/quicklogic/qlf_k6n10f/bram_tdp_tb.v | 2 +- .../quicklogic/qlf_k6n10f/gen_memories.py | 47 +++++++------------ tests/arch/quicklogic/qlf_k6n10f/mem_tb.v | 2 +- tests/arch/quicklogic/qlf_k6n10f/run-test.sh | 1 + 5 files changed, 21 insertions(+), 36 deletions(-) diff --git a/tests/arch/quicklogic/qlf_k6n10f/bram_tdp.ys b/tests/arch/quicklogic/qlf_k6n10f/bram_tdp.ys index 635769cc0..ccce5882f 100644 --- a/tests/arch/quicklogic/qlf_k6n10f/bram_tdp.ys +++ b/tests/arch/quicklogic/qlf_k6n10f/bram_tdp.ys @@ -1,8 +1,7 @@ read_verilog bram_tdp.v hierarchy -top BRAM_TDP synth_quicklogic -family qlf_k6n10f -read_verilog +/quicklogic/qlf_k6n10f/brams_sim.v +/quicklogic/qlf_k6n10f/sram1024x18_mem.v +/quicklogic/qlf_k6n10f/ufifo_ctl.v +/quicklogic/qlf_k6n10f/TDP18K_FIFO.v read_verilog -formal bram_tdp_tb.v -hierarchy -top TB -proc +read_verilog -overwrite +/quicklogic/common/cells_sim.v +/quicklogic/qlf_k6n10f/cells_sim.v +/quicklogic/qlf_k6n10f/brams_sim.v +/quicklogic/qlf_k6n10f/sram1024x18_mem.v +/quicklogic/qlf_k6n10f/ufifo_ctl.v +/quicklogic/qlf_k6n10f/TDP18K_FIFO.v +prep -top TB sim -clock clk -n 20 -assert # -vcd bram_tdp.vcd diff --git a/tests/arch/quicklogic/qlf_k6n10f/bram_tdp_tb.v b/tests/arch/quicklogic/qlf_k6n10f/bram_tdp_tb.v index 5d4fbe067..351c334d0 100644 --- a/tests/arch/quicklogic/qlf_k6n10f/bram_tdp_tb.v +++ b/tests/arch/quicklogic/qlf_k6n10f/bram_tdp_tb.v @@ -57,7 +57,7 @@ wire [DATA_WIDTH-1:0] wd_a = wd_a_testvector[i]; wire rce_b = rce_b_testvector[i]; wire [ADDR_WIDTH-1:0] ra_b = ra_b_testvector[i]; -wire [DATA_WIDTH-1:0] rq_b = rq_b_expected[i]; +wire [DATA_WIDTH-1:0] rq_b; wire wce_b = wce_b_testvector[i]; wire [ADDR_WIDTH-1:0] wa_b = wa_b_testvector[i]; diff --git a/tests/arch/quicklogic/qlf_k6n10f/gen_memories.py b/tests/arch/quicklogic/qlf_k6n10f/gen_memories.py index 631289800..1d596b3c7 100644 --- a/tests/arch/quicklogic/qlf_k6n10f/gen_memories.py +++ b/tests/arch/quicklogic/qlf_k6n10f/gen_memories.py @@ -4,11 +4,11 @@ from dataclasses import dataclass blockram_template = """# ====================================== +log ** GENERATING TEST {top} WITH PARAMS{param_str} design -reset; read_verilog -defer ../../common/blockram.v chparam{param_str} {top} hierarchy -top {top} -synth_quicklogic -family qlf_k6n10f -top {top}; cd {top} -log ** TESTING {top} WITH PARAMS{param_str}\ +synth_quicklogic -family qlf_k6n10f -top {top} """ blockram_tests: "list[tuple[list[tuple[str, int]], str, list[str]]]" = [ # TDP36K = 1024x36bit RAM, 2048x18bit or 4096x9bit also work @@ -103,8 +103,10 @@ blockram_tests: "list[tuple[list[tuple[str, int]], str, list[str]]]" = [ ] sim_template = """\ -cd -read_verilog +/quicklogic/qlf_k6n10f/brams_sim.v +/quicklogic/qlf_k6n10f/sram1024x18_mem.v +/quicklogic/qlf_k6n10f/ufifo_ctl.v +/quicklogic/qlf_k6n10f/TDP18K_FIFO.v +design -stash synthesized +design -copy-from synthesized -as {top}_synth {top} +design -delete synthesized +read_verilog +/quicklogic/common/cells_sim.v +/quicklogic/qlf_k6n10f/cells_sim.v +/quicklogic/qlf_k6n10f/brams_sim.v +/quicklogic/qlf_k6n10f/sram1024x18_mem.v +/quicklogic/qlf_k6n10f/ufifo_ctl.v +/quicklogic/qlf_k6n10f/TDP18K_FIFO.v read_verilog <