From ba098662173bc6052c7d28617813c27f1bc1ce37 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Thu, 30 Nov 2023 11:41:41 +1300 Subject: [PATCH] quicklogic: testing port widths on split rams --- .../arch/quicklogic/qlf_k6n10f/gen_memories.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/arch/quicklogic/qlf_k6n10f/gen_memories.py b/tests/arch/quicklogic/qlf_k6n10f/gen_memories.py index 7dcf2bc89..3b23254a7 100644 --- a/tests/arch/quicklogic/qlf_k6n10f/gen_memories.py +++ b/tests/arch/quicklogic/qlf_k6n10f/gen_memories.py @@ -84,11 +84,29 @@ blockram_tests: "list[tuple[list[tuple[str, int]], str, list[str]]]" = [ # but only if data width is <= 18 ([("ADDRESS_WIDTH_A", 9), ("DATA_WIDTH_A", 36), ("ADDRESS_WIDTH_B", 11), ("DATA_WIDTH_B", 9)], "double_sync_ram_sdp", ["-assert-count 2 t:TDP36K"]), + # sharing a TDP36K sets is_split=1 ([("ADDRESS_WIDTH_A", 10), ("DATA_WIDTH_A", 18), ("ADDRESS_WIDTH_B", 10), ("DATA_WIDTH_B", 18)], "double_sync_ram_sdp", ["-assert-count 1 t:TDP36K a:is_split=1 %i"]), # an unshared TDP36K sets is_split=0 ([("ADDRESS_WIDTH", 10), ("DATA_WIDTH", 36)], "sync_ram_*dp", ["-assert-count 1 t:TDP36K a:is_split=0 %i"]), + + # sharing a TDP36K sets correct port widths + ([("ADDRESS_WIDTH_A", 10), ("DATA_WIDTH_A", 18), ("DATA_WIDTH_B", 18), ("ADDRESS_WIDTH_B", 10)], "double_sync_ram_sdp", + ["-assert-count 1 t:TDP36K a:port_a1_width=18 %i a:port_a2_width=18 %i", + "-assert-count 1 t:TDP36K"]), + ([("ADDRESS_WIDTH_A", 10), ("DATA_WIDTH_A", 16), ("DATA_WIDTH_B", 8), ("ADDRESS_WIDTH_B", 11)], "double_sync_ram_sdp", + ["-assert-count 1 t:TDP36K a:port_a1_width=18 %i a:port_a2_width=9 %i " + + "t:TDP36K a:port_a2_width=18 %i a:port_a1_width=9 %i %u", + "-assert-count 1 t:TDP36K"]), + ([("ADDRESS_WIDTH_A", 12), ("DATA_WIDTH_A", 4), ("DATA_WIDTH_B", 12), ("ADDRESS_WIDTH_B", 10)], "double_sync_ram_sdp", + ["-assert-count 1 t:TDP36K a:port_a1_width=4 %i a:port_a2_width=18 %i " + + "t:TDP36K a:port_a2_width=4 %i a:port_a1_width=18 %i %u", + "-assert-count 1 t:TDP36K"]), + ([("ADDRESS_WIDTH_A", 13), ("DATA_WIDTH_A", 2), ("DATA_WIDTH_B", 1), ("ADDRESS_WIDTH_B", 14)], "double_sync_ram_sdp", + ["-assert-count 1 t:TDP36K a:port_a1_width=2 %i a:port_a2_width=1 %i " + + "t:TDP36K a:port_a2_width=2 %i a:port_a1_width=1 %i %u", + "-assert-count 1 t:TDP36K"]), ] with open("t_mem.ys", mode="w") as f: