Makefile
3.87 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
#!smake -J 3
#
#
PRDEPTH = ../../../../..
include $(PRDEPTH)/PRdefs
LCOPTS = -g
LVCSOPTS = -y . \
+incdir+$(PRDEPTH)/hw/chip/rcp/inc
OLDOPTS = -y $(PRDEPTH)/hw/chip/rcp/vi/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 \
-P $(ROOT)/PR/rdpsim/test/vi/OutData/vi_gamma/Pli/pli.tab \
$(ROOT)/PR/rdpsim/test/vi/OutData/vi_gamma/Pli/libpli.a \
RTLOPTS = -y $(PRDEPTH)/hw/chip/rcp/vi/src \
-y $(PRDEPTH)/hw/chip/rcp/rdp/src \
-y $(PRDEPTH)/hw/chip/lib/verilog/stdcell \
-y $(PRDEPTH)/hw/chip/lib/verilog/ram \
+libext+.v \
-P $(ROOT)/PR/rdpsim/test/vi/OutData/vi_gamma/Pli/pli.tab \
$(ROOT)/PR/rdpsim/test/vi/OutData/vi_gamma/Pli/libpli.a \
SYNOPTS = -y $(PRDEPTH)/hw/chip/rcp/vi/syn \
-y $(PRDEPTH)/hw/chip/rcp/rdp/syn \
-y $(PRDEPTH)/hw/chip/lib/verilog/stdcell \
-y $(PRDEPTH)/hw/chip/lib/verilog/ram \
+libext+.v+.vsyn \
-P $(ROOT)/PR/rdpsim/test/vi/OutData/vi_gamma/Pli/pli.tab \
$(ROOT)/PR/rdpsim/test/vi/OutData/vi_gamma/Pli/libpli.a \
LDIRT = driver*.v *.mem *.out vcs.log *.dump vi_gamma0?? *.tab simv* inp??? Pli/*.o Pli/*.a checkgamma rsimv* ssimv* rtlcsrc* syncsrc*
SUBDIRS = Pli
HDR = $(ROOT)/PR/include
LCINCS = -I. \
-I$(HDR) \
-I$(ROOT)
include $(PRDEPTH)/PRrules
.mem.out:
ERROR = \
@if grep "ERROR" FILE ; \
then echo ""; \
else \
echo "NO ERRORS IN SIMULATION"; \
fi
RTESTS = rsimv000
STESTS = ssimv000
OTESTS = simv000
default: checkgamma $(RTESTS)
stests: $(STESTS)
otests: $(OTESTS)
$(PLI)/libpli.a: $(_FORCE)
(cd Pli; make ; cd ..)
checkgamma: checkgamma.c vi_gamma.c
$(CC) $(LCINCS) $(LCOPTS) -o $@ checkgamma.c -lm
inp000: inp000.c
$(CC) $(LCINCS) -o $@ $?
vi_gamma000.tab: inp000
inp000 > vi_gamma000.tab
driver000.v: vi_gamma000.tab $(TAB2VMEM)
$(TAB2VMEM) -o /dev/null -s 100 vi_gamma000.tab > driver000.v
simv000: top_level.v driver000.v display.v vi_gamma000.mem $(PLI)/libpli.a checkgamma
$(VCS) $(VCSOPTS) $(OLDOPTS) -o simv000 -Mdir="vi_gamma000" top_level.v driver000.v
@ if [ "$(DUMP)" ]; \
then (echo "simv -dump" ; simv000 -vcd verilog000.dump +out=test000.out +dump=yes +mem=vi_gamma000.mem > simv000.out) \
else (echo "simv -nodump" ; simv000 +mem=vi_gamma000.mem +out=test000.out +vcs+dumpvarsoff > simv000.out) \
fi
checkgamma test000.out | tee checkgamma000.out
$(ERROR:FILE=checkgamma000.out)
rsimv000: top_level.v driver000.v display.v vi_gamma000.mem $(PLI)/libpli.a checkgamma
$(VCS) $(VCSOPTS) $(RTLOPTS) -o rsimv000 -Mdir="rtlcsrc000" top_level.v driver000.v
@ if [ "$(DUMP)" ]; \
then (echo "rsimv -dump" ; rsimv000 -vcd rverilog000.dump +out=rtest000.out +dump=yes +mem=vi_gamma000.mem > rsimv000.out) \
else (echo "rsimv -nodump" ; rsimv000 +mem=vi_gamma000.mem +out=rtest000.out +vcs+dumpvarsoff > rsimv000.out) \
fi
checkgamma rtest000.out | tee rcheckgamma000.out
$(ERROR:FILE=rcheckgamma000.out)
ssimv000: top_level.v driver000.v display.v vi_gamma000.mem $(PLI)/libpli.a checkgamma
$(VCS) $(VCSOPTS) $(SYNOPTS) -o ssimv000 -Mdir="syncsrc000" top_level.v driver000.v
@ if [ "$(DUMP)" ]; \
then (echo "ssimv -dump" ; ssimv000 -vcd sverilog000.dump +out=stest000.out +dump=yes +mem=vi_gamma000.mem > ssimv000.out) \
else (echo "ssimv -nodump" ; ssimv000 +mem=vi_gamma000.mem +out=stest000.out +vcs+dumpvarsoff > ssimv000.out) \
fi
checkgamma stest000.out | tee scheckgamma000.out
$(ERROR:FILE=scheckgamma000.out)