From aa28538891b740599a17bb4af43edfba3e3ae2fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se> Date: Sat, 29 Oct 2022 22:42:08 +0200 Subject: [PATCH] Move mul_3w64, mul_4w64 and mul_6w64 modules to arith/lib. --- hw/Makefile | 6 ++---- hw/arith/Makefile | 3 ++- hw/{mul-3w64.vl => arith/lib/mul_3w64.v} | 0 hw/{mul-4w64.vl => arith/lib/mul_4w64.v} | 0 hw/{mul-6w64.vl => arith/lib/mul_6w64.v} | 0 hw/{mul64-tb.vl => arith/mul64-tb.v} | 0 hw/{mul-3w64-tb.vl => arith/mul_3w64-test.v} | 4 +--- hw/{mul-4w64-tb.vl => arith/mul_4w64-test.v} | 4 +--- hw/{mul-6w64-tb.vl => arith/mul_6w64-test.v} | 4 +--- hw/cpu-all.vl | 2 -- 10 files changed, 7 insertions(+), 16 deletions(-) rename hw/{mul-3w64.vl => arith/lib/mul_3w64.v} (100%) rename hw/{mul-4w64.vl => arith/lib/mul_4w64.v} (100%) rename hw/{mul-6w64.vl => arith/lib/mul_6w64.v} (100%) rename hw/{mul64-tb.vl => arith/mul64-tb.v} (100%) rename hw/{mul-3w64-tb.vl => arith/mul_3w64-test.v} (93%) rename hw/{mul-4w64-tb.vl => arith/mul_4w64-test.v} (93%) rename hw/{mul-6w64-tb.vl => arith/mul_6w64-test.v} (93%) diff --git a/hw/Makefile b/hw/Makefile index 32f2866..89f783b 100644 --- a/hw/Makefile +++ b/hw/Makefile @@ -7,7 +7,7 @@ TARGETS = main all: $(TARGETS) -TESTS = mul-3w64-tb mul-4w64-tb mul-6w64-tb srt-reciprocal-tb reciprocal-tb \ +TESTS = srt-reciprocal-tb reciprocal-tb \ reg-file-tb reg-file-ice40-tb shift-unit-tb alu-unit-tb check: all $(TESTS) @@ -67,8 +67,7 @@ logic-analyzer-example.asc: logic-analyzer-example.json txd.pcf nextpnr-ice40 --hx8k --package ct256 \ --json $< --pcf txd.pcf --asc $@ -stats: mul-3w64.stats mul-4w64.stats \ - srt-reciprocal.stats \ +stats: srt-reciprocal.stats \ instr-fetch.stats instr-decode.stats \ reg-file.stats reg-file-ice40.stats \ cnt-unit.stats alu-unit.stats mem-mux.stats \ @@ -80,7 +79,6 @@ stats: mul-3w64.stats mul-4w64.stats \ $(YOSYS_STATS) $^ -L $@ srt-reciprocal.stats: srt-reciprocal.vl -mul-unit.stats: mul3-stage.vl mul-3w64.vl mul4-stage.vl mul-4w64.vl mul-unit.stats: STATS_FLAGS = -top mul_unit reciprocal-unit.stats: srt-reciprocal.vl reciprocal.vl diff --git a/hw/arith/Makefile b/hw/arith/Makefile index d76f310..b810b9a 100644 --- a/hw/arith/Makefile +++ b/hw/arith/Makefile @@ -8,7 +8,8 @@ TARGETS = dadda-tree TESTS = add_ha-test add_fa-test add_bk4-test add_bk8-test add_bk8s-test \ add_h64-test add_bk16-test carry_only-test \ umul4-test umul8-test ctz-test popc-test genmask-test \ - mul3_stage-test mul4_stage-test mul6_stage-test + mul3_stage-test mul4_stage-test mul6_stage-test \ + mul_3w64-test mul_4w64-test mul_6w64-test all: $(TARGETS) diff --git a/hw/mul-3w64.vl b/hw/arith/lib/mul_3w64.v similarity index 100% rename from hw/mul-3w64.vl rename to hw/arith/lib/mul_3w64.v diff --git a/hw/mul-4w64.vl b/hw/arith/lib/mul_4w64.v similarity index 100% rename from hw/mul-4w64.vl rename to hw/arith/lib/mul_4w64.v diff --git a/hw/mul-6w64.vl b/hw/arith/lib/mul_6w64.v similarity index 100% rename from hw/mul-6w64.vl rename to hw/arith/lib/mul_6w64.v diff --git a/hw/mul64-tb.vl b/hw/arith/mul64-tb.v similarity index 100% rename from hw/mul64-tb.vl rename to hw/arith/mul64-tb.v diff --git a/hw/mul-3w64-tb.vl b/hw/arith/mul_3w64-test.v similarity index 93% rename from hw/mul-3w64-tb.vl rename to hw/arith/mul_3w64-test.v index e0e9c5a..6fa1bd1 100644 --- a/hw/mul-3w64-tb.vl +++ b/hw/arith/mul_3w64-test.v @@ -14,8 +14,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -`include "mul-3w64.vl" - `define MUL64_MODULE mul_3w64 -`include "mul64-tb.vl" +`include "mul64-tb.v" diff --git a/hw/mul-4w64-tb.vl b/hw/arith/mul_4w64-test.v similarity index 93% rename from hw/mul-4w64-tb.vl rename to hw/arith/mul_4w64-test.v index 0cf46ee..5fe3409 100644 --- a/hw/mul-4w64-tb.vl +++ b/hw/arith/mul_4w64-test.v @@ -14,8 +14,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -`include "mul-4w64.vl" - `define MUL64_MODULE mul_4w64 -`include "mul64-tb.vl" +`include "mul64-tb.v" diff --git a/hw/mul-6w64-tb.vl b/hw/arith/mul_6w64-test.v similarity index 93% rename from hw/mul-6w64-tb.vl rename to hw/arith/mul_6w64-test.v index 50ec0dc..ad5e3f2 100644 --- a/hw/mul-6w64-tb.vl +++ b/hw/arith/mul_6w64-test.v @@ -14,8 +14,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -`include "mul-6w64.vl" - `define MUL64_MODULE mul_6w64 -`include "mul64-tb.vl" +`include "mul64-tb.v" diff --git a/hw/cpu-all.vl b/hw/cpu-all.vl index 0711b2d..543f42e 100644 --- a/hw/cpu-all.vl +++ b/hw/cpu-all.vl @@ -18,10 +18,8 @@ `include "mem-mux.vl" `ifdef ICE40 `include "reg-file-ice40.vl" - `include "mul-3w64.vl" `else `include "reg-file.vl" - `include "mul-4w64.vl" `endif `include "alu-unit.vl" `include "unary-unit.vl" -- GitLab