aboutsummaryrefslogtreecommitdiff
path: root/toolruns/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'toolruns/Makefile')
-rw-r--r--toolruns/Makefile19
1 files changed, 17 insertions, 2 deletions
diff --git a/toolruns/Makefile b/toolruns/Makefile
index 63f9035..e70999e 100644
--- a/toolruns/Makefile
+++ b/toolruns/Makefile
@@ -40,14 +40,18 @@ CHACHA_SRC=../../chacha/src/rtl/chacha_core.v ../../chacha/src/rtl/chacha_qr.v
CSPRNG_SRC=../src/rtl/trng_csprng.v ../src/rtl/trng_csprng_fifo.v
TB_CSPRNG_SRC=../src/tb/tb_csprng.v
-SHA512_SRC=../../sha512/src/rtl/sha512_core.v ../../sha512/src/rtl/sha512_h_constants.v ../../sha512/src/rtl/sha512_k_constants.v ../../sha512/src/rtl/sha512_w_mem.v
+SHA512_SRC=../../sha512/src/rtl/sha512_core.v ../../sha512/src/rtl/sha512_h_constants.v ../../sha512/src/rtl/sha512_k_constants.v ../../sha512/src/rtl/sha512_w_mem.v
MIXER_SRC=../src/rtl/trng_mixer.v
TB_MIXER_SRC=../src/tb/tb_mixer.v
+TRNG_SRC=../src/rtl/trng.v $(MIXER_SRC) $(SHA512_SRC) $(CSPRNG_SRC) $(CHACHA_SRC)
+TB_TRNG_SRC=../src/tb/tb_trng.v
+FAKE_ENTROPY_SRC=../src/tb/fake_modules/avalance_entropy.v ../src/tb/fake_modules/pseudo_entropy.v ../src/tb/fake_modules/ringosc_entropy.v
+
CC=iverilog
-all: mixer.sim csprng.sim
+all: trng.sim mixer.sim csprng.sim
csprng.sim: $(TB_CSPRNG_SRC) $(CSPRNG_SRC) $(CHACHA_SRC)
@@ -58,6 +62,10 @@ mixer.sim: $(TB_MIXER_SRC) $(MIXER_SRC) $(SHA512_SRC)
$(CC) -o mixer.sim $(TB_MIXER_SRC) $(MIXER_SRC) $(SHA512_SRC)
+trng.sim: $(TRNG_SRC) $(FAKE_ENTROPY_SRC)
+ $(CC) -o trng.sim $(TB_TRNG_SRC) $(TRNG_SRC) $(FAKE_ENTROPY_SRC)
+
+
sim-csprng: csprng.sim
./csprng.sim
@@ -66,9 +74,14 @@ sim-mixer: mixer.sim
./mixer.sim
+sim-trng: trng.sim
+ ./trng.sim
+
+
clean:
rm -f csprng.sim
rm -f mixer.sim
+ rm -f trng.sim
help:
@@ -79,8 +92,10 @@ help:
@echo "all: Build all simulation targets."
@echo "csprng.sim: Build the csprng simulation target."
@echo "mixer.sim: Build the mixer simulation target."
+ @echo "trng.sim: Build the trng simulation target."
@echo "sim-csprng: Run cprng simulation."
@echo "sim-mixer: Run mixer simulation."
+ @echo "sim-trng: Run trng simulation."
@echo "clean: Delete all built files."
#===================================================================