[Cryptech-Commits] [core/math/modexp] 01/01: Adding more targets for building, linting and simulating submodules.

git at cryptech.is git at cryptech.is
Tue Apr 21 14:16:29 UTC 2015

This is an automated email from the git hooks/post-receive script.

joachim at secworks.se pushed a commit to branch master
in repository core/math/modexp.

commit 13294d20e8f1778594822e058f835614ace4faf7
Author: Joachim Strömbergson <joachim at secworks.se>
Date:   Tue Apr 21 16:16:24 2015 +0200

    Adding more targets for building, linting and simulating submodules.
 toolruns/Makefile | 35 ++++++++++++++++++++---------------
 1 file changed, 20 insertions(+), 15 deletions(-)

diff --git a/toolruns/Makefile b/toolruns/Makefile
index 1662e01..835e2b0 100755
--- a/toolruns/Makefile
+++ b/toolruns/Makefile
@@ -37,25 +37,27 @@
-# tools
+# Tools.
 CC = iverilog
 CCFLAGS = -Wall
 LINT = verilator
 LINTFLAGS = --lint-only -Wall
+# Sources.
+COMMON_SRC = ../src/rtl/adder32.v ../src/rtl/shl32.v ../src/rtl/shr32.v \
+	../src/rtl/blockmem1r1w.v ../src/rtl/blockmem2r1w.v
-# sources
-RESIDUE_TB = ../src/tb/tb_residue.v ../src/rtl/blockmem1r1w.v
-RESIDUE_SRC = ../src/rtl/residue.v ../src/rtl/adder32.v ../src/rtl/shl32.v
+RESIDUE_TB = ../src/tb/tb_residue.v
+RESIDUE_SRC = ../src/rtl/residue.v
 MONTPROD_TB = ../src/tb/tb_montprod.v
-MONTPROD_SRC = ../src/rtl/montprod.v ../src/rtl/adder32.v ../src/rtl/shr32.v ../src/rtl/blockmem1r1w.v
+MONTPROD_SRC = ../src/rtl/montprod.v
-TOP_SRC=../src/rtl/modexp.v  ../src/rtl/blockmem2r1w.v $(MONTPROD_SRC)
+TOP_SRC=../src/rtl/modexp.v $(MONTPROD_SRC) $(RESIDUE_SRC) $(COMMON_SRC)
-# rules
+# Rules.
 all: top.sim montprod.sim residue.sim
@@ -63,12 +65,12 @@ top.sim: $(TOP_TB) $(TOP_SRC)
 	$(CC) $(CCFLAGS) -o top.sim $(TOP_TB) $(TOP_SRC)
-montprod.sim: $(MONTPROD_TB) $(MONTPROD_SRC)
-	$(CC) $(CCFLAGS) -o montprod.sim $(MONTPROD_TB) $(MONTPROD_SRC)
+	$(CC) $(CCFLAGS) -o montprod.sim $(MONTPROD_TB) $(MONTPROD_SRC) $(COMMON_SRC)
-residue.sim: $(RESIDUE_TB) $(RESIDUE_SRC)
-	$(CC) $(CCFLAGS) -o residue.sim $(RESIDUE_TB) $(RESIDUE_SRC)
+residue.sim: $(RESIDUE_TB) $(RESIDUE_SRC) $(COMMON_SRC)
+	$(CC) $(CCFLAGS) -o residue.sim $(RESIDUE_TB) $(RESIDUE_SRC) $(COMMON_SRC)
 sim-top: top.sim
@@ -85,21 +87,22 @@ sim-residue: residue.sim
 	@echo "Linting of montprod:"
+	$(LINT) $(LINTFLAGS) --top-module montprod $(MONTPROD_SRC) $(COMMON_SRC)
 	@echo ""
 	@echo "Linting of residue:"
+	$(LINT) $(LINTFLAGS) --top-module residue $(RESIDUE_SRC) $(COMMON_SRC)
 	@echo ""
 	@echo "Linting of modexp:"
+	$(LINT) $(LINTFLAGS) --top-module modexp $(TOP_SRC)
 	@echo ""
 	rm -f top.sim
 	rm -f montprod.sim
+	rm -f residue.sim
@@ -110,9 +113,11 @@ help:
 	@echo "all:          Build all simulation targets."
 	@echo "lint:         Lint all modules and hierarchies."
 	@echo "top.sim:      Build top level simulation target."
+	@echo "montprod.sim: Build Montgomery product simulation target."
+	@echo "residue.sim:  Build Residue calculation simulation target."
 	@echo "sim-top:      Run top level simulation."
-	@echo "montprod.sim: Build montprod simulation target."
 	@echo "sim-montprod: Run montprod simulation."
+	@echo "sim-residue:  Run residue simulation."
 	@echo "clean:        Delete all built files."

More information about the Commits mailing list