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

Subversion Repositories dblclockfft

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

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
##              Gisselquist Tecnology, LLC
21
##
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
VINC := -I/usr/share/verilator/include -I$(OBJDR)/ -I$(TBODR)/
52 3 dgisselq
MPYLB:= $(OBJDR)/Vshiftaddmpy__ALL.a
53
DBLRV:= $(OBJDR)/Vdblreverse__ALL.a
54
DBLSG:= $(OBJDR)/Vdblstage__ALL.a
55
QTRSG:= $(OBJDR)/Vqtrstage__ALL.a
56 5 dgisselq
BFLYL:= $(OBJDR)/Vbutterfly__ALL.a
57 6 dgisselq
FFTLB:= $(OBJDR)/Vfftmain__ALL.a
58 16 dgisselq
IFTLB:= $(TBODR)/Vifft_tb__ALL.a
59 6 dgisselq
STGLB:= $(OBJDR)/Vfftstage_o2048__ALL.a
60 3 dgisselq
VERILATOR_ROOT := /usr/share/verilator
61
 
62
mpy_tb: mpy_tb.cpp $(MPYLB)
63
        g++ -g $(VINC) $< $(MPYLB) $(VERILATOR_ROOT)/include/verilated.cpp -o $@
64
 
65
dblrev_tb: dblrev_tb.cpp $(DBLRV)
66
        g++ -g $(VINC) $< $(DBLRV) $(VERILATOR_ROOT)/include/verilated.cpp -o $@
67
 
68
dblstage_tb: dblstage_tb.cpp $(DBLSG)
69
        g++ -g $(VINC) $< $(DBLSG) $(VERILATOR_ROOT)/include/verilated.cpp -o $@
70
 
71
qtrstage_tb: qtrstage_tb.cpp $(QTRSG)
72
        g++ -g $(VINC) $< $(QTRSG) $(VERILATOR_ROOT)/include/verilated.cpp -o $@
73
 
74 5 dgisselq
butterfly_tb: butterfly_tb.cpp $(BFLYL)
75
        g++ -g $(VINC) $< $(BFLYL) $(VERILATOR_ROOT)/include/verilated.cpp -o $@
76
 
77 6 dgisselq
fftstage_o2048_tb: fftstage_o2048_tb.cpp $(STGLB)
78
        g++ -g $(VINC) $< $(STGLB) $(VERILATOR_ROOT)/include/verilated.cpp -o $@
79
 
80
fft_tb: fft_tb.cpp $(FFTLB)
81 9 dgisselq
        g++ -g $(VINC) $< $(FFTLB) $(VERILATOR_ROOT)/include/verilated.cpp -lfftw3 -o $@
82 6 dgisselq
 
83 16 dgisselq
.PHONY: HEX
84
# HEX:   cmem_e2048.hex  cmem_e1024.hex  cmem_e512.hex  cmem_e256.hex
85
# HEX:   cmem_o2048.hex  cmem_o1024.hex  cmem_o512.hex  cmem_o256.hex
86
# HEX:  icmem_e2048.hex icmem_e1024.hex icmem_e512.hex icmem_e256.hex
87
# HEX:  icmem_o2048.hex icmem_o1024.hex icmem_o512.hex icmem_o256.hex
88
# HEX:   cmem_e128.hex  cmem_e64.hex  cmem_e32.hex  cmem_e16.hex  cmem_e8.hex
89
# HEX:   cmem_o128.hex  cmem_o64.hex  cmem_o32.hex  cmem_o16.hex  cmem_o8.hex
90
# HEX:  icmem_e128.hex icmem_e64.hex icmem_e32.hex icmem_e16.hex icmem_e8.hex
91
# HEX:  icmem_o128.hex icmem_o64.hex icmem_o32.hex icmem_o16.hex icmem_o8.hex
92
# cmem_%.hex: $(VSRCD)/cmem_%.hex
93
        # echo ln -s $* $<
94
HEX:
95
        ln -s $(VSRCD)/*.hex .
96 14 dgisselq
 
97 5 dgisselq
.PHONY: test
98 6 dgisselq
test: mpy_tb dblrev_tb dblstage_tb qtrstage_tb butterfly_tb fftstage_o2048_tb
99 14 dgisselq
test: fft_tb ifft_tb
100 5 dgisselq
        ./mpy_tb
101
        ./dblrev_tb
102
        ./dblstage_tb
103
        ./qtrstage_tb
104
        ./butterfly_tb
105 6 dgisselq
        ./fftstage_o2048_tb
106
        ./fft_tb
107 14 dgisselq
        ./ifft_tb
108 5 dgisselq
 
109
.PHONY: clean
110 3 dgisselq
clean:
111 14 dgisselq
        rm mpy_tb dblrev_tb dblstage_tb qtrstage_tb butterfly_tb
112
        rm fftstage_o2048_tb fft_tb ifft_tb
113 16 dgisselq
        rm -rf fft_tb.dbl ifft_tb.dbl
114
        rm -rf *cmem_*.hex
115 3 dgisselq
 
116
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.