OpenCores
URL https://opencores.org/ocsvn/dblclockfft/dblclockfft/trunk

Subversion Repositories dblclockfft

[/] [dblclockfft/] [trunk/] [bench/] [cpp/] [Makefile] - Blame information for rev 41

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 41 dgisselq
################################################################################
2 16 dgisselq
##
3
## Filename:    Makefile
4
##
5 41 dgisselq
## Project:     A General Purpose Pipelined FFT Implementation
6 16 dgisselq
##
7
## Purpose:     This programs the build process for the test benches
8
##              associated with the double clocked FFT project.  These
9 36 dgisselq
##      test benches are designed for the size and arguments of the FFT as
10
##      given by the Makefile in the trunk/sw directory, although they shouldn't
11
##      be too difficult to modify for other FFT parameters.
12 16 dgisselq
##
13 36 dgisselq
##      Please note that running these test benches requires access to the
14 41 dgisselq
##      *cmem_*.hex files found in trunk/rtl.  They will be linked into this
15
##      directory as part of the tests.
16 16 dgisselq
##
17
## Creator:     Dan Gisselquist, Ph.D.
18 30 dgisselq
##              Gisselquist Technology, LLC
19 16 dgisselq
##
20 41 dgisselq
################################################################################
21 16 dgisselq
##
22 36 dgisselq
## Copyright (C) 2015,2018 Gisselquist Technology, LLC
23 16 dgisselq
##
24
## This program is free software (firmware): you can redistribute it and/or
25
## modify it under the terms of  the GNU General Public License as published
26
## by the Free Software Foundation, either version 3 of the License, or (at
27
## your option) any later version.
28
##
29
## This program is distributed in the hope that it will be useful, but WITHOUT
30
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
31
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
32
## for more details.
33
##
34
## You should have received a copy of the GNU General Public License along
35 41 dgisselq
## with this program.  (It's in the $(ROOT)/doc directory.  Run make with no
36 16 dgisselq
## target there if the PDF file isn't present.)  If not, see
37 41 dgisselq
##  for a copy.
38 16 dgisselq
##
39
## License:     GPL, v3, as defined and found on www.gnu.org,
40 41 dgisselq
##              http://www.gnu.org/licenses/gpl.html
41 16 dgisselq
##
42
##
43 41 dgisselq
################################################################################
44 36 dgisselq
all: mpy_tb bitreverse_tb hwbfly_tb butterfly_tb fftstage_tb fft_tb
45 41 dgisselq
all: qtrstage_tb laststage_tb
46 3 dgisselq
 
47 36 dgisselq
OBJDR:= ../../rtl/obj_dir
48
VSRCD = ../../rtl
49 16 dgisselq
TBODR:= ../rtl/obj_dir
50 35 dgisselq
ifneq ($(VERILATOR_ROOT),)
51
VERILATOR:=$(VERILATOR_ROOT)/bin/verilator
52
else
53
VERILATOR:=verilator
54
VERILATOR_ROOT ?= $(shell bash -c 'verilator -V|grep VERILATOR_ROOT | head -1 | sed -e " s/^.*=\s*//"')
55
endif
56
export  $(VERILATOR)
57 32 dgisselq
VROOT   := $(VERILATOR_ROOT)
58 35 dgisselq
VDEFS:= $(shell ./vversion.sh)
59 32 dgisselq
VINC := -I$(VROOT)/include -I$(OBJDR)/ -I$(TBODR)/
60 29 dgisselq
# MPYLB:= $(OBJDR)/Vshiftaddmpy__ALL.a
61
MPYLB:= $(OBJDR)/Vlongbimpy__ALL.a
62 36 dgisselq
BTREV:= $(OBJDR)/Vbitreverse__ALL.a
63
STAGE:= $(OBJDR)/Vfftstage__ALL.a
64 3 dgisselq
QTRSG:= $(OBJDR)/Vqtrstage__ALL.a
65 36 dgisselq
LSTSG:= $(OBJDR)/Vlaststage__ALL.a
66 5 dgisselq
BFLYL:= $(OBJDR)/Vbutterfly__ALL.a
67 22 dgisselq
HWBFY:= $(OBJDR)/Vhwbfly__ALL.a
68 6 dgisselq
FFTLB:= $(OBJDR)/Vfftmain__ALL.a
69 16 dgisselq
IFTLB:= $(TBODR)/Vifft_tb__ALL.a
70 36 dgisselq
STGLB:= $(OBJDR)/Vfftstage__ALL.a
71 35 dgisselq
VSRCS:= $(VROOT)/include/verilated.cpp $(VROOT)/include/verilated_vcd_c.cpp
72 3 dgisselq
 
