From 215a777eb32ea2c1d688b800af50e13c2851417b Mon Sep 17 00:00:00 2001
From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com>
Date: Mon, 4 Dec 2023 09:24:19 +1300
Subject: [PATCH] qlf_tests: minor adjustment

Renamed python script so that it sits next to the testbench file when alphabetically sorted.
Reverted `MAX_WIDTH` to full precision for truncation testing.
---
 .../quicklogic/qlf_k6n10f/{gen_memories.py => mem_gen.py}    | 0
 tests/arch/quicklogic/qlf_k6n10f/mem_tb.v                    | 5 ++++-
 tests/arch/quicklogic/qlf_k6n10f/run-test.sh                 | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)
 rename tests/arch/quicklogic/qlf_k6n10f/{gen_memories.py => mem_gen.py} (100%)

diff --git a/tests/arch/quicklogic/qlf_k6n10f/gen_memories.py b/tests/arch/quicklogic/qlf_k6n10f/mem_gen.py
similarity index 100%
rename from tests/arch/quicklogic/qlf_k6n10f/gen_memories.py
rename to tests/arch/quicklogic/qlf_k6n10f/mem_gen.py
diff --git a/tests/arch/quicklogic/qlf_k6n10f/mem_tb.v b/tests/arch/quicklogic/qlf_k6n10f/mem_tb.v
index 89e41f8bc..a0d15bd62 100644
--- a/tests/arch/quicklogic/qlf_k6n10f/mem_tb.v
+++ b/tests/arch/quicklogic/qlf_k6n10f/mem_tb.v
@@ -8,7 +8,10 @@ parameter DATA_WIDTH_A = DATA_WIDTH;
 parameter DATA_WIDTH_B = DATA_WIDTH;
 parameter VECTORLEN = 16;
 parameter SHIFT_VAL = 0;
-localparam MAX_WIDTH = DATA_WIDTH;
+
+// intentionally keep expected values at full width precision to allow testing
+// of truncation
+localparam MAX_WIDTH = 36;
 
 reg rce_a_testvector [VECTORLEN-1:0];
 reg [ADDRESS_WIDTH_A-1:0] ra_a_testvector [VECTORLEN-1:0];
diff --git a/tests/arch/quicklogic/qlf_k6n10f/run-test.sh b/tests/arch/quicklogic/qlf_k6n10f/run-test.sh
index be16b7829..2fe336194 100755
--- a/tests/arch/quicklogic/qlf_k6n10f/run-test.sh
+++ b/tests/arch/quicklogic/qlf_k6n10f/run-test.sh
@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
 set -eu
-python3 gen_memories.py
+python3 mem_gen.py
 source ../../../gen-tests-makefile.sh
 run_tests --yosys-scripts --bash