From 13294d20e8f1778594822e058f835614ace4faf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Stro=CC=88mbergson?= Date: Tue, 21 Apr 2015 16:16:24 +0200 Subject: Adding more targets for building, linting and simulating submodules. --- toolruns/Makefile | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'toolruns') 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) TOP_TB=../src/tb/tb_modexp.v -# 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) +montprod.sim: $(MONTPROD_TB) $(MONTPROD_SRC) $(COMMON_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 lint: @echo "Linting of montprod:" - $(LINT) $(LINTFLAGS) $(MONTPROD_SRC) + $(LINT) $(LINTFLAGS) --top-module montprod $(MONTPROD_SRC) $(COMMON_SRC) @echo "" @echo "Linting of residue:" - $(LINT) $(LINTFLAGS) $(RESIDUE_SRC) + $(LINT) $(LINTFLAGS) --top-module residue $(RESIDUE_SRC) $(COMMON_SRC) @echo "" @echo "Linting of modexp:" - $(LINT) $(LINTFLAGS) $(TOP_SRC) + $(LINT) $(LINTFLAGS) --top-module modexp $(TOP_SRC) @echo "" clean: rm -f top.sim rm -f montprod.sim + rm -f residue.sim help: @@ -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." #=================================================================== -- cgit v1.2.3