Makefile
5.82 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
#!smake
#
# rdpsim/tools/Makefile
#
#
PRDEPTH = ../..
include $(PRDEPTH)/PRdefs
#
# F l a g s
#
ECSINC = /hosts/venice/ecad/ecs_released/include
ECSLIB = /hosts/venice/ecad/ecs_released/lib
YFLAGS = -d -v
LCINCS = -I../simlib -I$(ROOT)/usr/include/PR
LCOPTS = -g
#
# Source for converting tabular file to Compass Wave format
#
TAB2WVSSRC = tab2wvs.c \
tab2wvs_gram.c
TAB2WVSOBJ = $(TAB2WVSSRC:.c=.o)
#
# Source for converting tabular file to Compass Qsim format
#
TAB2SIMSRC = tab2sim.c \
tab2sim_gram.c
TAB2SIMOBJ = $(TAB2SIMSRC:.c=.o)
#
# Source for converting tabular file to Verilog mem file and driver
#
TAB2VMEMSRC = tab2vmem.c \
tab2vmem_gram.c
TAB2VMEMOBJ = $(TAB2VMEMSRC:.c=.o)
#
# Source for printing vertical signal names in tabular file
#
VSIGSRC = vsig.c \
vsig_gram.c
VSIGOBJ = $(VSIGSRC:.c=.o)
#
# Extract bits from one word and place in another.
#
BITSSRC = bits.c \
bits_gram.c
BITSOBJ = $(BITSSRC:.c=.o)
#
# T a r g e t s
#
TARGETS = tab2wvs tab2vmem vsig xnet remove_comments ecs_gen merrg setup a2b b2a b2mem rdp2read main2image blink flat_shade_dl iclr bincut do_wave tab2sim make_movie main2rdp rdram2rdp rdramPatch
INST_TARGETS = rdp2read
#
# Remove these intermediate files: make clobber
#
LDIRT = tab2wvs_scan.c \
tab2wvs_gram.c \
test.wvs \
test.tbl \
tab2sim_scan.c \
tab2sim_gram.c \
tab2vmem_scan.c \
tab2vmem_gram.c \
vsig_scan.c \
vsig_gram.c \
test.vmem \
driver.v \
y.output
#
# Both tab2wvs and tab2vmem use yacc, so we single thread
# as to avoid stomping on each other's y.tab.c.
#
.NOTPARALLEL:
default: $(TARGETS) test.wvs
exports install : default
$(INSTALL) -m 555 -F /usr/sbin $(TARGETS)
include $(COMMONRULES)
#
# Tool for converting Viewlogic netlist, confguration file
# to C or Verilog wrapper functions for co-simulation.
#
xnet: xnet.c
#
# Tool for converting ECS netlist to Viewlogic format
#
ecs2vl: ecs2vl.c
rcp ecs2vl.c guest@amber:ecs2vl.c
rsh guest@amber $(CC) -o ecs2vl -DUNIX -I. \
-I$(ECSINC) ecs2vl.c \
$(ECSLIB)/scpik.a
rcp guest@amber:ecs2vl ecs2vl
#
# Tool for converting tabular file to Compass Wave format
#
tab2wvs_gram.y: tab2wvs_scan.c
tab2wvs: $(TAB2WVSOBJ)
$(HOST_CC) -o $@ $(TAB2WVSOBJ) -ll
#
# Tool for converting tabular file to Compass QSim format
#
tab2sim_gram.y: tab2sim_scan.c
tab2sim: $(TAB2SIMOBJ)
$(HOST_CC) -o $@ $(TAB2SIMOBJ) -ll -lm
#
# Example of how to use tab2wvs
#
test.wvs: test_tab2wvs.tab tab2wvs
./tab2wvs -o test.tbl test_tab2wvs.tab > test.wvs
#
# Tool for converting tabular file to Verilog memory file and driver
#
tab2vmem_gram.y: tab2vmem_scan.c
tab2vmem: $(TAB2VMEMOBJ)
$(HOST_CC) -o $@ $(TAB2VMEMOBJ) -ll
#
# Tool for printing vertical signal names in tabular file
#
vsig_gram.y: vsig_scan.c
vsig: $(VSIGOBJ)
$(HOST_CC) -o $@ $(VSIGOBJ) -ll
#
#
#
bits_gram.y: bits_scan.c
bits: $(BITSOBJ)
$(HOST_CC) -o $@ $(BITSOBJ) -ll
#
# rdp2read
#
rdp2read: rdp2read.c
$(HOST_CC) -o $@ $@.c -I../../include -I$(ROOT)/usr/include
#
# parse_rdp
#
parse_rdp: parse_rdp.c
$(HOST_CC) -o $@ $@.c -I../../include -I$(ROOT)/usr/include
#
# main2image
#
main2image: main2image.c
$(HOST_CC) -o $@ $@.c -I../../include -I$(ROOT)/usr/include -limage
#
# flat_shade_dl
#
flat_shade_dl: flat_shade_dl.c
$(HOST_CC) -o $@ $@.c -I../../include -I$(ROOT)/usr/include
#
# blink
#
blink: blink.c
$(HOST_CC) -o $@ $@.c -I../../include -I$(ROOT)/usr/include
#
# Example of how to use tab2wvs
#
driver.v: test_tab2vmem.tab tab2vmem
./tab2vmem -o test.vmem test_tab2vmem.tab > driver.v
#
# Test tab2sim
#
test_tab2sim: tab2sim test_tab2sim.tab test1_tab2sim.tab test2_tab2sim.tab \
test3_tab2sim.tab test4_tab2sim.tab test5_tab2sim.tab test6_tab2sim.tab \
test.0 test.1 test.2 test.3 test.4 test.5 test.6 test.7 \
test.0.out test.1.out test.2.out test.3.out test.4.out test.5.out \
test.6.out test.7.out
./tab2sim -o test.0a test_tab2sim.tab > test.0a.out
diff test.0 test.0a
diff test.0.out test.0a.out
./tab2sim -o test.1a test1_tab2sim.tab > test.1a.out
diff test.1 test.1a
diff test.1.out test.1a.out
./tab2sim -o test.2a test2_tab2sim.tab > test.2a.out
diff test.2 test.2a
diff test.2.out test.2a.out
./tab2sim -o test.3a test3_tab2sim.tab > test.3a.out
diff test.3 test.3a
diff test.3.out test.3a.out
./tab2sim -o test.4a test4_tab2sim.tab > test.4a.out
diff test.4 test.4a
diff test.4.out test.4a.out
./tab2sim -o test.5a test5_tab2sim.tab > test.5a.out
diff test.5 test.5a
diff test.5.out test.5a.out
./tab2sim -v -o test.6a test2_tab2sim.tab > test.6a.out
diff test.6 test.6a
diff test.6.out test.6a.out
./tab2sim -v -o test.7a test6_tab2sim.tab > test.7a.out
diff test.7 test.7a
diff test.7.out test.7a.out
rm test.*a.out test.*a
cat test_tab2sim.tab | ./tab2sim -o test.0a > test.0a.out
diff test.0 test.0a
diff test.0.out test.0a.out
cat test1_tab2sim.tab | ./tab2sim -o test.1a > test.1a.out
diff test.1 test.1a
diff test.1.out test.1a.out
cat test2_tab2sim.tab | ./tab2sim -o test.2a > test.2a.out
diff test.2 test.2a
diff test.2.out test.2a.out
cat test3_tab2sim.tab | ./tab2sim -o test.3a > test.3a.out
diff test.3 test.3a
diff test.3.out test.3a.out
cat test4_tab2sim.tab | ./tab2sim -o test.4a > test.4a.out
diff test.4 test.4a
diff test.4.out test.4a.out
cat test5_tab2sim.tab | ./tab2sim -o test.5a > test.5a.out
diff test.5 test.5a
diff test.5.out test.5a.out
cat test2_tab2sim.tab | ./tab2sim -v -o test.6a > test.6a.out
diff test.6 test.6a
diff test.6.out test.6a.out
cat test6_tab2sim.tab | ./tab2sim -v -o test.7a > test.7a.out
diff test.7 test.7a
diff test.7.out test.7a.out
rm test.*a.out test.*a
#
# Tool for generating rdp primitive commands
#
setup: setup.c
#
# Tool for extracting a piece out of a binary file.
#
bincut: bincut.c
#
# Suffix rules
#
.SUFFIXES: .uu
.uu:
uudecode $<
chmod 775 $@