URL
https://opencores.org/ocsvn/qspiflash/qspiflash/trunk
Subversion Repositories qspiflash
Compare Revisions
- This comparison shows the changes necessary to convert path
/qspiflash/trunk/bench
- from Rev 24 to Rev 23
- ↔ Reverse comparison
Rev 24 → Rev 23
/cpp/vversion.sh
File deleted
cpp/vversion.sh
Property changes :
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: cpp/Makefile
===================================================================
--- cpp/Makefile (revision 24)
+++ cpp/Makefile (revision 23)
@@ -2,7 +2,7 @@
##
## Filename: Makefile
##
-## Project: A Set of Wishbone Controlled SPI Flash Controllers
+## Project: Wishbone Controlled Quad SPI Flash Controller
##
## Purpose: This makefile coordinates the build of the extended quad spi
## flash controller (not the normal quad spi flash controller also
@@ -13,28 +13,25 @@
##
################################################################################
##
-## Copyright (C) 2015-2019, Gisselquist Technology, LLC
+## Copyright (C) 2015-2017, Gisselquist Technology, LLC
##
-## This file is part of the set of Wishbone controlled SPI flash controllers
-## project
+## This program is free software (firmware): you can redistribute it and/or
+## modify it under the terms of the GNU General Public License as published
+## by the Free Software Foundation, either version 3 of the License, or (at
+## your option) any later version.
##
-## The Wishbone SPI flash controller project is free software (firmware):
-## you can redistribute it and/or modify it under the terms of the GNU Lesser
-## General Public License as published by the Free Software Foundation, either
-## version 3 of the License, or (at your option) any later version.
+## This program is distributed in the hope that it will be useful, but WITHOUT
+## ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+## for more details.
##
-## The Wishbone SPI flash controller project is distributed in the hope
-## that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
-## warranty of MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU Lesser General Public License for more details.
-##
-## You should have received a copy of the GNU Lesser General Public License along
+## You should have received a copy of the GNU General Public License along
## with this program. (It's in the $(ROOT)/doc directory. Run make with no
## target there if the PDF file isn't present.) If not, see
## for a copy.
##
-## License: LGPL, v3, as defined and found on www.gnu.org,
-## http://www.gnu.org/licenses/lgpl.html
+## License: GPL, v3, as defined and found on www.gnu.org,
+## http://www.gnu.org/licenses/gpl.html
##
##
################################################################################
@@ -46,47 +43,36 @@
RTLD := ../../rtl
VERILATOR_ROOT ?= $(shell bash -c 'verilator -V|grep VERILATOR_ROOT | head -1 | sed -e " s/^.*=\s*//"')
VROOT := $(VERILATOR_ROOT)
-VDEFS := $(shell ./vversion.sh)
VINCD := $(VROOT)/include
INCS := -I$(RTLD)/obj_dir/ -I$(RTLD) -I$(VINCD) -I$(VINCD)/vltstd
-SIMSRCS := flashsim.cpp byteswap.cpp
-LEGACYSRC := wbqspiflash_tb.cpp $(SIMSRCS)
-SPISRC := spixpress_tb.cpp $(SIMSRCS)
-DSPISRC := dualflexpress_tb.cpp $(SIMSRCS)
-QSPISRC := qflexpress_tb.cpp $(SIMSRCS)
-SOURCES := $(wildcard *_tb.cpp) flashsim.cpp
+EQSOURCES := eqspiflashsim.cpp eqspiflash_tb.cpp
+QSOURCES := qspiflashsim.cpp qspiflash_tb.cpp
+SOURCES := $(EQSOURCES) $(QSOURCES)
VOBJDR := $(RTLD)/obj_dir
RAWVLIB := verilated.cpp verilated_vcd_c.cpp
VSRCS := $(addprefix $(VROOT)/include/,$(RAWVLIB))
VOBJS := $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(RAWVLIB)))
-LOBJS := $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(LEGACYSRC))) $(VOBJS)
-SOBJS := $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(SPISRC))) $(VOBJS)
-DOBJS := $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(DSPISRC))) $(VOBJS)
-QOBJS := $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(QSPISRC))) $(VOBJS)
-all: wbqspiflash_tb
+QOBJS := $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(QSOURCES))) $(VOBJS)
+EQOBJS := $(addprefix $(OBJDIR)/,$(subst .cpp,.o,$(EQSOURCES))) $(VOBJS)
+SIMSRCS := enetctrlsim.cpp eqspiflashsim.cpp
+all: qspiflash_tb pretest
$(OBJDIR)/%.o: %.cpp
$(mk-objdir)
- $(CXX) $(CFLAGS) $(VDEFS) $(INCS) -c $< -o $@
+ $(CXX) $(CFLAGS) $(INCS) -c $< -o $@
$(OBJDIR)/%.o: $(VINCD)/%.cpp
$(mk-objdir)
$(CXX) $(CFLAGS) $(INCS) -c $< -o $@
-wbqspiflash_tb: $(LOBJS) $(VOBJDR)/Vwbqspiflash__ALL.a
- $(CXX) $(CFLAGS) $(INCS) $(LOBJS) $(VOBJDR)/Vwbqspiflash__ALL.a -o $@
+eqspiflash_tb: $(EQOBJS) $(VOBJDR)/Veqspiflash__ALL.a
+ $(CXX) $(CFLAGS) $(INCS) $(EQOBJS) $(VOBJDR)/Veqspiflash__ALL.a -o $@
-spixpress_tb: $(SOBJS) $(VOBJDR)/Vspixpress__ALL.a
- $(CXX) $(CFLAGS) $(INCS) $(SOBJS) $(VOBJDR)/Vspixpress__ALL.a -o $@
+qspiflash_tb: $(QOBJS) $(VOBJDR)/Vwbqspiflash__ALL.a $(VOBJS)
+ $(CXX) $(CFLAGS) $(INCS) $(QOBJS) $(VOBJDR)/Vwbqspiflash__ALL.a -o $@
-dualflexpress_tb: $(DOBJS) $(VOBJDR)/Vdualflexpress__ALL.a
- $(CXX) $(CFLAGS) $(INCS) $(DOBJS) $(VOBJDR)/Vdualflexpress__ALL.a -o $@
-
-qflexpress_tb: $(QOBJS) $(VOBJDR)/Vqflexpress__ALL.a
- $(CXX) $(CFLAGS) $(INCS) $(QOBJS) $(VOBJDR)/Vqflexpress__ALL.a -o $@
-
.PHONY: pretest
-pretest: spixpress_tb dualflexpress_tb qflexpress_tb
+pretest: qspiflash_tb eqspiflash_tb
@echo "The test bench has been created. Type make test, and look at"
@echo "the end of its output to see if it (still) works."
@@ -94,16 +80,12 @@
# test: eqspiflash_tb
# ./eqspiflash_tb
-.PHONY: test stest dtest qtest legacytest
-test: stest dtest qtest
-stest: spixpress_tb
- ./spixpress_tb
-dtest: dualflexpress_tb
- ./dualflexpress_tb
-qtest: qflexpress_tb
- ./qflexpress_tb
-legacytest: wbqpiflash_tb
- ./wbqpiflash_tb
+.PHONY: test qtest eqtest
+test: qtest eqtest
+qtest: qspiflash_tb
+ ./qspiflash_tb
+eqtest: eqspiflash_tb qtest
+ ./eqspiflash_tb
define mk-objdir
@bash -c "if [ ! -e $(OBJDIR) ]; then mkdir -p $(OBJDIR); fi"
@@ -124,9 +106,8 @@
.PHONY: clean
clean:
- rm -f spixpress_tb dualflexpress_tb qflexpress_tb
- rm -f *.vcd
- rm -rf wbqspiflash_tb $(OBJDIR)/
+ rm -f ./eqspiflash_tb qspiflash_tb
+ rm -rf $(OBJDIR)/
.PHONY: depends
depends: tags
@@ -135,6 +116,4 @@
$(OBJDIR)/depends.txt: $(SOURCES) $(HEADERS)
$(build-depends)
-ifneq ($(MAKECMDGOALS),clean)
-include $(OBJDIR)/depends.txt
-endif