Line 39... |
Line 39... |
## License: GPL, v3, as defined and found on www.gnu.org,
|
## License: GPL, v3, as defined and found on www.gnu.org,
|
## http:##www.gnu.org/licenses/gpl.html
|
## http:##www.gnu.org/licenses/gpl.html
|
##
|
##
|
##
|
##
|
##########################################################################/
|
##########################################################################/
|
|
##
|
|
##
|
|
# This is really simple ...
|
|
all: ifft_tb
|
|
CORED := fft-core
|
|
ifneq ($(VERILATOR_ROOT),)
|
|
VERILATOR:=$(VERILATOR_ROOT)/bin/verilator
|
|
else
|
|
VERILATOR:=verilator
|
|
VERILATOR_ROOT ?= $(shell bash -c 'verilator -V|grep VERILATOR_ROOT | head -1 | sed -e " s/^.*=\s*//"')
|
|
endif
|
|
export $(VERILATOR)
|
|
VROOT := $(VERILATOR_ROOT)
|
|
VSRCD := ../../sw/$(CORED)
|
|
VFLAGS := -Wall -MMD --trace -y $(VSRCD) -cc
|
|
|
OBJDR:= ../../sw/fft-core/obj_dir
|
|
VSRCD:= ../../sw/fft-core
|
|
LCLDR:= obj_dir
|
LCLDR:= obj_dir
|
VINC := -I/usr/share/verilator/include -I$(OBJDR)/ -I$(LCLDR)/
|
|
IFTLB:= $(LCLDR)/Vifft_tb__ALL.a
|
IFTLB:= $(LCLDR)/Vifft_tb__ALL.a
|
VERILATOR_ROOT := /usr/share/verilator
|
|
|
|
.PHONY: ifft_tb
|
.PHONY: ifft_tb
|
ifft_tb: $(IFTLB)
|
ifft_tb: $(IFTLB)
|
|
|
$(IFTLB): $(LCLDR)/Vifft_tb.cpp
|
$(IFTLB): $(LCLDR)/Vifft_tb.cpp
|
cd $(LCLDR); make -f Vifft_tb.mk
|
cd $(LCLDR); make -f Vifft_tb.mk
|
$(LCLDR)/Vifft_tb.cpp: ifft_tb.v $(VSRCD)/fftmain.v $(VSRCD)/ifftmain.v
|
$(LCLDR)/Vifft_tb.cpp: ifft_tb.v $(VSRCD)/fftmain.v $(VSRCD)/ifftmain.v
|
verilator -y $(VSRCD) -cc ifft_tb.v
|
$(VERILATOR) $(VFLAGS) ifft_tb.v
|
|
|
.PHONY: clean
|
.PHONY: clean
|
clean:
|
clean:
|
rm -rf $(LCLDR)
|
rm -rf $(LCLDR)
|
|
|