Line 4... |
Line 4... |
##
|
##
|
## Project: A Doubletime Pipelined FFT
|
## Project: A Doubletime Pipelined FFT
|
##
|
##
|
## 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
|
## test benches are designed for the size and arguments of the FFT as
|
## FFT as given by the Makefile in the trunk/sw directory,
|
## given by the Makefile in the trunk/sw directory, although they shouldn't
|
## although they shouldn't be too difficult to modify for
|
## be too difficult to modify for other FFT parameters.
|
## other FFT parameters.
|
##
|
##
|
## Please note that running these test benches requires access to the
|
## Please note that running these test benches requires access
|
## *cmem_*.hex files found in trunk/rtl. I usually soft link
|
## to the *cmem_*.hex files found in trunk/sw/fft-core. I
|
## them into this directory, but such linking is not currently part of
|
## usually soft link them into this directory, but such linking
|
## this makefile or the build scripts.
|
## is not currently part of 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, 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
|
## by the Free Software Foundation, either version 3 of the License, or (at
|
## by the Free Software Foundation, either version 3 of the License, or (at
|
## your option) any later version.
|
## your option) any later version.
|
Line 41... |
Line 40... |
## 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 dblrev_tb dblstage_tb qtrstage_tb fft_tb test
|
all: mpy_tb bitreverse_tb hwbfly_tb butterfly_tb fftstage_tb fft_tb
|
|
all: qtrstage_tb laststage_tb test
|
|
|
OBJDR:= ../../sw/fft-core/obj_dir
|
OBJDR:= ../../rtl/obj_dir
|
VSRCD = ../../sw/fft-core
|
VSRCD = ../../rtl
|
TBODR:= ../rtl/obj_dir
|
TBODR:= ../rtl/obj_dir
|
ifneq ($(VERILATOR_ROOT),)
|
ifneq ($(VERILATOR_ROOT),)
|
VERILATOR:=$(VERILATOR_ROOT)/bin/verilator
|
VERILATOR:=$(VERILATOR_ROOT)/bin/verilator
|
else
|
else
|
VERILATOR:=verilator
|
VERILATOR:=verilator
|
Line 58... |
Line 58... |
VROOT := $(VERILATOR_ROOT)
|
VROOT := $(VERILATOR_ROOT)
|
VDEFS:= $(shell ./vversion.sh)
|
VDEFS:= $(shell ./vversion.sh)
|
VINC := -I$(VROOT)/include -I$(OBJDR)/ -I$(TBODR)/
|
VINC := -I$(VROOT)/include -I$(OBJDR)/ -I$(TBODR)/
|
# MPYLB:= $(OBJDR)/Vshiftaddmpy__ALL.a
|
# MPYLB:= $(OBJDR)/Vshiftaddmpy__ALL.a
|
MPYLB:= $(OBJDR)/Vlongbimpy__ALL.a
|
MPYLB:= $(OBJDR)/Vlongbimpy__ALL.a
|
DBLRV:= $(OBJDR)/Vdblreverse__ALL.a
|
BTREV:= $(OBJDR)/Vbitreverse__ALL.a
|
DBLSG:= $(OBJDR)/Vdblstage__ALL.a
|
STAGE:= $(OBJDR)/Vfftstage__ALL.a
|
QTRSG:= $(OBJDR)/Vqtrstage__ALL.a
|
QTRSG:= $(OBJDR)/Vqtrstage__ALL.a
|
|
LSTSG:= $(OBJDR)/Vlaststage__ALL.a
|
BFLYL:= $(OBJDR)/Vbutterfly__ALL.a
|
BFLYL:= $(OBJDR)/Vbutterfly__ALL.a
|
HWBFY:= $(OBJDR)/Vhwbfly__ALL.a
|
HWBFY:= $(OBJDR)/Vhwbfly__ALL.a
|
FFTLB:= $(OBJDR)/Vfftmain__ALL.a
|
FFTLB:= $(OBJDR)/Vfftmain__ALL.a
|
IFTLB:= $(TBODR)/Vifft_tb__ALL.a
|
IFTLB:= $(TBODR)/Vifft_tb__ALL.a
|
STGLB:= $(OBJDR)/Vfftstage_o2048__ALL.a
|
STGLB:= $(OBJDR)/Vfftstage__ALL.a
|
VSRCS:= $(VROOT)/include/verilated.cpp $(VROOT)/include/verilated_vcd_c.cpp
|
VSRCS:= $(VROOT)/include/verilated.cpp $(VROOT)/include/verilated_vcd_c.cpp
|
|
|
mpy_tb: mpy_tb.cpp fftsize.h twoc.h $(MPYLB)
|
mpy_tb: mpy_tb.cpp fftsize.h twoc.h $(MPYLB)
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(MPYLB) $(VSRCS) -o $@
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(MPYLB) $(VSRCS) -o $@
|
|
|
dblrev_tb: dblrev_tb.cpp twoc.cpp twoc.h fftsize.h $(DBLRV)
|
bitreverse_tb: bitreverse_tb.cpp twoc.cpp twoc.h fftsize.h $(BTREV)
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(DBLRV) $(VSRCS) -o $@
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(BTREV) $(VSRCS) -o $@
|
|
|
dblstage_tb: dblstage_tb.cpp twoc.cpp twoc.h $(DBLSG)
|
laststage_tb: laststage_tb.cpp twoc.cpp twoc.h $(LSTSG)
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(DBLSG) $(VSRCS) -o $@
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(LSTSG) $(VSRCS) -o $@
|
|
|
qtrstage_tb: qtrstage_tb.cpp twoc.cpp twoc.h $(QTRSG)
|
qtrstage_tb: qtrstage_tb.cpp twoc.cpp twoc.h $(QTRSG)
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(QTRSG) $(VSRCS) -o $@
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(QTRSG) $(VSRCS) -o $@
|
|
|
butterfly_tb: butterfly_tb.cpp twoc.cpp twoc.h fftsize.h $(BFLYL)
|
butterfly_tb: butterfly_tb.cpp twoc.cpp twoc.h fftsize.h $(BFLYL)
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(BFLYL) $(VSRCS) -o $@
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(BFLYL) $(VSRCS) -o $@
|
|
|
hwbfly_tb: hwbfly_tb.cpp twoc.cpp twoc.h $(HWBFY)
|
hwbfly_tb: hwbfly_tb.cpp twoc.cpp twoc.h $(HWBFY)
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(HWBFY) $(VSRCS) -o $@
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(HWBFY) $(VSRCS) -o $@
|
|
|
fftstage_o2048_tb: fftstage_o2048_tb.cpp twoc.cpp twoc.h $(STGLB)
|
fftstage_tb: fftstage_tb.cpp twoc.cpp twoc.h $(STGLB)
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(STGLB) $(VSRCS) -o $@
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(STGLB) $(VSRCS) -o $@
|
|
|
fft_tb: fft_tb.cpp twoc.cpp twoc.h fftsize.h $(FFTLB)
|
fft_tb: fft_tb.cpp twoc.cpp twoc.h fftsize.h $(FFTLB)
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(FFTLB) $(VSRCS) -lfftw3 -o $@
|
g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(FFTLB) $(VSRCS) -lfftw3 -o $@
|
|
|
Line 110... |
Line 111... |
# echo ln -s $* $<
|
# echo ln -s $* $<
|
HEX:
|
HEX:
|
ln -s $(VSRCD)/*.hex .
|
ln -s $(VSRCD)/*.hex .
|
|
|
.PHONY: test
|
.PHONY: test
|
test: mpy_tb dblrev_tb dblstage_tb qtrstage_tb butterfly_tb fftstage_o2048_tb
|
test: mpy_tb bitreverse_tb fftstage_tb qtrstage_tb butterfly_tb fftstage_tb
|
test: fft_tb ifft_tb hwbfly_tb
|
test: fft_tb ifft_tb hwbfly_tb
|
./mpy_tb
|
./mpy_tb
|
./dblrev_tb
|
./bitreverse_tb
|
./dblstage_tb
|
./fftstage_tb
|
./qtrstage_tb
|
echo ./qtrstage_tb
|
./butterfly_tb
|
./butterfly_tb
|
./hwbfly_tb
|
./hwbfly_tb
|
./fftstage_o2048_tb
|
./fftstage_tb
|
./fft_tb
|
./fft_tb
|
./ifft_tb
|
./ifft_tb
|
|
|
.PHONY: clean
|
.PHONY: clean
|
clean:
|
clean:
|
rm -f mpy_tb dblrev_tb dblstage_tb qtrstage_tb butterfly_tb
|
rm -f mpy_tb bitreverse_tb fftstage_tb qtrstage_tb butterfly_tb
|
rm -f fftstage_o2048_tb fft_tb ifft_tb hwbfly_tb
|
rm -f fftstage_tb fft_tb ifft_tb hwbfly_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
|
|
|
include $(VERILATOR_ROOT)/include/verilated.mk
|
include $(VERILATOR_ROOT)/include/verilated.mk
|