Makefile
2.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
#!smake -J 1
HW = hw2
PRDEPTH = ../../../../..
include $(PRDEPTH)/PRdefs
RTLOPTS = -y ../../fixture/src \
-y $(PRDEPTH)/$(HW)/chip/rcp/tc/src \
-y $(PRDEPTH)/$(HW)/chip/rcp/tm/src \
-y $(PRDEPTH)/$(HW)/chip/lib/verilog/stdcell \
-y $(PRDEPTH)/$(HW)/chip/lib/verilog/ram \
+libext+.v+.vzd \
+incdir+$(PRDEPTH)/$(HW)/chip/rcp/inc
SYNOPTS = -y ../../fixture/src \
-y $(PRDEPTH)/$(HW)/chip/rcp/tc/syn \
-y $(PRDEPTH)/$(HW)/chip/rcp/tm/syn \
-y $(PRDEPTH)/$(HW)/chip/lib/verilog/stdcell \
-y $(PRDEPTH)/$(HW)/chip/lib/verilog/ram \
+libext+.v+.vzd+.vsyn
LDIRT = driver*.v *.mem *.out vcs.log *.dump $(TMPDIR)/$(USER)_ram_bist_tmem000 $(TMPDIR)/$(USER)_ram_bist_tmem000_syn simv*
RTESTS = ram_bist_tmem000
STESTS = ram_bist_tmem000_syn
FAST = fast000
ERROR = \
@if grep "ERROR IN SIMULATION" FILE ; \
then \
echo ""; \
else \
echo "NO ERRORS IN SIMULATION"; \
fi
default: $(RTESTS)
stests: $(STESTS)
include $(PRDEPTH)/PRrules
.mem.out:
$(RTESTS): simv000
$(STESTS): simv000_syn
driver000.v: ram_bist_tmem000.tab.Z $(TAB2VMEM)
/usr/bsd/uncompress ram_bist_tmem000.tab.Z
$(TAB2VMEM) -o /dev/null -s 100 ram_bist_tmem000.tab > driver000.v
/usr/bsd/compress ram_bist_tmem000.tab
ram_bist_tmem000.mem: ram_bist_tmem000.tab.Z
/usr/bsd/uncompress ram_bist_tmem000.tab.Z
$(TAB2VMEM) -o $*.mem -s 100 ram_bist_tmem000.tab > /dev/null
/usr/bsd/compress ram_bist_tmem000.tab
simv000: top_level.v driver000.v ram_bist_tmem000.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(RTLOPTS) -o $@ -Mdir="$(TMPDIR)/$(USER)_ram_bist_tmem000" top_level.v driver000.v
@ if [ "$(DUMP)" ]; \
then (echo "simv000 +mem=ram_bist_tmem000.mem > simv000.out"; simv000 -vcd $(TMPDIR)/$(USER)_verilog000.dump +mem=ram_bist_tmem000.mem > simv000.out;) \
else \
(echo "simv000 +mem=ram_bist_tmem000.mem > simv000.out"; simv000 +mem=ram_bist_tmem000.mem +vcs+dumpvarsoff > simv000.out;) \
fi
$(ERROR:FILE=simv000.out)
$(LOG_ERROR)
simv000_syn: top_level.vsyn driver000.v ram_bist_tmem000.mem $(_FORCE)
$(VCS) $(VCSOPTS) $(SYNOPTS) -o $@ -Mdir="$(TMPDIR)/$(USER)_ram_bist_tmem000_syn" top_level.vsyn driver000.v
@ if [ "$(DUMP)" ]; \
then (echo "$@ +mem=ram_bist_tmem000.mem > $@.out"; $@ -vcd $(TMPDIR)/$(USER)_verilog000_syn.dump +mem=ram_bist_tmem000.mem > $@.out;) \
else \
(echo "$@ +mem=ram_bist_tmem000.mem > $@.out"; $@ +mem=ram_bist_tmem000.mem +vcs+dumpvarsoff > $@.out;) \
fi
$(ERROR:FILE=simv000_syn.out)
$(LOG_ERROR)
fast: $(FAST)
fast000: ram_bist_tmem000.mem
simv000 +mem=$? | tee $*.out