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

Subversion Repositories dblclockfft

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

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

Line No. Rev Author Line
1 16 dgisselq
############################################################################
2
##
3
## Filename:    Makefile
4
##
5
## Project:     A Doubletime Pipelined FFT
6
##
7
## Purpose:     This programs the build process for the test benches
8
##              associated with the double clocked FFT project.  These
9
##              test benches are designed for the size and arguments of the
10
##              FFT as given by the Makefile in the trunk/sw directory,
11
##              although they shouldn't be too difficult to modify for
12
##              other FFT parameters.
13
##
14
##              Please note that running these test benches requires access
15
##              to the *cmem_*.hex files found in trunk/sw/fft-core.  I
16
##              usually soft link them into this directory, but such linking
17
##              is not currently part of this makefile or the build scripts.
18
##
19
## Creator:     Dan Gisselquist, Ph.D.
20 30 dgisselq
##              Gisselquist Technology, LLC
21 16 dgisselq
##
22
##########################################################################/
23
##
24
## Copyright (C) 2015, Gisselquist Technology, LLC
25
##
26
## This program is free software (firmware): you can redistribute it and/or
27
## modify it under the terms of  the GNU General Public License as published
28
## by the Free Software Foundation, either version 3 of the License, or (at
29
## your option) any later version.
30
##
31
## This program is distributed in the hope that it will be useful, but WITHOUT
32
## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
33
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
34
## for more details.
35
##
36
## You should have received a copy of the GNU General Public License along
37
## with this program.  (It's in the $(ROOT)/doc directory, run make with no
38
## target there if the PDF file isn't present.)  If not, see
39
##  for a copy.
40
##
41
## License:     GPL, v3, as defined and found on www.gnu.org,
42
##              http:##www.gnu.org/licenses/gpl.html
43
##
44
##
45
##########################################################################/
46 6 dgisselq
all: mpy_tb dblrev_tb dblstage_tb qtrstage_tb fft_tb test
47 3 dgisselq
 
48
OBJDR:= ../../sw/fft-core/obj_dir
49 16 dgisselq
VSRCD = ../../sw/fft-core
50
TBODR:= ../rtl/obj_dir
51 32 dgisselq
VERILATOR_ROOT   ?= $(shell bash -c 'verilator -V|grep VERILATOR_ROOT | head -1 | sed -e " s/^.*=\s*//"')
52
VROOT   := $(VERILATOR_ROOT)
53
VINC := -I$(VROOT)/include -I$(OBJDR)/ -I$(TBODR)/
54 29 dgisselq
# MPYLB:= $(OBJDR)/Vshiftaddmpy__ALL.a
55
MPYLB:= $(OBJDR)/Vlongbimpy__ALL.a
56 3 dgisselq
DBLRV:= $(OBJDR)/Vdblreverse__ALL.a
57
DBLSG:= $(OBJDR)/Vdblstage__ALL.a
58
QTRSG:= $(OBJDR)/Vqtrstage__ALL.a
59 5 dgisselq
BFLYL:= $(OBJDR)/Vbutterfly__ALL.a
60 22 dgisselq
HWBFY:= $(OBJDR)/Vhwbfly__ALL.a
61 6 dgisselq
FFTLB:= $(OBJDR)/Vfftmain__ALL.a
62 16 dgisselq
IFTLB:= $(TBODR)/Vifft_tb__ALL.a
63 6 dgisselq
STGLB:= $(OBJDR)/Vfftstage_o2048__ALL.a
64 3 dgisselq
 
65 29 dgisselq
mpy_tb: mpy_tb.cpp fftsize.h twoc.h $(MPYLB)
66
        g++ -g $(VINC) $< twoc.cpp $(MPYLB) $(VERILATOR_ROOT)/include/verilated.cpp -o $@
67 3 dgisselq
 
68 29 dgisselq
dblrev_tb: dblrev_tb.cpp twoc.cpp twoc.h fftsize.h $(DBLRV)
69 23 dgisselq
        g++ -g $(VINC) $< twoc.cpp $(DBLRV) $(VERILATOR_ROOT)/include/verilated.cpp -o $@
70 3 dgisselq
 
71 23 dgisselq
dblstage_tb: dblstage_tb.cpp twoc.cpp twoc.h $(DBLSG)
72
        g++ -g $(VINC) $< twoc.cpp $(DBLSG) $(VERILATOR_ROOT)/include/verilated.cpp -o $@
73 3 dgisselq
 
