-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
48 lines (39 loc) · 970 Bytes
/
makefile
File metadata and controls
48 lines (39 loc) · 970 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
46
47
48
VCS=#VCS This can be adapted to `iverilog`
VCSARGS=+incdir+../src +incdir+../tb
DC=#DC Compiler
DCARGS=-topographic
BUILDDIR=build
SYNDIR=syn
.PHONY: simtrigger
simtrigger: sim
sim:
mkdir -p $(BUILDDIR)
tb_ff_reset: simtrigger
cd $(BUILDDIR)/ &&\
$(VCS) $(VCSARGS) ../tb/ff/tb_ff_reset.v &&\
./simv
tb_ff_reset_enable: simtrigger
cd $(BUILDDIR)/ &&\
$(VCS) $(VCSARGS) ../tb/ff/tb_ff_reset_enable.v &&\
./simv
tb_adder: simtrigger
cd $(BUILDDIR)/ &&\
$(VCS) $(VCSARGS) ../tb/tb_adder.v &&\
./simv
tb_alu: simtrigger
cd $(BUILDDIR)/ &&\
$(VCS) $(VCSARGS) ../tb/tb_alu.v &&\
./simv
tb_top: simtrigger
cd $(BUILDDIR)/ &&\
$(VCS) $(VCSARGS) ../tb/tb_top.v &&\
./simv
synthesis: simtrigger tb_top
cd $(SYNDIR) &&\
echo -e 'source ./synthesis.tcl' | $(DC) $(DCARGS)
clean:
rm -r \
$(BUILDDIR) sxcmd.log* \
$(SYNDIR)/*.log $(SYNDIR)/design_lib \
$(SYNDIR)/reports $(SYNDIR)/results $(SYNDIR)/alib-52 \
*.log cds.lib .cadence