forked from chipsalliance/chisel-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (38 loc) · 1003 Bytes
/
Makefile
File metadata and controls
45 lines (38 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
SBT ?= sbt
# Generate Verilog code
help:
@echo ""
@echo "run-help"
@echo " look test help"
@echo ""
@echo "gen-vcd"
@echo " genarate VCD file"
@echo ""
@echo "verilator-sim"
@echo " use verilator simulation"
@echo ""
@echo "wave-view"
@echo " use gtkwave debug wave"
@echo ""
@echo "synth"
@echo " use yosys synthesize verilog"
@echo ""
@echo "clean"
@echo " delect intermediate data"
@echo ""
run-help:
$(SBT) 'test:runMain gcd.GCDMain --help'
gen-vcd:
$(SBT) 'test:runMain gcd.GCDMain --generate-vcd-output on'
verilator-sim:
$(SBT) 'test:runMain gcd.GCDMain --backend-name verilator'
vcdFile := $(shell ls -lt test_run_dir/*/* | grep GCD.vcd | head -n 1 | awk '{print $$9}')
wave-view: gen-vcd $(vcdFile)
gtkwave ${vcdFile}
verilogFile := $(shell ls -lt test_run_dir/*/* | grep GCD.v$$ | head -n 1 | awk '{print $$9}')
synth: $(verilogFile)
cp ${verilogFile} rtl/
yosys script/rtl2vsclib.ys
clean:
-rm -rf project target
-rm -rf test_run_dir