74 23 dgisselq
qtrstage_tb: qtrstage_tb.cpp twoc.cpp twoc.h $(QTRSG)
75
        g++ -g $(VINC) $< twoc.cpp $(QTRSG) $(VERILATOR_ROOT)/include/verilated.cpp -o $@
76 3 dgisselq
 
77 29 dgisselq
butterfly_tb: butterfly_tb.cpp twoc.cpp twoc.h fftsize.h $(BFLYL)
78 23 dgisselq
        g++ -g $(VINC) $< twoc.cpp $(BFLYL) $(VERILATOR_ROOT)/include/verilated.cpp -o $@
79 5 dgisselq
 
80 23 dgisselq
hwbfly_tb: hwbfly_tb.cpp twoc.cpp twoc.h $(HWBFY)
81
        g++ -g $(VINC) $< twoc.cpp $(HWBFY) $(VERILATOR_ROOT)/include/verilated.cpp -o $@
82 22 dgisselq
 
83 23 dgisselq
fftstage_o2048_tb: fftstage_o2048_tb.cpp twoc.cpp twoc.h $(STGLB)
84
        g++ -g $(VINC) $< twoc.cpp $(STGLB) $(VERILATOR_ROOT)/include/verilated.cpp -o $@
85 6 dgisselq
 
86 29 dgisselq
fft_tb: fft_tb.cpp twoc.cpp twoc.h fftsize.h $(FFTLB)
87 23 dgisselq
        g++ -g $(VINC) $< twoc.cpp $(FFTLB) $(VERILATOR_ROOT)/include/verilated.cpp -lfftw3 -o $@
88 6 dgisselq
 
89 29 dgisselq
ifft_tb: ifft_tb.cpp twoc.cpp twoc.h fftsize.h $(IFTLB)
90 23 dgisselq
        g++ -g $(VINC) $< twoc.cpp $(IFTLB) $(VERILATOR_ROOT)/include/verilated.cpp -lfftw3 -o $@
91
 
92 16 dgisselq
.PHONY: HEX
93
# HEX:   cmem_e2048.hex  cmem_e1024.hex  cmem_e512.hex  cmem_e256.hex
94
# HEX:   cmem_o2048.hex  cmem_o1024.hex  cmem_o512.hex  cmem_o256.hex
95
# HEX:  icmem_e2048.hex icmem_e1024.hex icmem_e512.hex icmem_e256.hex
96
# HEX:  icmem_o2048.hex icmem_o1024.hex icmem_o512.hex icmem_o256.hex
97
# HEX:   cmem_e128.hex  cmem_e64.hex  cmem_e32.hex  cmem_e16.hex  cmem_e8.hex
98
# HEX:   cmem_o128.hex  cmem_o64.hex  cmem_o32.hex  cmem_o16.hex  cmem_o8.hex
99
# HEX:  icmem_e128.hex icmem_e64.hex icmem_e32.hex icmem_e16.hex icmem_e8.hex
100
# HEX:  icmem_o128.hex icmem_o64.hex icmem_o32.hex icmem_o16.hex icmem_o8.hex
101
# cmem_%.hex: $(VSRCD)/cmem_%.hex
102
        # echo ln -s $* $<
103
HEX:
104
        ln -s $(VSRCD)/*.hex .
105 14 dgisselq
 
106 5 dgisselq
.PHONY: test
107 6 dgisselq
test: mpy_tb dblrev_tb dblstage_tb qtrstage_tb butterfly_tb fftstage_o2048_tb
108 22 dgisselq
test: fft_tb ifft_tb hwbfly_tb
109 5 dgisselq
        ./mpy_tb
110
        ./dblrev_tb
111
        ./dblstage_tb
112
        ./qtrstage_tb
113
        ./butterfly_tb
114 22 dgisselq
        ./hwbfly_tb
115 6 dgisselq
        ./fftstage_o2048_tb
116
        ./fft_tb
117 14 dgisselq
        ./ifft_tb
118 5 dgisselq
 
119
.PHONY: clean
120 3 dgisselq
clean:
121 23 dgisselq
        rm -f mpy_tb dblrev_tb dblstage_tb qtrstage_tb butterfly_tb
122
        rm -f fftstage_o2048_tb fft_tb ifft_tb hwbfly_tb
123 16 dgisselq
        rm -rf fft_tb.dbl ifft_tb.dbl
124
        rm -rf *cmem_*.hex
125 3 dgisselq
 
126
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.