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

Subversion Repositories dblclockfft

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

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