| 1 |
17 |
dgisselq |
all: ifft_tb
|
| 2 |
23 |
dgisselq |
############################################################################
|
| 3 |
|
|
##
|
| 4 |
|
|
## Filename: Makefile
|
| 5 |
|
|
##
|
| 6 |
|
|
## Project: A Doubletime Pipelined FFT
|
| 7 |
|
|
##
|
| 8 |
|
|
## Purpose: This programs the build process for part of the ifft_tb test
|
| 9 |
|
|
## bench associated with the double clocked FFT project.
|
| 10 |
|
|
##
|
| 11 |
|
|
## This is only part of the test bench program. This one is
|
| 12 |
|
|
## different from the others, in that the ifft_tb includes
|
| 13 |
|
|
## both verilator code in the test bench as well as the
|
| 14 |
|
|
## C++ code. The C++ code will depend upon the verilog
|
| 15 |
|
|
## code found in this directory and built here.
|
| 16 |
|
|
##
|
| 17 |
|
|
## Creator: Dan Gisselquist, Ph.D.
|
| 18 |
30 |
dgisselq |
## Gisselquist Technology, LLC
|
| 19 |
23 |
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 |
35 |
dgisselq |
##
|
| 45 |
|
|
##
|
| 46 |
|
|
# This is really simple ...
|
| 47 |
|
|
all: ifft_tb
|
| 48 |
|
|
CORED := fft-core
|
| 49 |
|
|
ifneq ($(VERILATOR_ROOT),)
|
| 50 |
|
|
VERILATOR:=$(VERILATOR_ROOT)/bin/verilator
|
| 51 |
|
|
else
|
| 52 |
|
|
VERILATOR:=verilator
|
| 53 |
|
|
VERILATOR_ROOT ?= $(shell bash -c 'verilator -V|grep VERILATOR_ROOT | head -1 | sed -e " s/^.*=\s*//"')
|
| 54 |
|
|
endif
|
| 55 |
|
|
export $(VERILATOR)
|
| 56 |
|
|
VROOT := $(VERILATOR_ROOT)
|
| 57 |
|
|
VSRCD := ../../sw/$(CORED)
|
| 58 |
|
|
VFLAGS := -Wall -MMD --trace -y $(VSRCD) -cc
|
| 59 |
17 |
dgisselq |
|
| 60 |
|
|
LCLDR:= obj_dir
|
| 61 |
|
|
IFTLB:= $(LCLDR)/Vifft_tb__ALL.a
|
| 62 |
|
|
|
| 63 |
|
|
.PHONY: ifft_tb
|
| 64 |
|
|
ifft_tb: $(IFTLB)
|
| 65 |
|
|
|
| 66 |
|
|
$(IFTLB): $(LCLDR)/Vifft_tb.cpp
|
| 67 |
|
|
cd $(LCLDR); make -f Vifft_tb.mk
|
| 68 |
|
|
$(LCLDR)/Vifft_tb.cpp: ifft_tb.v $(VSRCD)/fftmain.v $(VSRCD)/ifftmain.v
|
| 69 |
35 |
dgisselq |
$(VERILATOR) $(VFLAGS) ifft_tb.v
|
| 70 |
17 |
dgisselq |
|
| 71 |
|
|
.PHONY: clean
|
| 72 |
|
|
clean:
|
| 73 |
|
|
rm -rf $(LCLDR)
|
| 74 |
|
|
|
| 75 |
|
|
-include $(VERILATOR_ROOT)/include/verilated.mk
|