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

Subversion Repositories dblclockfft

[/] [dblclockfft/] [trunk/] [sw/] [Makefile] - Blame information for rev 35

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 16 dgisselq
############################################################################/
2
##
3 30 dgisselq
## Filename:    Makefile
4 16 dgisselq
##
5
## Project:     A Doubletime Pipelined FFT
6
##
7
## Purpose:     This is the main Makefile for the FFT core generator.
8
##              It is very simple in its construction, the most complicated
9
##              parts being the building of the Verilator simulation--a
10
##              step that may not be required for your project.
11
##
12
##              To build the FFT generator, just type 'make' on a line
13
##              by itself.  For a quick tutorial in how to run the
14
##              generator, just type './fftgen -h' to read the usage()
15
##              statement.
16
##
17
## Creator:     Dan Gisselquist, Ph.D.
18 30 dgisselq
##              Gisselquist Technology, LLC
19 16 dgisselq
##
20
##########################################################################/
21
##
22
## Copyright (C) 2015, Gisselquist Technology, LLC
23
##
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
## with this program.  (It's in the $(ROOT)/doc directory, run make with no
36
## target there if the PDF file isn't present.)  If not, see
37
##  for a copy.
38
##
39
## License:     GPL, v3, as defined and found on www.gnu.org,
40
##              http:##www.gnu.org/licenses/gpl.html
41
##
42
##
43
##########################################################################/
44
##
45
##
46 2 dgisselq
# This is really simple ...
47
all: fftgen
48
CORED := fft-core
49
OBJDR := $(CORED)/obj_dir
50 28 dgisselq
TESTSZ := 2048
51
BENCHD := ../bench/cpp
52 35 dgisselq
ifneq ($(VERILATOR_ROOT),)
53
VERILATOR:=$(VERILATOR_ROOT)/bin/verilator
54
else
55
VERILATOR:=verilator
56
VERILATOR_ROOT ?= $(shell bash -c 'verilator -V|grep VERILATOR_ROOT | head -1 | sed -e " s/^.*=\s*//"')
57
endif
58
export  $(VERILATOR)
59
VROOT   := $(VERILATOR_ROOT)
60
VFLAGS  := -Wall -MMD --trace -cc
61 2 dgisselq
 
62
fftgen: fftgen.o
63
        $(CXX) $< -o $@
64
 
65
%.o: %.cpp
66
        $(CXX) -c $< -o $@
67
 
68 5 dgisselq
.PHONY: test
69 29 dgisselq
test: fft ifft butterfly dblreverse qtrstage dblstage fftstage_o2048
70
test: hwbfly shiftaddmpy longbimpy
71 3 dgisselq
 
72 16 dgisselq
#
73
# Although these parameters, a 2048 point FFT of 16 bits input, aren't
74
# the only parameters the FFT can do, they are the ones that the test
75
# benches depend upon.  If you change these, and you are welcome to do so,
76
# you may need to adjust the test benches if you wish to prove that your
77
# changes work.
78
#
79 5 dgisselq
.PHONY: fft
80
fft: fftgen
81 28 dgisselq
        ./fftgen -f $(TESTSZ) -n 16 -p 6 -a $(BENCHD)/fftsize.h
82 35 dgisselq
        cd $(CORED)/; $(VERILATOR) $(VFLAGS) fftmain.v
83 2 dgisselq
        cd $(OBJDR); make -f Vfftmain.mk
84 3 dgisselq
 
85 5 dgisselq
.PHONY: ifft
86
ifft: fftgen
87 28 dgisselq
        ./fftgen -f $(TESTSZ) -i -n 22  -p 6 -a $(BENCHD)/ifftsize.h
88 35 dgisselq
        cd $(CORED)/; $(VERILATOR) $(VFLAGS) ifftmain.v
89 2 dgisselq
        cd $(OBJDR); make -f Vifftmain.mk
90
 
91 3 dgisselq
.PHONY: shiftaddmpy
92
shiftaddmpy: $(OBJDR)/Vshiftaddmpy__ALL.a
93
 
94 6 dgisselq
$(CORED)/shiftaddmpy.v: fft
95 2 dgisselq
$(OBJDR)/Vshiftaddmpy.cpp $(OBJDR)/Vshiftaddmpy.h: $(CORED)/shiftaddmpy.v
96 35 dgisselq
        cd $(CORED)/; $(VERILATOR) $(VFLAGS) shiftaddmpy.v
97 3 dgisselq
$(OBJDR)/Vshiftaddmpy__ALL.a: $(OBJDR)/Vshiftaddmpy.h
98
$(OBJDR)/Vshiftaddmpy__ALL.a: $(OBJDR)/Vshiftaddmpy.cpp
99 2 dgisselq
        cd $(OBJDR)/; make -f Vshiftaddmpy.mk
100
 
101 29 dgisselq
.PHONY: longbimpy
102
longbimpy: $(OBJDR)/Vlongbimpy__ALL.a
103
 
104
$(CORED)/longbimpy.v: fft
105
$(OBJDR)/Vlongbimpy.cpp $(OBJDR)/Vlongbimpy.h: $(CORED)/longbimpy.v
106 35 dgisselq
        cd $(CORED)/; $(VERILATOR) $(VFLAGS) longbimpy.v
