-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (46 loc) · 1.91 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
49
50
51
52
53
54
55
56
57
58
59
60
61
# To compile additional files, add them to the TESTBENCH or SIMFILES as needed
# Every .vg file will need its own rule and one or more synthesis scripts
# The information contained here (in the rules for those vg files) will be
# similar to the information in those scripts but that seems hard to avoid.
#
# added "SW_VCS=2011.03 and "-full64" option -- awdeorio fall 2011
# added "-sverilog" and "SW_VCS=2012.09" option,
# and removed deprecated Virsim references -- jbbeau fall 2013
# updated library path name -- jbbeau fall 2013
VCS = SW_VCS=2017.12-SP2-1 vcs +v2k -sverilog +vc -Mupdate -line -full64
LIB = /afs/umich.edu/class/eecs470/lib/verilog/lec25dscc25.v
all: simv
./simv | tee program.out
#####
# Modify starting here
#####
TESTBENCH = PU_test.sv
SIMFILES = sys_defs.svh controller.sv sc_counter.sv one_counter.sv ESL_adder.sv P2B.sv LFSR.sv SNG.sv ESL_bipolar_divider.sv ESL_divider.sv ESL_multiplier.sv index_counter.sv partial_result_buffer.sv processing_element.sv processing_unit.sv
SYNFILES = outputs/processing_unit.vg
SCRIPT = scripts/script.tcl
SYN_OUTPUT = outputs/synth.out
$(SYNFILES): $(SCRIPT)
dc_shell-t -f $(SCRIPT) | tee $(SYN_OUTPUT)
#####
# Should be no need to modify after here
#####
sim: simv $(ASSEMBLED)
./simv | tee sim_program.out
simv: $(HEADERS) $(SIMFILES) $(TESTBENCH)
$(VCS) $^ -o simv
.PHONY: sim
# updated interactive debugger "DVE", using the latest version of VCS
# awdeorio fall 2011
dve: $(SIMFILES) $(TESTBENCH)
$(VCS) +memcbk $(TESTBENCH) $(SIMFILES) -o dve -R -gui
syn_simv: $(SYNFILES) $(TESTBENCH)
$(VCS) $(TESTBENCH) $(SYNFILES) $(LIB) -o syn_simv
syn: syn_simv
./syn_simv | tee syn_program.out
clean:
rm -rvf simv *.daidir csrc vcs.key program.out \
syn_simv syn_simv.daidir syn_program.out \
dve *.vpd *.vcd *.dump ucli.key *.log *.svf
nuke: clean
rm -rvf *.vg *.rep *.db *.chk *.log *.out *.ddc *.svf DVEfiles/ reports/* outputs/*
.PHONY: dve clean nuke