73 29 dgisselq
mpy_tb: mpy_tb.cpp fftsize.h twoc.h $(MPYLB)
74 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(MPYLB) $(VSRCS) -o $@
75 3 dgisselq
 
76 36 dgisselq
bitreverse_tb: bitreverse_tb.cpp twoc.cpp twoc.h fftsize.h $(BTREV)
77
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(BTREV) $(VSRCS) -o $@
78 3 dgisselq
 
79 36 dgisselq
laststage_tb: laststage_tb.cpp twoc.cpp twoc.h $(LSTSG)
80
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(LSTSG) $(VSRCS) -o $@
81 3 dgisselq
 
82 23 dgisselq
qtrstage_tb: qtrstage_tb.cpp twoc.cpp twoc.h $(QTRSG)
83 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(QTRSG) $(VSRCS) -o $@
84 3 dgisselq
 
85 29 dgisselq
butterfly_tb: butterfly_tb.cpp twoc.cpp twoc.h fftsize.h $(BFLYL)
86 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(BFLYL) $(VSRCS) -o $@
87 5 dgisselq
 
88 23 dgisselq
hwbfly_tb: hwbfly_tb.cpp twoc.cpp twoc.h $(HWBFY)
89 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(HWBFY) $(VSRCS) -o $@
90 22 dgisselq
 
91 36 dgisselq
fftstage_tb: fftstage_tb.cpp twoc.cpp twoc.h $(STGLB)
92 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(STGLB) $(VSRCS) -o $@
93 6 dgisselq
 
94 29 dgisselq
fft_tb: fft_tb.cpp twoc.cpp twoc.h fftsize.h $(FFTLB)
95 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(FFTLB) $(VSRCS) -lfftw3 -o $@
96 6 dgisselq
 
97 29 dgisselq
ifft_tb: ifft_tb.cpp twoc.cpp twoc.h fftsize.h $(IFTLB)
98 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(IFTLB) $(VSRCS) -lfftw3 -o $@
99 23 dgisselq
 
100 16 dgisselq
.PHONY: HEX
101
HEX:
102 41 dgisselq
        ln -sf $(VSRCD)/*.hex .
103 14 dgisselq
 
104 5 dgisselq
.PHONY: test
105 41 dgisselq
test: mpy_tb.pass bitreverse_tb.pass fftstage_tb.pass qtrstage_tb.pass
106
test: laststage_tb.pass butterfly_tb.pass hwbfly_tb.pass
107
test: fft_tb HEX # ifft_tb
108
        ./fft_tb
109
 
110
mpy_tb.pass: mpy_tb
111 5 dgisselq
        ./mpy_tb
112 41 dgisselq
        touch mpy_tb.pass
113
 
114
fftstage_tb.pass: fftstage_tb HEX
115 36 dgisselq
        ./fftstage_tb
116 41 dgisselq
        touch fftstage_tb.pass
117
 
118
butterfly_tb.pass: butterfly_tb
119 5 dgisselq
        ./butterfly_tb
120 41 dgisselq
        touch butterfly_tb.pass
121
 
122
hwbfly_tb.pass: hwbfly_tb
123 22 dgisselq
        ./hwbfly_tb
124 41 dgisselq
        touch hwbfly_tb.pass
125 5 dgisselq
 
126 41 dgisselq
qtrstage_tb.pass: qtrstage_tb
127
        ./qtrstage_tb
128
        touch qtrstage_tb.pass
129
 
130
laststage_tb.pass: laststage_tb
131
        ./laststage_tb
132
        touch laststage_tb.pass
133
 
134
bitreverse_tb.pass: bitreverse_tb
135
        ./bitreverse_tb
136
        touch bitreverse_tb.pass
137
 
138 5 dgisselq
.PHONY: clean
139 3 dgisselq
clean:
140 36 dgisselq
        rm -f mpy_tb bitreverse_tb fftstage_tb qtrstage_tb butterfly_tb
141 41 dgisselq
        rm -f fftstage_tb fft_tb ifft_tb hwbfly_tb laststage_tb
142 16 dgisselq
        rm -rf fft_tb.dbl ifft_tb.dbl
143
        rm -rf *cmem_*.hex
144 41 dgisselq
        rm -rf *.pass *.vcd
145 3 dgisselq
 
146
include $(VERILATOR_ROOT)/include/verilated.mk

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.