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

Subversion Repositories dblclockfft

[/] [dblclockfft/] [trunk/] [bench/] [cpp/] [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
## 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 35 dgisselq
ifneq ($(VERILATOR_ROOT),)
52
VERILATOR:=$(VERILATOR_ROOT)/bin/verilator
53
else
54
VERILATOR:=verilator
55
VERILATOR_ROOT ?= $(shell bash -c 'verilator -V|grep VERILATOR_ROOT | head -1 | sed -e " s/^.*=\s*//"')
56
endif
57
export  $(VERILATOR)
58 32 dgisselq
VROOT   := $(VERILATOR_ROOT)
59 35 dgisselq
VDEFS:= $(shell ./vversion.sh)
60 32 dgisselq
VINC := -I$(VROOT)/include -I$(OBJDR)/ -I$(TBODR)/
61 29 dgisselq
# MPYLB:= $(OBJDR)/Vshiftaddmpy__ALL.a
62
MPYLB:= $(OBJDR)/Vlongbimpy__ALL.a
63 3 dgisselq
DBLRV:= $(OBJDR)/Vdblreverse__ALL.a
64
DBLSG:= $(OBJDR)/Vdblstage__ALL.a
65
QTRSG:= $(OBJDR)/Vqtrstage__ALL.a
66 5 dgisselq
BFLYL:= $(OBJDR)/Vbutterfly__ALL.a
67 22 dgisselq
HWBFY:= $(OBJDR)/Vhwbfly__ALL.a
68 6 dgisselq
FFTLB:= $(OBJDR)/Vfftmain__ALL.a
69 16 dgisselq
IFTLB:= $(TBODR)/Vifft_tb__ALL.a
70 6 dgisselq
STGLB:= $(OBJDR)/Vfftstage_o2048__ALL.a
71 35 dgisselq
VSRCS:= $(VROOT)/include/verilated.cpp $(VROOT)/include/verilated_vcd_c.cpp
72 3 dgisselq
 
73 29 dgisselq
mpy_tb: mpy_tb.cpp fftsize.h twoc.h $(MPYLB)
74 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(MPYLB) $(VSRCS) -o $@
75 3 dgisselq
 
76 29 dgisselq
dblrev_tb: dblrev_tb.cpp twoc.cpp twoc.h fftsize.h $(DBLRV)
77 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(DBLRV) $(VSRCS) -o $@
78 3 dgisselq
 
79 23 dgisselq
dblstage_tb: dblstage_tb.cpp twoc.cpp twoc.h $(DBLSG)
80 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(DBLSG) $(VSRCS) -o $@
81 3 dgisselq
 
82 23 dgisselq
qtrstage_tb: qtrstage_tb.cpp twoc.cpp twoc.h $(QTRSG)
83 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(QTRSG) $(VSRCS) -o $@
84 3 dgisselq
 
85 29 dgisselq
butterfly_tb: butterfly_tb.cpp twoc.cpp twoc.h fftsize.h $(BFLYL)
86 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(BFLYL) $(VSRCS) -o $@
87 5 dgisselq
 
88 23 dgisselq
hwbfly_tb: hwbfly_tb.cpp twoc.cpp twoc.h $(HWBFY)
89 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(HWBFY) $(VSRCS) -o $@
90 22 dgisselq
 
91 23 dgisselq
fftstage_o2048_tb: fftstage_o2048_tb.cpp twoc.cpp twoc.h $(STGLB)
92 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(STGLB) $(VSRCS) -o $@
93 6 dgisselq
 
94 29 dgisselq
fft_tb: fft_tb.cpp twoc.cpp twoc.h fftsize.h $(FFTLB)
95 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(FFTLB) $(VSRCS) -lfftw3 -o $@
96 6 dgisselq
 
97 29 dgisselq
ifft_tb: ifft_tb.cpp twoc.cpp twoc.h fftsize.h $(IFTLB)
98 35 dgisselq
        g++ -g $(VINC) $(VDEFS) $< twoc.cpp $(IFTLB) $(VSRCS) -lfftw3 -o $@
99 23 dgisselq
 
100 16 dgisselq
.PHONY: HEX
101
# HEX:   cmem_e2048.hex  cmem_e1024.hex  cmem_e512.hex  cmem_e256.hex
102
# HEX:   cmem_o2048.hex  cmem_o1024.hex  cmem_o512.hex  cmem_o256.hex
103
# HEX:  icmem_e2048.hex icmem_e1024.hex icmem_e512.hex icmem_e256.hex
104
# HEX:  icmem_o2048.hex icmem_o1024.hex icmem_o512.hex icmem_o256.hex
105
# HEX:   cmem_e128.hex  cmem_e64.hex  cmem_e32.hex  cmem_e16.hex  cmem_e8.hex
106
# HEX:   cmem_o128.hex  cmem_o64.hex  cmem_o32.hex  cmem_o16.hex  cmem_o8.hex
107
# HEX:  icmem_e128.hex icmem_e64.hex icmem_e32.hex icmem_e16.hex icmem_e8.hex
108
# HEX:  icmem_o128.hex icmem_o64.hex icmem_o32.hex icmem_o16.hex icmem_o8.hex
109
# cmem_%.hex: $(VSRCD)/cmem_%.hex
110
        # echo ln -s $* $<
111
HEX:
112
        ln -s $(VSRCD)/*.hex .
113 14 dgisselq
 
114 5 dgisselq
.PHONY: test
115 6 dgisselq
test: mpy_tb dblrev_tb dblstage_tb qtrstage_tb butterfly_tb fftstage_o2048_tb
116 22 dgisselq
test: fft_tb ifft_tb hwbfly_tb
117 5 dgisselq
        ./mpy_tb
118
        ./dblrev_tb
119
        ./dblstage_tb
120
        ./qtrstage_tb
121
        ./butterfly_tb
122 22 dgisselq
        ./hwbfly_tb
123 6 dgisselq
        ./fftstage_o2048_tb
124
        ./fft_tb
125 14 dgisselq
        ./ifft_tb
126 5 dgisselq
 
127
.PHONY: clean
128 3 dgisselq
clean:
129 23 dgisselq
        rm -f mpy_tb dblrev_tb dblstage_tb qtrstage_tb butterfly_tb
130
        rm -f fftstage_o2048_tb fft_tb ifft_tb hwbfly_tb
131 16 dgisselq
        rm -rf fft_tb.dbl ifft_tb.dbl
132
        rm -rf *cmem_*.hex
133 3 dgisselq
 
134
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.