From 621ef70c31fe2870d4a3fb721f0c9ddc9abc40c2 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 25 Sep 2006 15:58:17 +0000 Subject: [PATCH] Allow overriding PERL, YACC, LEX versions. git-svn-id: file://localhost/svn/verilator/trunk/verilator@794 77ca24e4-aefa-0310-84f0-b9a241c72d87 --- Changes | 7 +++++++ Makefile.in | 6 +++--- bin/verilator | 19 +++++++++++++++++++ configure.in | 2 ++ include/verilatedos.h | 3 ++- src/Makefile.in | 3 +++ src/Makefile_obj.in | 6 +++--- test_c/Makefile | 8 +++++--- test_sc/Makefile | 8 +++++--- test_sp/Makefile | 8 +++++--- 10 files changed, 54 insertions(+), 16 deletions(-) diff --git a/Changes b/Changes index 3ecd9da31..80c5abcc5 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,13 @@ Revision history for Verilator The contributors that suggested a given feature are shown in []. [by ...] indicates the contributor was also the author of the fix; Thanks! +* Verilator 3.61* + +*** Allow overriding Perl, Flex and Bison versions. [by Robert Farrell] + +**** Default make no longer makes the docs; if you edit the documentation + sources, run "make info" to get them. + * Verilator 3.610 09/20/2006 *** Verilator now works under DJGPP (Pentium GCC). [John Stroebel] diff --git a/Makefile.in b/Makefile.in index 08604659e..2a54e18cd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -91,7 +91,7 @@ SUBDIRS = src test_verilated test_c test_sc test_sp test_regress test_vcs INFOS = README verilator.txt verilator.html verilator.1 verilator.pdf # Files that can be generated, but should be up to date for a distribution. -DISTDEP = $(INFOS) Makefile +DISTDEP = info Makefile # Files to distribute. DISTBIN = $(wildcard bin/verilator-*) @@ -126,7 +126,7 @@ INST_PROJ_BIN_FILES = \ DISTFILES := $(DISTFILES_INC) all: all_nomsg msg_test -all_nomsg: verilator_exe info +all_nomsg: verilator_exe .PHONY:verilator_exe verilator_exe verilator_bin verilator_bin_dbg: @@ -218,7 +218,7 @@ installman: $(INSTALL_PROGRAM) $$p $(mandir)/man1/$$p; \ done -install: all_nomsg info installdirs installbin installman install-msg +install: all_nomsg installdirs installbin installman install-msg install-here: installman ftp diff --git a/bin/verilator b/bin/verilator index 7a0f6300a..704c98ea1 100755 --- a/bin/verilator +++ b/bin/verilator @@ -1575,6 +1575,25 @@ In this example, clk is a bool you can read or set as any other variable. The value of normal signals may be set, though clocks shouldn't be changed by your code or you'll get strange results. +=item Should a module be in Verilog or SystemC? + +Sometimes there is a block that just interconnects cells, and have a choice +as to if you write it in Verilog or SystemC. Everything else being equal, +best performance is when Verilator sees all of the design. So, look at the +hierarchy of your design, labeling cells as to if they are SystemC or +Verilog. Then: + +A module with only SystemC cells below must be SystemC. + +A module with a mix of Verilog and SystemC cells below must be SystemC. (As +Verilator cannot connect to lower-level SystemC cells.) + +A module with only Verilog cells below can be either, but for best +performance should be Verilog. (The exception is if you have a design that +is instantiated many times; in this case Verilating one of the lower +modules and instantiating that Verilated cells multiple times into a +SystemC module *may* be faster.) + =back =head1 BUGS diff --git a/configure.in b/configure.in index 0e01bc3ac..f65302dec 100644 --- a/configure.in +++ b/configure.in @@ -16,6 +16,8 @@ AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL AC_PATH_PROG(PERL,perl) +AC_PATH_PROG(YACC,bison) +AC_PATH_PROG(LEX,flex) dnl Checks for libraries. diff --git a/include/verilatedos.h b/include/verilatedos.h index eb04fcd5c..49e73e844 100644 --- a/include/verilatedos.h +++ b/include/verilatedos.h @@ -88,7 +88,8 @@ typedef unsigned int vluint32_t; ///< 32-bit unsigned type typedef __int64 vlsint64_t; ///< 64-bit signed type typedef unsigned __int64 vluint64_t; ///< 64-bit unsigned type #else // Linux or compliant Unix flavors, -m64 -# include +# include // Linux and most flavors +# include // Solaris typedef uint8_t vluint8_t; ///< 32-bit unsigned type typedef uint16_t vluint16_t; ///< 32-bit unsigned type typedef int vlsint32_t; ///< 32-bit signed type diff --git a/src/Makefile.in b/src/Makefile.in index fa80327a8..9aa7ae48e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -85,3 +85,6 @@ clean mostlyclean distclean maintainer-clean:: -rm -f *__gen* -rm -f *.yy.* y.output y.tab.[cho] *_test -rm -f .objcache* + +distclean maintainer-clean:: + -rm -f Makefile Makefile_obj diff --git a/src/Makefile_obj.in b/src/Makefile_obj.in index 18b072ba4..2f0205136 100644 --- a/src/Makefile_obj.in +++ b/src/Makefile_obj.in @@ -48,10 +48,10 @@ COPT = -ggdb -DVL_DEBUG endif ################# -LEX = flex +LEX = @LEX@ LFLAGS = -d -YACC = bison -y -YFLAGS = -d -v +YACC = @YACC@ +YFLAGS = -y -d -v #LIBS += -ldl #CCMALLOC = /usr/local/lib/ccmalloc-gcc.o -lccmalloc -ldl diff --git a/test_c/Makefile b/test_c/Makefile index 24aa54073..173f73992 100644 --- a/test_c/Makefile +++ b/test_c/Makefile @@ -17,6 +17,8 @@ VERILATOR_ROOT := $(shell pwd)/.. export VERILATOR_ROOT PWD := $(shell pwd) +PERL = perl + DEBUG_ON = --debug --trace-dups #DEBUG = $(DEBUG_ON) VALGRIND_ON = $(DEBUG_ON) --gdb "valgrind -v --leak-check=yes" @@ -31,11 +33,11 @@ VERILATOR_FLAGS = --cc -f $(PWD)/../test_v/input.vc top.v #VERILATOR_FLAGS += --trace prep: - perl $(VERILATOR_ROOT)/bin/verilator $(DEBUG) $(VERILATOR_FLAGS) + $(PERL) $(VERILATOR_ROOT)/bin/verilator $(DEBUG) $(VERILATOR_FLAGS) prep_dbg: - perl $(VERILATOR_ROOT)/bin/verilator $(DEBUG_ON) $(VERILATOR_FLAGS) + $(PERL) $(VERILATOR_ROOT)/bin/verilator $(DEBUG_ON) $(VERILATOR_FLAGS) prep_vg: - perl $(VERILATOR_ROOT)/bin/verilator $(VALGRIND_ON) $(VERILATOR_FLAGS) + $(PERL) $(VERILATOR_ROOT)/bin/verilator $(VALGRIND_ON) $(VERILATOR_FLAGS) compile: cd obj_dir ; $(MAKE) -j 3 -f ../Makefile_obj diff --git a/test_sc/Makefile b/test_sc/Makefile index bbe5d26c4..9aaa1fee4 100644 --- a/test_sc/Makefile +++ b/test_sc/Makefile @@ -17,6 +17,8 @@ VERILATOR_ROOT := $(shell pwd)/.. export VERILATOR_ROOT PWD := $(shell pwd) +PERL = perl + DEBUG_ON = --debug ###################################################################### @@ -32,11 +34,11 @@ obj_dir/sc_main.cpp: ../test_sp/sc_main.cpp cp $^ $@ prep: - perl $(VERILATOR_ROOT)/bin/verilator $(VERILATOR_FLAGS) + $(PERL) $(VERILATOR_ROOT)/bin/verilator $(VERILATOR_FLAGS) prep_dbg: - perl $(VERILATOR_ROOT)/bin/verilator $(DEBUG_ON) $(VERILATOR_FLAGS) + $(PERL) $(VERILATOR_ROOT)/bin/verilator $(DEBUG_ON) $(VERILATOR_FLAGS) prep_dbg_np: - perl $(VERILATOR_ROOT)/bin/verilator $(DEBUG_ON) $(VERILATOR_FLAGS) --nopublic + $(PERL) $(VERILATOR_ROOT)/bin/verilator $(DEBUG_ON) $(VERILATOR_FLAGS) --nopublic preproc: cd obj_dir ; $(MAKE) -j 1 -f ../Makefile_obj preproc diff --git a/test_sp/Makefile b/test_sp/Makefile index e0eb92021..ededf343f 100644 --- a/test_sp/Makefile +++ b/test_sp/Makefile @@ -17,6 +17,8 @@ VERILATOR_ROOT := $(shell pwd)/.. export VERILATOR_ROOT PWD := $(shell pwd) +PERL = perl + DEBUG_ON = --debug --trace-dups --output-split 100 ###################################################################### @@ -28,11 +30,11 @@ V_FLAGS = -f $(PWD)/../test_v/input.vc VERILATOR_FLAGS = --public --sp --coverage --stats --trace $(V_FLAGS) top.v prep: - perl $(VERILATOR_ROOT)/bin/verilator $(VERILATOR_FLAGS) + $(PERL) $(VERILATOR_ROOT)/bin/verilator $(VERILATOR_FLAGS) prep_dbg: - perl $(VERILATOR_ROOT)/bin/verilator $(DEBUG_ON) $(VERILATOR_FLAGS) + $(PERL) $(VERILATOR_ROOT)/bin/verilator $(DEBUG_ON) $(VERILATOR_FLAGS) prep_dbg_np: - perl $(VERILATOR_ROOT)/bin/verilator $(DEBUG_ON) $(VERILATOR_FLAGS) --nopublic + $(PERL) $(VERILATOR_ROOT)/bin/verilator $(DEBUG_ON) $(VERILATOR_FLAGS) --nopublic preproc: cd obj_dir ; $(MAKE) -j 1 -f ../Makefile_obj preproc