summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9e8bcca..e7fc552 100644
--- a/Makefile
+++ b/Makefile
@@ -48,7 +48,10 @@ flash: $(PROGRAM).fs
openFPGALoader -b tangnano9k $(FLASH_OPTS) $(PROGRAM).fs
clean:
- rm -rf *.json *.fs *.svg *.log *.dep
+ rm -rf *.json *.fs *.svg *.log *.dep *.vvp *.lxt2
+
+simu: $(PROGRAM).lxt2
+ gtkwave $<
## Patterns
@@ -80,6 +83,14 @@ clean:
%.fs: %.pnr.json
gowin_pack -d $(DEVICE_FAMILY) -o $@ $<
+### simulation
+
+%.lxt2: %.vvp
+ ./$< -lxt2
+
+%.vvp: %.v %.tb.v
+ iverilog -o $*.vvp $*.v $*.tb.v
+
## inter-file dependencies
-include $(DEPS)
-include $($(wildcard *.fs:.fs=.dep)