Line 1... |
Line 1... |
############################################################################
|
################################################################################
|
##
|
##
|
## Filename: Makefile
|
## Filename: Makefile
|
##
|
##
|
## Project: A Doubletime Pipelined FFT
|
## Project: A General Purpose Pipelined FFT Implementation
|
##
|
##
|
## Purpose: This programs the build process for the test benches
|
## Purpose: This programs the build process for the test benches
|
## associated with the double clocked FFT project. These
|
## associated with the double clocked FFT project. These
|
## test benches are designed for the size and arguments of the FFT as
|
## test benches are designed for the size and arguments of the FFT as
|
## given by the Makefile in the trunk/sw directory, although they shouldn't
|
## given by the Makefile in the trunk/sw directory, although they shouldn't
|
## be too difficult to modify for other FFT parameters.
|
## be too difficult to modify for other FFT parameters.
|
##
|
##
|
## Please note that running these test benches requires access to the
|
## Please note that running these test benches requires access to the
|
## *cmem_*.hex files found in trunk/rtl. I usually soft link
|
## *cmem_*.hex files found in trunk/rtl. They will be linked into this
|
## them into this directory, but such linking is not currently part of
|
## directory as part of the tests.
|
## this makefile or the build scripts.
|
|
##
|
##
|
## Creator: Dan Gisselquist, Ph.D.
|
## Creator: Dan Gisselquist, Ph.D.
|
## Gisselquist Technology, LLC
|
## Gisselquist Technology, LLC
|
##
|
##
|
##########################################################################/
|
################################################################################
|
##
|
##
|
## Copyright (C) 2015,2018 Gisselquist Technology, LLC
|
## Copyright (C) 2015,2018 Gisselquist Technology, LLC
|
##
|
##
|
## This program is free software (firmware): you can redistribute it and/or
|
## This program is free software (firmware): you can redistribute it and/or
|
## modify it under the terms of the GNU General Public License as published
|
## modify it under the terms of the GNU General Public License as published
|
Line 31... |
Line 30... |
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
|
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
## for more details.
|
## for more details.
|
##
|
##
|
## You should have received a copy of the GNU General Public License along
|
## You should have received a copy of the GNU General Public License along
|
## with this program. (It's in the $(ROOT)/doc directory, run make with no
|
## with this program. (It's in the $(ROOT)/doc directory. Run make with no
|
## target there if the PDF file isn't present.) If not, see
|
## target there if the PDF file isn't present.) If not, see
|
## for a copy.
|
## for a copy.
|
##
|
##
|
## License: GPL, v3, as defined and found on www.gnu.org,
|
## License: GPL, v3, as defined and found on www.gnu.org,
|
## http:##www.gnu.org/licenses/gpl.html
|
## http://www.gnu.org/licenses/gpl.html
|
##
|
##
|
##
|
##
|
##########################################################################/
|
################################################################################
|
all: mpy_tb bitreverse_tb hwbfly_tb butterfly_tb fftstage_tb fft_tb
|
all: mpy_tb bitreverse_tb hwbfly_tb butterfly_tb fftstage_tb fft_tb
|
all: qtrstage_tb laststage_tb test
|
all: qtrstage_tb laststage_tb
|
|
|
OBJDR:= ../../rtl/obj_dir
|
OBJDR:= ../../rtl/obj_dir
|
VSRCD = ../../rtl
|
VSRCD = ../../rtl
|
TBODR:= ../rtl/obj_dir
|
TBODR:= ../rtl/obj_dir
|
ifneq ($(VERILATOR_ROOT),)
|
ifneq ($(VERILATOR_ROOT),)
|
Line 97... |
Line 96... |
|
|
ifft_tb: ifft_tb.cpp twoc.cpp twoc.h fftsize.h $(IFTLB)
|
ifft_tb: ifft_tb.cpp twoc.cpp twoc.h fftsize.h $(IFTLB)
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(IFTLB) $(VSRCS) -lfftw3 -o $@
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(IFTLB) $(VSRCS) -lfftw3 -o $@
|
|
|
.PHONY: HEX
|
.PHONY: HEX
|
# HEX: cmem_e2048.hex cmem_e1024.hex cmem_e512.hex cmem_e256.hex
|
|
# HEX: cmem_o2048.hex cmem_o1024.hex cmem_o512.hex cmem_o256.hex
|
|
# HEX: icmem_e2048.hex icmem_e1024.hex icmem_e512.hex icmem_e256.hex
|
|
# HEX: icmem_o2048.hex icmem_o1024.hex icmem_o512.hex icmem_o256.hex
|
|
# HEX: cmem_e128.hex cmem_e64.hex cmem_e32.hex cmem_e16.hex cmem_e8.hex
|
|
# HEX: cmem_o128.hex cmem_o64.hex cmem_o32.hex cmem_o16.hex cmem_o8.hex
|
|
# HEX: icmem_e128.hex icmem_e64.hex icmem_e32.hex icmem_e16.hex icmem_e8.hex
|
|
# HEX: icmem_o128.hex icmem_o64.hex icmem_o32.hex icmem_o16.hex icmem_o8.hex
|
|
# cmem_%.hex: $(VSRCD)/cmem_%.hex
|
|
# echo ln -s $* $<
|
|
HEX:
|
HEX:
|
ln -s $(VSRCD)/*.hex .
|
ln -sf $(VSRCD)/*.hex .
|
|
|
.PHONY: test
|
.PHONY: test
|
test: mpy_tb bitreverse_tb fftstage_tb qtrstage_tb butterfly_tb fftstage_tb
|
test: mpy_tb.pass bitreverse_tb.pass fftstage_tb.pass qtrstage_tb.pass
|
test: fft_tb ifft_tb hwbfly_tb
|
test: laststage_tb.pass butterfly_tb.pass hwbfly_tb.pass
|
|
test: fft_tb HEX # ifft_tb
|
|
./fft_tb
|
|
|
|
mpy_tb.pass: mpy_tb
|
./mpy_tb
|
./mpy_tb
|
./bitreverse_tb
|
touch mpy_tb.pass
|
|
|
|
fftstage_tb.pass: fftstage_tb HEX
|
./fftstage_tb
|
./fftstage_tb
|
echo ./qtrstage_tb
|
touch fftstage_tb.pass
|
|
|
|
butterfly_tb.pass: butterfly_tb
|
./butterfly_tb
|
./butterfly_tb
|
|
touch butterfly_tb.pass
|
|
|
|
hwbfly_tb.pass: hwbfly_tb
|
./hwbfly_tb
|
./hwbfly_tb
|
./fftstage_tb
|
touch hwbfly_tb.pass
|
./fft_tb
|
|
./ifft_tb
|
qtrstage_tb.pass: qtrstage_tb
|
|
./qtrstage_tb
|
|
touch qtrstage_tb.pass
|
|
|
|
laststage_tb.pass: laststage_tb
|
|
./laststage_tb
|
|
touch laststage_tb.pass
|
|
|
|
bitreverse_tb.pass: bitreverse_tb
|
|
./bitreverse_tb
|
|
touch bitreverse_tb.pass
|
|
|
.PHONY: clean
|
.PHONY: clean
|
clean:
|
clean:
|
rm -f mpy_tb bitreverse_tb fftstage_tb qtrstage_tb butterfly_tb
|
rm -f mpy_tb bitreverse_tb fftstage_tb qtrstage_tb butterfly_tb
|
rm -f fftstage_tb fft_tb ifft_tb hwbfly_tb
|
rm -f fftstage_tb fft_tb ifft_tb hwbfly_tb laststage_tb
|
rm -rf fft_tb.dbl ifft_tb.dbl
|
rm -rf fft_tb.dbl ifft_tb.dbl
|
rm -rf *cmem_*.hex
|
rm -rf *cmem_*.hex
|
|
rm -rf *.pass *.vcd
|
|
|
include $(VERILATOR_ROOT)/include/verilated.mk
|
include $(VERILATOR_ROOT)/include/verilated.mk
|