Makefile
10.9 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
#!smake -J 8
#
# This makefile has rules for making both the executables
# which make up the simulator, and for running test cases.
#
# This makefile should do a make in InData/ before making
# any test in this directory.
#
# $Revision: 1.1.1.1 $
#
LCOPTS = -g
COMMONPREF=RDPSIM
PRDEPTH = ../../..
include $(PRDEPTH)/PRdefs
include $(PRDEPTH)/PRrules
#
# Subdirectories
#
include $(ROOT)/usr/include/make/ismcommondefs
LVCSOPTS = -y . \
+incdir+$(PRDEPTH)/hw/chip/rcp/inc
OLDOPTS = -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 \
RTLOPTS = -y $(PRDEPTH)/hw/chip/rcp/st/src \
-y $(PRDEPTH)/hw/chip/lib/verilog/stdcell \
-y $(PRDEPTH)/hw/chip/lib/verilog/ram \
+libext+.v \
SYNOPTS = -y $(PRDEPTH)/hw/chip/rcp/st/syn \
-y $(PRDEPTH)/hw/chip/lib/verilog/stdcell \
-y $(PRDEPTH)/hw/chip/lib/verilog/ram \
+libext+.v+.vsyn \
SHELL=/sbin/ksh
#
# Tools
#
XNET = ../../tools/xnet
#
# Directories
#
SIMLIB = ../../simlib
SRC = ../../src
HDR = ../../hdr
VERILOG = ../rdp
WIR = Wir
INDATA = InData
OUTDATA = OutData
QSIM = qsim
SUBDIRS = $(INDATA) $(WIR)
#
# Check for objects in this directory
#
.PATH: $(SRC)
#
# C Sources
#
TEST_FILES = \
$(SRC)/st.c \
expand.c \
driver.c \
st_test_0.c
#
# Object Files
#
TEST_OBJ = ${TEST_FILES:.c=.o}
TEST_OBJS = ${TEST_OBJ:T}
#
# Header file Directories
#
LCINCS = -I. \
-I$(SIMLIB) \
-I$(HDR)
GCINCS =
#
# Linker Directories and Options
#
LLDOPTS = -L. -L$(SIMLIB)
GLDOPTS =
LLDLIBS = -lsimlib -lgl -limage
LNFLAGS = $(CFLAGS)
#
# Default Targets
#
TARGETS = st_test
LDIRT = st_test st_test_0.c driver*.v *.mem *.out vcs.log *.dump st_all??? *.tab simv* rsimv* ssimv* rtlcsrc* syncsrc* ${OUTDATA}/st_all/*.tab ${OUTDATA}/st_all/*.mem ${QSIM}/*.tab ${QSIM}/*.tbl* ${QSIM}/*.wvs* ${QSIM}/*.sim* ${QSIM}/*.trc* ${QSIM}/*.simlog* ${QSIM}/*.cln ${QSIM}/*.idx ${QSIM}/*.db ${QSIM}/*.atr ${QSIM}/*.log
RTESTS = rsimv000 rsimv001 rsimv004 rsimv005 rsimv006
STESTS = ssimv000 ssimv001 ssimv004 ssimv005 ssimv006
QTESTS = qsimv000 qsimv001 qsimv004 qsimv005 qsimv006
default: $(RTESTS)
stests: $(STESTS)
qtests: $(QTESTS)
$(COMMONTARGS): $(COMMONPREF)$$@
$(SUBDIRS_MAKERULE)
#
# Target for creating all .tab files
#
tab_files: $(_FORCE)
cd InData; $(MAKE) tab_files
#
# Target for creating all .1 files, Viewlogic netlists
#
$(WIR)/st_test.1: $(_FORCE)
cd $(WIR); $(MAKE)
#
# Compile 'C' processes
#
st_test_0.c: $(WIR)/st_test.1 st_test.config $(XNET)
$(XNET) -d $(WIR) st_test -c st_test.config
st_test: st_test_0.c $(SIMLIB) $(TEST_OBJS)
$(HOST_CC) $(TEST_OBJS) $(LDFLAGS) -o $@ $(LLDLIBS)
driver000.v: $(OUTDATA)/st_all/st_all000.tab $(TAB2VMEM)
$(TAB2VMEM) -o /dev/null -s 100 $(OUTDATA)/st_all/st_all000.tab > driver000.v
driver001.v: $(OUTDATA)/st_all/st_all001.tab $(TAB2VMEM)
$(TAB2VMEM) -o /dev/null -s 100 $(OUTDATA)/st_all/st_all001.tab > driver001.v
driver004.v: $(OUTDATA)/st_all/st_all004.tab $(TAB2VMEM)
$(TAB2VMEM) -o /dev/null -s 100 $(OUTDATA)/st_all/st_all004.tab > driver004.v
driver005.v: $(OUTDATA)/st_all/st_all005.tab $(TAB2VMEM)
$(TAB2VMEM) -o /dev/null -s 100 $(OUTDATA)/st_all/st_all005.tab > driver005.v
driver006.v: $(OUTDATA)/st_all/st_all006.tab $(TAB2VMEM)
$(TAB2VMEM) -o /dev/null -s 100 $(OUTDATA)/st_all/st_all006.tab > driver006.v
simv000: top_level.v driver000.v $(OUTDATA)/st_all/st_all000.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(OLDOPTS) -o $@ -Mdir="st_all000" top_level.v driver000.v
simv000 +mem=$(OUTDATA)/st_all/st_all000.mem +vcs+dumpvarsoff > simv000.out;
$(ERROR:FILE=simv000.out)
$(LOG_ERROR)
rsimv000: top_level.v driver000.v $(OUTDATA)/st_all/st_all000.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(RTLOPTS) -o $@ -Mdir="rtlcsrc000" top_level.v driver000.v
@ if [ "$(DUMP)" ]; \
then (echo "rsimv000 -dump"; rsimv000 -vcd rverilog000.dump +mem=$(OUTDATA)/st_all/st_all000.mem > rsimv000.out;) \
else \
(echo "rsimv000 -nodump"; rsimv000 +mem=$(OUTDATA)/st_all/st_all000.mem +vcs+dumpvarsoff > rsimv000.out;) \
fi
$(ERROR:FILE=rsimv000.out)
$(LOG_ERROR)
ssimv000: top_level.v driver000.v $(OUTDATA)/st_all/st_all000.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(SYNOPTS) -o $@ -Mdir="syncsrc000" top_level.v driver000.v
@ if [ "$(DUMP)" ]; \
then (echo "ssimv000 -dump"; ssimv000 -vcd rverilog000.dump +mem=$(OUTDATA)/st_all/st_all000.mem > ssimv000.out;) \
else \
(echo "ssimv000 -nodump"; ssimv000 +mem=$(OUTDATA)/st_all/st_all000.mem +vcs+dumpvarsoff > ssimv000.out;) \
fi
$(ERROR:FILE=ssimv000.out)
$(LOG_ERROR)
qsimv000: $(_FORCE)
(cd qsim; make st_all000.trc)
simv001: top_level.v driver001.v $(OUTDATA)/st_all/st_all001.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(OLDOPTS) -o $@ -Mdir="st_all001" top_level.v driver001.v
simv001 +mem=$(OUTDATA)/st_all/st_all001.mem +vcs+dumpvarsoff > simv001.out;
$(ERROR:FILE=simv001.out)
$(LOG_ERROR)
rsimv001: top_level.v driver001.v $(OUTDATA)/st_all/st_all001.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(RTLOPTS) -o $@ -Mdir="rtlcsrc001" top_level.v driver001.v
@ if [ "$(DUMP)" ]; \
then (echo "rsimv001 -dump"; rsimv001 -vcd rverilog001.dump +mem=$(OUTDATA)/st_all/st_all001.mem > rsimv001.out;) \
else \
(echo "rsimv001 -nodump"; rsimv001 +mem=$(OUTDATA)/st_all/st_all001.mem +vcs+dumpvarsoff > rsimv001.out;) \
fi
$(ERROR:FILE=rsimv001.out)
$(LOG_ERROR)
ssimv001: top_level.v driver001.v $(OUTDATA)/st_all/st_all001.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(SYNOPTS) -o $@ -Mdir="syncsrc001" top_level.v driver001.v
@ if [ "$(DUMP)" ]; \
then (echo "ssimv001 -dump"; ssimv001 -vcd rverilog001.dump +mem=$(OUTDATA)/st_all/st_all001.mem > ssimv001.out;) \
else \
(echo "ssimv001 -nodump"; ssimv001 +mem=$(OUTDATA)/st_all/st_all001.mem +vcs+dumpvarsoff > ssimv001.out;) \
fi
$(ERROR:FILE=ssimv001.out)
$(LOG_ERROR)
qsimv001: $(_FORCE)
(cd qsim; make st_all001.trc)
simv004: top_level.v driver004.v $(OUTDATA)/st_all/st_all004.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(OLDOPTS) -o $@ -Mdir="st_all004" top_level.v driver004.v
simv004 +mem=$(OUTDATA)/st_all/st_all004.mem +vcs+dumpvarsoff > simv004.out;
$(ERROR:FILE=simv004.out)
$(LOG_ERROR)
rsimv004: top_level.v driver004.v $(OUTDATA)/st_all/st_all004.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(RTLOPTS) -o $@ -Mdir="rtlcsrc004" top_level.v driver004.v
@ if [ "$(DUMP)" ]; \
then (echo "rsimv004 -dump"; rsimv004 -vcd rverilog004.dump +mem=$(OUTDATA)/st_all/st_all004.mem > rsimv004.out;) \
else \
(echo "rsimv004 -nodump"; rsimv004 +mem=$(OUTDATA)/st_all/st_all004.mem +vcs+dumpvarsoff > rsimv004.out;) \
fi
$(ERROR:FILE=rsimv004.out)
$(LOG_ERROR)
ssimv004: top_level.v driver004.v $(OUTDATA)/st_all/st_all004.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(SYNOPTS) -o $@ -Mdir="syncsrc004" top_level.v driver004.v
@ if [ "$(DUMP)" ]; \
then (echo "ssimv004 -dump"; ssimv004 -vcd rverilog004.dump +mem=$(OUTDATA)/st_all/st_all004.mem > ssimv004.out;) \
else \
(echo "ssimv004 -nodump"; ssimv004 +mem=$(OUTDATA)/st_all/st_all004.mem +vcs+dumpvarsoff > ssimv004.out;) \
fi
$(ERROR:FILE=ssimv004.out)
$(LOG_ERROR)
qsimv004: $(_FORCE)
(cd qsim; make st_all004.trc)
simv005: top_level.v driver005.v $(OUTDATA)/st_all/st_all005.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(OLDOPTS) -o $@ -Mdir="st_all005" top_level.v driver005.v
simv005 +mem=$(OUTDATA)/st_all/st_all005.mem +vcs+dumpvarsoff > simv005.out;
$(ERROR:FILE=simv005.out)
$(LOG_ERROR)
rsimv005: top_level.v driver005.v $(OUTDATA)/st_all/st_all005.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(RTLOPTS) -o $@ -Mdir="rtlcsrc005" top_level.v driver005.v
@ if [ "$(DUMP)" ]; \
then (echo "rsimv005 -dump"; rsimv005 -vcd rverilog005.dump +mem=$(OUTDATA)/st_all/st_all005.mem > rsimv005.out;) \
else \
(echo "rsimv005 -nodump"; rsimv005 +mem=$(OUTDATA)/st_all/st_all005.mem +vcs+dumpvarsoff > rsimv005.out;) \
fi
$(ERROR:FILE=rsimv005.out)
$(LOG_ERROR)
ssimv005: top_level.v driver005.v $(OUTDATA)/st_all/st_all005.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(SYNOPTS) -o $@ -Mdir="syncsrc005" top_level.v driver005.v
@ if [ "$(DUMP)" ]; \
then (echo "ssimv005 -dump"; ssimv005 -vcd rverilog005.dump +mem=$(OUTDATA)/st_all/st_all005.mem > ssimv005.out;) \
else \
(echo "ssimv005 -nodump"; ssimv005 +mem=$(OUTDATA)/st_all/st_all005.mem +vcs+dumpvarsoff > ssimv005.out;) \
fi
$(ERROR:FILE=ssimv005.out)
$(LOG_ERROR)
qsimv005: $(_FORCE)
(cd qsim; make st_all005.trc)
simv006: top_level.v driver006.v $(OUTDATA)/st_all/st_all006.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(OLDOPTS) -o $@ -Mdir="st_all006" top_level.v driver006.v
simv006 +mem=$(OUTDATA)/st_all/st_all006.mem +vcs+dumpvarsoff > simv006.out;
$(ERROR:FILE=simv006.out)
$(LOG_ERROR)
rsimv006: top_level.v driver006.v $(OUTDATA)/st_all/st_all006.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(RTLOPTS) -o $@ -Mdir="rtlcsrc006" top_level.v driver006.v
@ if [ "$(DUMP)" ]; \
then (echo "rsimv006 -dump"; rsimv006 -vcd rverilog006.dump +mem=$(OUTDATA)/st_all/st_all006.mem > rsimv006.out;) \
else \
(echo "rsimv006 -nodump"; rsimv006 +mem=$(OUTDATA)/st_all/st_all006.mem +vcs+dumpvarsoff > rsimv006.out;) \
fi
$(ERROR:FILE=rsimv006.out)
$(LOG_ERROR)
ssimv006: top_level.v driver006.v $(OUTDATA)/st_all/st_all006.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(SYNOPTS) -o $@ -Mdir="syncsrc006" top_level.v driver006.v
@ if [ "$(DUMP)" ]; \
then (echo "ssimv006 -dump"; ssimv006 -vcd rverilog006.dump +mem=$(OUTDATA)/st_all/st_all006.mem > ssimv006.out;) \
else \
(echo "ssimv006 -nodump"; ssimv006 +mem=$(OUTDATA)/st_all/st_all006.mem +vcs+dumpvarsoff > ssimv006.out;) \
fi
$(ERROR:FILE=ssimv006.out)
$(LOG_ERROR)
qsimv006: $(_FORCE)
(cd qsim; make st_all006.trc)
#
# Targets
#
nuke:
- rm InData/inp000.tab InData/inp001.tab OutData/st_all/st_all* 2> /dev/null
#
# Tab targets
#
$(INDATA)/inp000.tab $(INDATA)/inp001.tab $(INDATA)/inp004.tab $(INDATA)/inp005.tab $(INDATA)/inp006.tab : $(_FORCE)
cd $(INDATA); make `basename $@`
#
# Test Targets
#
test000: $(OUTDATA)/st_all/st_all000.tab
$(OUTDATA)/st_all/st_all000.tab : $(INDATA)/inp000.tab st_test
st_test -i 0 -o all,comp,test=000
test001: $(OUTDATA)/st_all/st_all001.tab
$(OUTDATA)/st_all/st_all001.tab : $(INDATA)/inp001.tab st_test
st_test -i 1 -o all,test=001
test004: $(OUTDATA)/st_all/st_all004.tab
$(OUTDATA)/st_all/st_all004.tab : $(INDATA)/inp004.tab st_test
st_test -i 4 -o all,test=004
test005: $(OUTDATA)/st_all/st_all005.tab
$(OUTDATA)/st_all/st_all005.tab : $(INDATA)/inp005.tab st_test
st_test -i 5 -o all,test=005
test006: $(OUTDATA)/st_all/st_all006.tab
$(OUTDATA)/st_all/st_all006.tab : $(INDATA)/inp006.tab st_test
st_test -i 6 -o all,test=006
#
# Suffix Rules
#
.c.o:
$(HOST_CC) $(CFLAGS) -c $*.c