-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
49 lines (36 loc) · 1.09 KB
/
Makefile
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
46
47
48
# Type 'make formal' to run formal verification
# Type 'make synth' to run synthesis
DUT = fetch
SRC += ../pipe_concat/pipe_concat.vhd
SRC += ../one_stage_buffer/one_stage_buffer.vhd
SRC += ../two_stage_buffer/two_stage_buffer.vhd
SRC += ../two_stage_fifo/two_stage_fifo.vhd
SRC += $(DUT).vhd
#######################
# Formal verification
#######################
.PHONY: formal
formal: $(DUT)_cover/PASS $(DUT)_prove/PASS
$(DUT)_cover/PASS: $(DUT).sby $(DUT).psl $(SRC)
# This is the main command line to run the formal verification
sby --yosys "yosys -m ghdl" -f $(DUT).sby
show_prove:
gtkwave $(DUT)_prove/engine_0/trace_induct.vcd $(DUT).gtkw
#######################
# Synthesis
#######################
.PHONY: synth
synth: work-obj08.cf
yosys -m ghdl -p 'ghdl -fpsl -fsynopsys --std=08 $(DUT); synth_xilinx -top $(DUT) -edif $(DUT).edif' > yosys.log
work-obj08.cf: $(SRC)
ghdl -a -fpsl -fsynopsys --std=08 $^
#######################
# Cleanup
#######################
.PHONY: clean
clean:
rm -rf $(DUT)_cover/
rm -rf $(DUT)_prove/
rm -rf work-obj08.cf
rm -rf yosys.log
rm -rf $(DUT).edif