-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (24 loc) · 705 Bytes
/
Makefile
File metadata and controls
32 lines (24 loc) · 705 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
PROG = "Program Name"
TIME = $$(date +'%Y%m%d-%H%M%S')
TOOLCMD = iverilog -o sim.vvp
help:
@echo "Display related to the program"
compile: clean
$(TOOLCMD) -s $(PROG) $(PROG).sv
lint: clean
verilator --lint-only -Wall $(PROG).sv
sim: clean
$(TOOLCMD) -s $(PROG)_tb $(PROG).sv $(PROG)_tb.sv
./sim.vvp
gtkwave $(PROG).vcd &
build: clean
touch synth.ys
echo "read -sv $(PROG).sv" > synth.ys
echo "hierarchy -top $(PROG)" >> synth.ys
echo "proc; opt; techmap; opt" >> synth.ys
echo "write_verilog synth.v" >> synth.ys
echo "show -prefix $(PROG) -colors $(TIME)" >> synth.ys
synth: build
yosys synth.ys
clean:
rm -rf sim.vvp synth.ys synth.v $(PROG).dot $(PROG).dot.pid $(PROG).vcd