Makefile
10.8 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
#
# This makefile has rules for making both the executables
# which make up the simulator, and for running test cases.
#
COMMONPREF = rcp
BBDEPTH = ../../..
include $(BBDEPTH)/BBdefs
# Directory to store verilog output files (simv and c files).
# All *.o and *.c files will be placed in $(SIMVDIR)/$(SIMCDIR).
# User can overide this variable on make command line, ie.
# 'make SIMVDIR=/tmp' or environment variable.
SIMCDIR = c
SIMVDIR ?= .
# paths to vendor library;
VLIB = lib-rcp/verilog
# how to run the simulator binary executable;
SIMV = LD_LIBRARY_PATH=$(VCS_HOME)/lib $(SIMVDIR)/simv -q
# C include directories;
LCINCS =
GCINCS =
# C compiler options
OPTIMIZER = -g
LCOPTS = -fullwarn
# all vcs dirt;
VCSDIRT = $(VCS_NAME).log \
$(SIMVDIR)/$(SIMCDIR) $(SIMVDIR)/simv* \
tokens.v
# path to rcp pli library;
LIBRCPPLI = $(BBDEPTH)/lib/librcppli
# override global vcs flags:
GVCSOPTS = -l $(VCS_NAME).log \
-M -Mupdate \
-V
# vcs options for behavioral simulator;
LVCSOPTS = -y . \
-y $(BBDEPTH)/hw/chip/rcp/src \
-y $(BBDEPTH)/hw/chip/rcp/rdp/src \
-y $(BBDEPTH)/hw/chip/rcp/ri/src \
-y $(BBDEPTH)/hw/chip/rcp/rsp/src \
-y $(BBDEPTH)/hw/chip/rcp/ar/src \
-y $(BBDEPTH)/hw/chip/rcp/mi/src \
-y $(BBDEPTH)/hw/chip/rcp/vi/src \
-y $(BBDEPTH)/hw/chip/rcp/ai/src \
-y $(BBDEPTH)/hw/chip/rcp/pi/src \
-y $(BBDEPTH)/hw/chip/rcp/si/src \
-y $(BBDEPTH)/hw/chip/rcp/cs/src \
-y $(BBDEPTH)/hw/chip/rcp/ew/src \
-y $(BBDEPTH)/hw/chip/rcp/ep/src \
-y $(BBDEPTH)/hw/chip/rcp/cv/src \
-y $(BBDEPTH)/hw/chip/rcp/st/src \
-y $(BBDEPTH)/hw/chip/rcp/tc/src \
-y $(BBDEPTH)/hw/chip/rcp/tm/src \
-y $(BBDEPTH)/hw/chip/rcp/tf/src \
-y $(BBDEPTH)/hw/chip/rcp/cc/src \
-y $(BBDEPTH)/hw/chip/rcp/bl/src \
-y $(BBDEPTH)/hw/chip/rcp/at/src \
-y $(BBDEPTH)/hw/chip/rcp/bl/src \
-y $(BBDEPTH)/hw/chip/rcp/ms/src \
-y $(BBDEPTH)/hw/chip/rcp/rsp/src \
-y $(BBDEPTH)/hw/chip/rcp/su/src \
-y $(BBDEPTH)/hw/chip/rcp/vu/src \
-y $(BBDEPTH)/hw/chip/rcp/ls/src \
-y $(BBDEPTH)/hw/chip/rcp/is/src \
-y $(BBDEPTH)/hw/chip/rcp/io/src \
-y $(BBDEPTH)/hw/chip/rcp/dm/src \
-y $(BBDEPTH)/hw/chip/rcp/sb/src \
-y $(BBDEPTH)/hw/chip/rcp/su/fixes \
-y $(BBDEPTH)/hw/chip/rcp/div/src \
-y $(BBDEPTH)/hw/chip/rcp/tst/src \
-y $(BBDEPTH)/hw/chip/$(VLIB)/T2pads \
-y $(BBDEPTH)/hw/chip/$(VLIB)/pads \
-y $(BBDEPTH)/hw/chip/$(VLIB)/dp \
-y $(BBDEPTH)/hw/chip/$(VLIB)/stdcell \
-y $(BBDEPTH)/hw/chip/$(VLIB)/ram \
-y $(BBDEPTH)/hw/chip/$(VLIB)/user \
-y $(BBDEPTH)/hw/chip/$(VLIB)/rac/gate \
-y $(BBDEPTH)/hw/chip/$(VLIB)/rdram/behavioral \
-y $(BBDEPTH)/hw/chip/$(VLIB)/rdram_8mb/behavioral \
-y $(BBDEPTH)/hw/chip/$(VLIB)/rom/behavioral \
-y $(BBDEPTH)/hw/chip/$(VLIB)/pif \
-v $(BBDEPTH)/hw/chip/$(VLIB)/rac/gate/rac.v \
+libext+.v+.vzd+.vmd \
+incdir+$(BBDEPTH)/hw/chip/rcp/inc \
+incdir+$(BBDEPTH)/hw/chip/rcp/su/src \
+incdir+$(BBDEPTH)/hw/chip/rcp/vu/src \
+incdir+$(BBDEPTH)/hw/chip/rcp/ms/src \
-Mdir=$(SIMVDIR)/$(SIMCDIR)
# vcs options for IPC version;
# use pli interface;
GIPCOPTS = -q +acc +librescan \
+define+MMAP_RDRAM \
+define+IPC_PRESENT \
-P $(LIBRCPPLI)/rcppli.tab $(LIBRCPPLI)/librcppli.a
IPCOPTS = $(GIPCOPTS) \
+define+RSP_MON \
+define+RSP_PRESENT \
+define+MSPAN_MON
# default target is to build the behavioral simulator;
TARGETS = simv
default install: $(TARGETS)
# clean all vcs files;
clean-vcs: $(_FORCE)
$(RM) -rf $(VCSDIRT)
# thorough clean;
clean: clean-vcs
$(COMMONTARGS): $(COMMONPREF)$$@
$(SUBDIRS_MAKERULE)
# include BB common rules;
include $(BBDEPTH)/BBrules
# compile the behavioral simulator;
simv: reality.v $(_FORCE)
$(VCS) $(VCSOPTS) \
-P $(LIBRCPPLI)/rcppli.tab $(LIBRCPPLI)/librcppli.a \
-o $(SIMVDIR)/$@ \
reality.v
# compile the rdp simulator;
# use dummy for rsp logic;
simv_rdp: reality.v dummy_rsp.v $(_FORCE)
(VCS) $(VCSOPTS) \
-o $(SIMVDIR)/$@ \
reality.v dummy_rsp.v
# compile the rsp simulator;
# use dummy for rdp logic;
simv_rsp: reality.v dummy_rdp.v $(_FORCE)
$(VCS) $(VCSOPTS) \
-o $(SIMVDIR)/$@ \
reality.v dummy_rdp.v
# compile the io simulator;
# use dummy for rsp and rdp logic;
simv_io: reality.v dummy_rsp.v dummy_rdp.v $(_FORCE)
$(VCS) $(VCSOPTS) \
-o $(SIMVDIR)/$@ \
reality.v dummy_rsp.v dummy_rdp.v
# compile IPC simulator;
ipc: reality.v $(_FORCE)
$(VCS) $(VCSOPTS) $(IPCOPTS) \
-o $(SIMVDIR)/simv2.ipc \
reality.v
# compile IPC simulator with dummy rsp and rdp;
gipc: reality.v $(_FORCE)
$(VCS) $(VCSOPTS) $(GIPCOPTS) \
-o $(SIMVDIR)/simv.gipc \
reality.v dummy_rsp.v dummy_rdp.v
iorand.rdram: iorand.data
#
# Tests
#
pif_test: $(_FORCE)
$(SIMV) +test_4200_pif_wr4B +load_pif
$(SIMV) +test_4200_pif_rd4Bcpu +load_pif
$(SIMV) +test_4200_pif_wr_rd +load_pif
$(SIMV) +test_4200_pif_rd_lap1 +load_pif
$(SIMV) +test_4200_pif_rd_lap2 +load_pif
$(SIMV) +test_4200_pif_rd_lap3 +load_pif
$(SIMV) +test_4200_pif_io_read_conflict +load_pif
nmi_test: $(_FORCE)
$(SIMV) +test_4200_nmi_test +enable_nmi
audio_test: $(_FORCE)
$(SIMV) +test_4200_ai_test
video_test: $(_FORCE)
$(SIMV) +test_4200_vi_test
bigtest: $(_FORCE)
$(ROOT)/PR/iosim/src/iorand -d 0x241 -l io.log -i 10000 -r 10000 -t 4,7,12,8,15 -s "$(SIMVDIR)/simv2.ipc -l verilog.log +load_imem +load_dmem +load_pif +load_rom +mmap_rdram=rdram_0 +vitab=vi.tab +cbus_mon +rsp_mon +show_imem_on_r1 +vi_dump -vcd /var/tmp/kluster/bigtest.dump"
bigtest.rgb: vi.tab
- rm Nlan1.rgb Nlan2.rgb Nlpn1.rgb Nhan1.rgb Nhpf2.rgb
$(ROOT)/usr/sbin/vparse -i vi.tab -o big5.tab -f 2
$(ROOT)/usr/sbin/monitor -i big5.tab000 -o Nlan1.rgb -h 0x00200044 -v 0x0050025
$(ROOT)/usr/sbin/monitor -i big5.tab001 -o Nlan2.rgb -h 0x00200044 -v 0x0050025
$(ROOT)/usr/sbin/monitor -i big5.tab002 -o Nlpn1.rgb -h 0x00200040 -v 0x0050025
$(ROOT)/usr/sbin/monitor -i big5.tab003 -o Nhan1.rgb -h 0x00200044 -v 0x0050025
$(ROOT)/usr/sbin/monitor -i big5.tab004 -o Nhpf2.rgb -h 0x00200044 -v 0x0050025
$(ROOT)/usr/sbin/idiff Nlan1.rgb $(ROOT)/PR/rdpsim/backend/test/Iosim/lan1.rgb
$(ROOT)/usr/sbin/idiff Nlan2.rgb $(ROOT)/PR/rdpsim/backend/test/Iosim/lan2.rgb
$(ROOT)/usr/sbin/idiff Nlpn1.rgb $(ROOT)/PR/rdpsim/backend/test/Iosim/lpn1.rgb
$(ROOT)/usr/sbin/idiff Nhan1.rgb $(ROOT)/PR/rdpsim/backend/test/Iosim/han1.rgb
$(ROOT)/usr/sbin/idiff Nhpf2.rgb $(ROOT)/PR/rdpsim/backend/test/Iosim/hpf2.rgb
mlf2test: $(_FORCE)
$(ROOT)/PR/iosim/src/iorand -d 0x241 -l io-mlf2.log -i 10000 -r 10000 -t 4,7,12,8,17 -s "$(SIMVDIR)/simv2.ipc -l verilog-mlf2.log +load_imem +load_dmem +load_pif +load_rom +mmap_rdram=rdram_0 +vitab=vi-mlf2.tab +cbus_mon +rsp_mon +show_imem_on_r1 +vi_dump -vcd /var/tmp/kluster/mlf2test.dump"
mlf2test.rgb: vi-mlf2.tab
- rm Nmlf2.rgb* mlf2.tab*
$(ROOT)/PR/rdpsim/backend/diffvideo -i vi-mlf2.tab -g $(ROOT)/PR/rdpsim/backend/test/Iosim/Nmlf2.rgb -h 0x00200044 -v 0x0050025
mlf2temp: $(_FORCE)
$(ROOT)/PR/iosim/src/iorand -d 0x241 -l io-mlf2.log -i 10000 -r 10000 -t 4,7,8,18,17 -s "$(SIMVDIR)/simv2.ipc -l verilog-mlf2.log +load_imem +load_dmem +load_pif +load_rom +mmap_rdram=rdram_0 +vitab=vi-mlf2.tab +cbus_mon -vcd /var/tmp/kluster/mlf2temp.dump"
simenv : $(_FORCE)
echo " setenv LD_LIBRARY_PATH $(VCS_HOME)/lib " > Setenv
echo "enter command% source Setenv"
# New 5 tests
mln1test: $(_FORCE)
/usr/bsd/uncompress -c virdram.rdram.Z > virdram.rdram
$(ROOT)/PR/iosim/src/iorand -o `date +%d%H%M%S` -C -R -d 0x241 -l io-mln1.log -i 10000 -r 10000 -t 4,7,15,8,16 -s "$(SIMVDIR)/simv2.ipc -l verilog-mln1.log +load_imem +load_dmem +load_pif +load_rom +mmap_rdram=virdram +vitab=vi-mln1.tab +cbus_mon +rsp_mon +show_imem_on_r1 -vcd /var/tmp/kluster/mln1test.dump"
mln1test.rgb: vi-mln1.tab $(ROOT)/PR/rdpsim/backend/test/Iosim/Nmln1.rgb
- rm vi-mln1.rgb* vi-mln1.tab???
$(ROOT)/PR/rdpsim/backend/diffvideo -i vi-mln1.tab -g $(ROOT)/PR/rdpsim/backend/test/Iosim/Nmln1.rgb -h 0x00200044 -v 0x0050025
mln2test: $(_FORCE)
/usr/bsd/uncompress -c virdram.rdram.Z > virdram.rdram
$(ROOT)/PR/iosim/src/iorand -o `date +%d%H%M%S` -C -R -d 0x241 -l io-mln2.log -i 10000 -r 10000 -t 4,7,15,8,17 -s "$(SIMVDIR)/simv2.ipc -l verilog-mln2.log +load_imem +load_dmem +load_pif +load_rom +mmap_rdram=virdram +vitab=vi-mln2.tab +cbus_mon +rsp_mon +show_imem_on_r1 -vcd /var/tmp/kluster/mln2test.dump"
mln2test.rgb: vi-mln2.tab $(ROOT)/PR/rdpsim/backend/test/Iosim/Nmln2.rgb
- rm vi-mln2.rgb* vi-mln2.tab???
$(ROOT)/PR/rdpsim/backend/diffvideo -i vi-mln2.tab -g $(ROOT)/PR/rdpsim/backend/test/Iosim/Nmln2.rgb -h 0x00200044 -v 0x0050025
mlp1test: $(_FORCE)
/usr/bsd/uncompress -c virdram.rdram.Z > virdram.rdram
$(ROOT)/PR/iosim/src/iorand -o `date +%d%H%M%S` -C -R -d 0x241 -l io-mlp1.log -i 10000 -r 10000 -t 4,7,15,8,18 -s "$(SIMVDIR)/simv2.ipc -l verilog-mlp1.log +load_imem +load_dmem +load_pif +load_rom +mmap_rdram=virdram +vitab=vi-mlp1.tab +cbus_mon +rsp_mon +show_imem_on_r1 -vcd /var/tmp/kluster/mlp1test.dump"
mlp1test.rgb: vi-mlp1.tab $(ROOT)/PR/rdpsim/backend/test/Iosim/Nmlp1.rgb
- rm vi-mlp1.rgb* vi-mlp1.tab???
$(ROOT)/PR/rdpsim/backend/diffvideo -i vi-mlp1.tab -g $(ROOT)/PR/rdpsim/backend/test/Iosim/Nmlp1.rgb -h 0x00200040 -v 0x0050025
mhn1test: $(_FORCE)
/usr/bsd/uncompress -c virdram.rdram.Z > virdram.rdram
$(ROOT)/PR/iosim/src/iorand -o `date +%d%H%M%S` -C -R -d 0x241 -l io-mhn1.log -i 10000 -r 10000 -t 4,7,15,8,19 -s "$(SIMVDIR)/simv2.ipc -l verilog-mhn1.log +load_imem +load_dmem +load_pif +load_rom +mmap_rdram=virdram +vitab=vi-mhn1.tab +cbus_mon +rsp_mon +show_imem_on_r1 -vcd /var/tmp/kluster/mhn1test.dump"
mhn1test.rgb: vi-mhn1.tab $(ROOT)/PR/rdpsim/backend/test/Iosim/Nmhn1.rgb
- rm vi-mhn1.rgb* vi-mhn1.tab???
$(ROOT)/PR/rdpsim/backend/diffvideo -i vi-mhn1.tab -g $(ROOT)/PR/rdpsim/backend/test/Iosim/Nmhn1.rgb -h 0x00200044 -v 0x0050025
mhf2test: $(_FORCE)
/usr/bsd/uncompress -c virdram.rdram.Z > virdram.rdram
$(ROOT)/PR/iosim/src/iorand -o `date +%d%H%M%S` -C -R -d 0x241 -l io-mhf2.log -i 10000 -r 10000 -t 4,7,15,8,20 -s "$(SIMVDIR)/simv2.ipc -l verilog-mhf2.log +load_imem +load_dmem +load_pif +load_rom +mmap_rdram=virdram +vitab=vi-mhf2.tab +cbus_mon +rsp_mon +show_imem_on_r1 +vi_dump -vcd /var/tmp/kluster/mhf2test.dump"
mhf2test.rgb: vi-mhf2.tab $(ROOT)/PR/rdpsim/backend/test/Iosim/Nmhf2.rgb
- rm vi-mhf2.rgb* vi-mhf2.tab???
$(ROOT)/PR/rdpsim/backend/diffvideo -i vi-mhf2.tab -g $(ROOT)/PR/rdpsim/backend/test/Iosim/Nmhf2.rgb -h 0x00200044 -v 0x0050025
#dth2test: $(_FORCE)
# - /usr/bsd/uncompress -c dither.rdram.Z > dither.rdram
# $(ROOT)/PR/iosim/src/iorand -C -d 0x241 -l io-dth2.log -i 10000 -r 10000 -t 21 -s "$(SIMVDIR)/simv2.ipc -l verilog-dth2.log +mmap_rdram=dither +vitab=vi-dth2.tab +cbus_mon"
dth2test: $(_FORCE)
- /usr/bsd/uncompress -c dither.rdram.Z > dither.rdram
$(ROOT)/PR/iosim/src/iorand -m 6 -C -d 0x241 -l io-dth2.log -t 9 -s "$(SIMVDIR)/simv2.ipc -l verilog-dth2.log +mmap_rdram=dither +vitab=vi-dth2.tab +cbus_mon"
dth2test.rgb: vi-dth2.tab $(ROOT)/PR/rdpsim/backend/test/Iosim/Ndth2.rgb
- rm vi-dth2.rgb* vi-dth2.tab???
$(ROOT)/PR/rdpsim/backend/diffvideo -i vi-dth2.tab -g $(ROOT)/PR/rdpsim/backend/test/Iosim/Ndth2.rgb -h 0x00200044 -v 0x0050025