Makefile
4.05 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#!smake -J 3
#
#
PRDEPTH = ../../../../..
include $(PRDEPTH)/PRdefs
LVCSOPTS = -y . \
-y $(PRDEPTH)/hw/chip/rcp/st/src \
-y $(PRDEPTH)/hw/chip/rcp/rdp/src \
-y $(PRDEPTH)/hw/chip/lib/verilog/sc \
-y $(PRDEPTH)/hw/chip/lib/verilog/ram \
-v $(PRDEPTH)/hw/chip/lib/verilog/udp/compass_udps.v \
+libext+.v+.vzd \
+incdir+$(PRDEPTH)/hw/chip/rcp/inc
LDIRT = driver*.v *.mem *.out vcs.log *.dump st_all??? *.tab simv*
TESTS = st_all000 st_all001 st_all004 st_all005 st_all006
FAST = fast000 fast001 fast004 fast005 fast006
ERROR = \
@if grep "ERROR IN SIMULATION" FILE ; \
then echo ""; \
else \
echo "NO ERRORS IN SIMULATION"; \
fi
default: $(TESTS)
include $(PRDEPTH)/PRrules
.mem.out:
$(TESTS): simv000 simv001 simv004 simv005 simv006
st_all000.tab:
(cd ../..; make test000)
st_all001.tab:
(cd ../..; make test001)
st_all004.tab:
(cd ../..; make test004)
st_all005.tab:
(cd ../..; make test005)
st_all006.tab:
(cd ../..; make test006)
driver000.v: st_all000.tab $(TAB2VMEM)
$(TAB2VMEM) -o /dev/null -s 100 st_all000.tab > driver000.v
driver001.v: st_all001.tab $(TAB2VMEM)
$(TAB2VMEM) -o /dev/null -s 100 st_all001.tab > driver001.v
driver004.v: st_all004.tab $(TAB2VMEM)
$(TAB2VMEM) -o /dev/null -s 100 st_all004.tab > driver004.v
driver005.v: st_all005.tab $(TAB2VMEM)
$(TAB2VMEM) -o /dev/null -s 100 st_all005.tab > driver005.v
driver006.v: st_all006.tab $(TAB2VMEM)
$(TAB2VMEM) -o /dev/null -s 100 st_all006.tab > driver006.v
simv000: top_level.v driver000.v st_all000.mem $(_FORCE)
$(VCS) $(VCSOPTS) -o simv000 -Mdir="st_all000" top_level.v driver000.v
@ if [ "$(DUMP)" ]; \
then (echo "simv000 +mem=st_all000.mem > simv000.out"; simv000 -vcd verilog000.dump +mem=st_all000.mem > simv000.out;) \
else \
(echo "simv000 +mem=st_all000.mem > simv000.out"; simv000 +mem=st_all000.mem +vcs+dumpvarsoff > simv000.out;) \
fi
$(ERROR:FILE=simv000.out)
$(LOG_ERROR)
simv001: top_level.v driver001.v st_all001.mem $(_FORCE)
$(VCS) $(VCSOPTS) -o simv001 -Mdir="st_all001" top_level.v driver001.v
@ if [ "$(DUMP)" ]; \
then (echo "simv001 +mem=st_all001.mem > simv001.out"; simv001 -vcd verilog001.dump +mem=st_all001.mem > simv001.out;) \
else \
(echo "simv001 +mem=st_all001.mem > simv001.out"; simv001 +mem=st_all001.mem +vcs+dumpvarsoff > simv001.out;) \
fi
$(ERROR:FILE=simv001.out)
$(LOG_ERROR)
simv004: top_level.v driver004.v st_all004.mem $(_FORCE)
$(VCS) $(VCSOPTS) -o simv004 -Mdir="st_all004" top_level.v driver004.v
@ if [ "$(DUMP)" ]; \
then (echo "simv004 +mem=st_all004.mem > simv004.out"; simv004 -vcd verilog004.dump +mem=st_all004.mem > simv004.out;) \
else \
(echo "simv004 +mem=st_all004.mem > simv004.out"; simv004 +mem=st_all004.mem +vcs+dumpvarsoff > simv004.out;) \
fi
$(ERROR:FILE=simv004.out)
$(LOG_ERROR)
simv005: top_level.v driver005.v st_all005.mem $(_FORCE)
$(VCS) $(VCSOPTS) -o simv005 -Mdir="st_all005" top_level.v driver005.v
@ if [ "$(DUMP)" ]; \
then (echo "simv005 +mem=st_all005.mem > simv005.out"; simv005 -vcd verilog005.dump +mem=st_all005.mem > simv005.out;) \
else \
(echo "simv005 +mem=st_all005.mem > simv005.out"; simv005 +mem=st_all005.mem +vcs+dumpvarsoff > simv005.out;) \
fi
$(ERROR:FILE=simv005.out)
$(LOG_ERROR)
simv006: top_level.v driver006.v st_all006.mem $(_FORCE)
$(VCS) $(VCSOPTS) -o simv006 -Mdir="st_all006" top_level.v driver006.v
@ if [ "$(DUMP)" ]; \
then (echo "simv006 +mem=st_all006.mem > simv006.out"; simv006 -vcd verilog006.dump +mem=st_all006.mem > simv006.out;) \
else \
(echo "simv006 +mem=st_all006.mem > simv006.out"; simv006 +mem=st_all006.mem +vcs+dumpvarsoff > simv006.out;) \
fi
$(ERROR:FILE=simv006.out)
$(LOG_ERROR)
fast: $(FAST)
fast000: st_all000.mem
simv000 +mem=$? | tee $*.out
fast001: st_all001.mem
simv001 +mem=$? | tee $*.out
fast004: st_all004.mem
simv004 +mem=$? | tee $*.out
fast005: st_all005.mem
simv005 +mem=$? | tee $*.out
fast006: st_all006.mem
simv006 +mem=$? | tee $*.out