107 29 dgisselq
$(OBJDR)/Vlongbimpy__ALL.a: $(OBJDR)/Vlongbimpy.h
108
$(OBJDR)/Vlongbimpy__ALL.a: $(OBJDR)/Vlongbimpy.cpp
109
        cd $(OBJDR)/; make -f Vlongbimpy.mk
110
 
111 3 dgisselq
.PHONY: butterfly
112
butterfly: $(OBJDR)/Vbutterfly__ALL.a
113
 
114 5 dgisselq
$(CORED)/butterfly.v: fft
115 2 dgisselq
$(OBJDR)/Vbutterfly.cpp $(OBJDR)/Vbutterfly.h: $(CORED)/butterfly.v
116 35 dgisselq
        cd $(CORED)/; $(VERILATOR) $(VFLAGS) butterfly.v
117 2 dgisselq
$(OBJDR)/Vbutterfly__ALL.a: $(OBJDR)/Vbutterfly.h
118
$(OBJDR)/Vbutterfly__ALL.a: $(OBJDR)/Vbutterfly.cpp
119
        cd $(OBJDR)/; make -f Vbutterfly.mk
120
 
121 22 dgisselq
.PHONY: hwbfly
122
hwbfly: $(OBJDR)/Vhwbfly__ALL.a
123
 
124
$(CORED)/hwbfly.v: fft
125
$(OBJDR)/Vhwbfly.cpp $(OBJDR)/Vhwbfly.h: $(CORED)/hwbfly.v
126 35 dgisselq
        cd $(CORED)/; $(VERILATOR) $(VFLAGS) hwbfly.v
127 22 dgisselq
$(OBJDR)/Vhwbfly__ALL.a: $(OBJDR)/Vhwbfly.h
128
$(OBJDR)/Vhwbfly__ALL.a: $(OBJDR)/Vhwbfly.cpp
129
        cd $(OBJDR)/; make -f Vhwbfly.mk
130
 
131 3 dgisselq
.PHONY: dblreverse
132
dblreverse: $(OBJDR)/Vdblreverse__ALL.a
133
 
134 5 dgisselq
$(CORED)/dblreverse.v: fft
135 2 dgisselq
$(OBJDR)/Vdblreverse.cpp $(OBJDR)/Vdblreverse.h: $(CORED)/dblreverse.v
136 35 dgisselq
        cd $(CORED)/; $(VERILATOR) $(VFLAGS) dblreverse.v
137 2 dgisselq
$(OBJDR)/Vdblreverse__ALL.a: $(OBJDR)/Vdblreverse.h
138
$(OBJDR)/Vdblreverse__ALL.a: $(OBJDR)/Vdblreverse.cpp
139
        cd $(OBJDR)/; make -f Vdblreverse.mk
140
 
141 3 dgisselq
.PHONY: qtrstage
142
qtrstage: $(OBJDR)/Vqtrstage__ALL.a
143
 
144 5 dgisselq
$(CORED)/qtrstage.v: fft
145 2 dgisselq
$(OBJDR)/Vqtrstage.cpp $(OBJDR)/Vqtrstage.h: $(CORED)/qtrstage.v
146 35 dgisselq
        cd $(CORED)/; $(VERILATOR) $(VFLAGS) qtrstage.v
147 2 dgisselq
$(OBJDR)/Vqtrstage__ALL.a: $(OBJDR)/Vqtrstage.h
148
$(OBJDR)/Vqtrstage__ALL.a: $(OBJDR)/Vqtrstage.cpp
149
        cd $(OBJDR)/; make -f Vqtrstage.mk
150
 
151 3 dgisselq
.PHONY: dblstage
152
dblstage: $(OBJDR)/Vdblstage__ALL.a
153
 
154 5 dgisselq
$(CORED)/dblstage.v: fft
155 2 dgisselq
$(OBJDR)/Vdblstage.cpp $(OBJDR)/Vdblstage.h: $(CORED)/dblstage.v
156 35 dgisselq
        cd $(CORED)/; $(VERILATOR) $(VFLAGS) dblstage.v
157 2 dgisselq
$(OBJDR)/Vdblstage__ALL.a: $(OBJDR)/Vdblstage.h
158
$(OBJDR)/Vdblstage__ALL.a: $(OBJDR)/Vdblstage.cpp
159
        cd $(OBJDR)/; make -f Vdblstage.mk
160
 
161 6 dgisselq
.PHONY: fftstage_o2048
162
dblstage: $(OBJDR)/Vfftstage_o2048__ALL.a
163
 
164
$(CORED)/fftstage_o2048.v: fft
165
$(OBJDR)/Vfftstage_o2048.cpp $(OBJDR)/Vfftstage_o2048.h: $(CORED)/fftstage_o2048.v
166 35 dgisselq
        cd $(CORED)/; $(VERILATOR) $(VFLAGS) fftstage_o2048.v
167 6 dgisselq
$(OBJDR)/Vfftstage_o2048__ALL.a: $(OBJDR)/Vfftstage_o2048.h
168
$(OBJDR)/Vfftstage_o2048__ALL.a: $(OBJDR)/Vfftstage_o2048.cpp
169
        cd $(OBJDR)/; make -f Vfftstage_o2048.mk
170
 
171 5 dgisselq
.PHONY: clean
172 2 dgisselq
clean:
173
        rm fftgen fftgen.o
174
        rm -rf $(CORED)
175
 
176
 

powered by: WebSVN 2.1.0

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