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

Subversion Repositories dblclockfft

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

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