Compare commits

...
41 Commits
Author SHA1 Message Date
Wilson Snyder 0cbab84143 Version bump
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1053 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-05-07 18:27:23 +00:00
Wilson Snyder a4e2a770f6 Add DESTDIR to Makefiles to assist RPM construction. [Gunter Dannoritzer]
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1052 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-05-07 17:46:33 +00:00
Wilson Snyder 36e84973ec Fix parallel make running bison twice
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1051 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-05-06 15:45:41 +00:00
Wilson Snyder f6c8888ee2 Fix comma separated list of primitives. [by Bryan Brady]
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1050 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-05-06 14:52:53 +00:00
Wilson Snyder f2bf6a037b Fix test broken with last commit. Part of last commit.
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1049 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-05-06 14:18:04 +00:00
Wilson Snyder 9dade8fbd9 Fix parametrized defines calling define with comma. [Joshua Wise]
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1048 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-05-06 01:11:21 +00:00
Wilson Snyder d2d38edf06 Fix preprocessor else after series of elsif. [Mark Nodine]
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1047 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-05-06 00:50:47 +00:00
Wilson Snyder e0abd238e3 Fix compiler warnings under GCC 4.2.1/ SuSE 10.3
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1046 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-29 14:14:20 +00:00
Wilson Snyder 7edcc08886 Really enable DEFENV by default; didn't truely default it earlier
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1045 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-28 21:14:17 +00:00
Wilson Snyder 0c73b547f1 Fix bug introduced in 3.661 with parametrized defines.
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1042 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-25 14:01:50 +00:00
Wilson Snyder 73c3d4bb50 Version bump
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1041 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-25 12:17:12 +00:00
Wilson Snyder 77f063367a Change website references to veripool.org
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1040 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-25 12:16:55 +00:00
Wilson Snyder 8e812058cb Change website references to veripool.org
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1039 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-25 12:14:27 +00:00
Wilson Snyder 506c36beed Fix ranges on gate primitive instantiations
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1038 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-25 11:48:18 +00:00
Wilson Snyder 0110f0193e Allow /**/ comments in -f option files.
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1037 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-24 15:36:46 +00:00
Wilson Snyder 7b870f4b2a Remove old unused vlint script
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1036 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-24 15:14:40 +00:00
Wilson Snyder aa2630f837 Ignore old standard(ish) Verilog-XL defines
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1035 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-24 15:04:01 +00:00
Wilson Snyder e137e93f94 Support optional argument to and .
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1034 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-24 14:32:39 +00:00
Wilson Snyder 215bdfccc2 Use GCC 4 compiler builtins for XORs
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1033 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-24 14:26:01 +00:00
Wilson Snyder 956a0a9c99 Add Verilog 2005 () function.
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1032 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-24 13:52:51 +00:00
Wilson Snyder ab83717b7d Fix internal error when params get non-constants. [Johan Wouters]
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1031 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-17 15:47:16 +00:00
Wilson Snyder 61e876e4bf Add bookmarks to pdf, and fix date
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1030 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-16 21:52:23 +00:00
Wilson Snyder 9ca3dbc140 Allow defines terminated in EOF, though against spec. [Stefan Thiede]
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1029 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-15 19:12:25 +00:00
Wilson Snyder a02e2e25bb Fix "always @ ((a) or (b))" syntax error. [by Niranjan Prabhu]
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1028 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-14 21:47:39 +00:00
Wilson Snyder a9281f2c37 Fix "output reg name=expr;" syntax error. [Martin Scharrer]
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1027 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-14 21:10:34 +00:00
Wilson Snyder 95395a8b87 Fix multiple .v files being read in random order. [Stefan Thiede]
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1026 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-09 14:17:03 +00:00
Wilson Snyder ecdbd72fa1 Add error message when modules have duplicate names.
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1025 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-09 13:56:40 +00:00
Wilson Snyder 3a2f8224e4 Version bump
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1022 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-04 18:30:51 +00:00
Wilson Snyder 15841fe5f6 Support functions with input
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1021 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-04 18:29:33 +00:00
Wilson Snyder 7e5a7b65a0 Unsized concatenates now give WIDTHCONCAT warnings.
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1020 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-02 12:53:53 +00:00
Wilson Snyder 549bf876e4 Ignore delays attached to gate UDPs. [Stefan Thiede]
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1019 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-04-01 19:26:06 +00:00
Wilson Snyder bd60cf12f8 Match Verilog-Perl: Fix parse error on min:typ:max delay pairs
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1018 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-03-31 21:03:56 +00:00
Wilson Snyder 61fbab1910 Fix internal error after MSB < LSB error reported to user. [Stefan Thiede]
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1017 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-03-31 14:09:52 +00:00
Wilson Snyder 957f495314 Fix task output pin connected to non-variables.
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1016 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-03-28 21:55:23 +00:00
Wilson Snyder 280eb48ba4 Add --language option for supporting older code. [Stefan Thiede]
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1015 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-03-28 20:41:21 +00:00
Wilson Snyder ebe5711b40 The --enable-defenv configure option added in 3.660 is now the default.
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1014 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-03-28 19:42:14 +00:00
Wilson Snyder a16477d84f Fix SystemVerilog parameterized defines and whitespace
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1013 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-03-27 13:21:49 +00:00
Wilson Snyder f6fb2362c6 Fix dropping of backslash quoted-quote at end of .
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1012 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-03-26 14:58:30 +00:00
Wilson Snyder 170427bba1 Fix r1010; bad prefix default
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1011 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-03-26 14:53:53 +00:00
Wilson Snyder 93531e520a Add --top-module option to select between multiple tops. [Stefan Thiede]
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1010 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-03-25 19:57:41 +00:00
Wilson Snyder aa2db8fdde Fix no-module include files on command line. [Stefan Thiede]
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1009 77ca24e4-aefa-0310-84f0-b9a241c72d87
2008-03-25 13:42:48 +00:00
236 changed files with 1844 additions and 609 deletions
+69
View File
@@ -3,6 +3,75 @@ Revision history for Verilator
The contributors that suggested a given feature are shown in []. [by ...] The contributors that suggested a given feature are shown in []. [by ...]
indicates the contributor was also the author of the fix; Thanks! indicates the contributor was also the author of the fix; Thanks!
* Verilator 3.663 2008/05/07
**** Add DESTDIR to Makefiles to assist RPM construction. [Gunter Dannoritzer]
**** Fix compiler warnings under GCC 4.2.1.
**** Fix preprocessor `else after series of `elsif. [Mark Nodine]
**** Fix parametrized defines calling define with comma. [Joshua Wise]
**** Fix comma separated list of primitives. [by Bryan Brady]
* Verilator 3.662 2008/04/25
*** Add Verilog 2005 $clog2() function.
This is useful in calculating bus-widths from parameters.
*** Support /**/ comments in -f option files. [Stefan Thiede]
**** Add error message when modules have duplicate names. [Stefan Thiede]
**** Support defines terminated in EOF, though against spec. [Stefan Thiede]
**** Support optional argument to $finish and $stop. [by Stefan Thiede]
**** Support ranges on gate primitive instantiations. [Stefan Thiede]
**** Ignore old standard(ish) Verilog-XL defines. [by Stefan Thiede]
**** Fix "always @ ((a) or (b))" syntax error. [by Niranjan Prabhu]
**** Fix "output reg name=expr;" syntax error. [Martin Scharrer]
**** Fix multiple .v files being read in random order. [Stefan Thiede]
**** Fix internal error when params get non-constants. [Johan Wouters]
**** Fix bug introduced in 3.661 with parametrized defines.
* Verilator 3.661 2008/04/04
*** The --enable-defenv configure option added in 3.660 is now the default.
This hard-codes a default for VERILATOR_ROOT etc in the executables.
*** Add --language option for supporting older code. [Stefan Thiede]
*** Add --top-module option to select between multiple tops. [Stefan Thiede]
*** Unsized concatenates now give WIDTHCONCAT warnings. [Jonathan Kimmitt]
Previously they threw fatal errors, which in most cases is correct
according to spec, but can be incorrect in presence of parameter values.
**** Support functions with "input integer". [Johan Wouters]
**** Ignore delays attached to gate UDPs. [Stefan Thiede]
**** Fix SystemVerilog parameterized defines with `` expansion,
and fix extra whitespace inserted on substitution. [Vladimir Matveyenko]
**** Fix no-module include files on command line. [Stefan Thiede]
**** Fix dropping of backslash quoted-quote at end of $display.
**** Fix task output pin connected to non-variables. [Jonathan Kimmitt]
**** Fix missing test_v in install datadir. [Holger Waechtler]
**** Fix internal error after MSB < LSB error reported to user. [Stefan Thiede]
* Verilator 3.660 2008/03/23 * Verilator 3.660 2008/03/23
*** Add support for hard-coding VERILATOR_ROOT etc in the executables, *** Add support for hard-coding VERILATOR_ROOT etc in the executables,
+28 -22
View File
@@ -6,7 +6,7 @@
# #
# Author: Wilson Snyder <[email protected]> # Author: Wilson Snyder <[email protected]>
# #
# Code available from: http://www.veripool.com/verilator # Code available from: http://www.veripool.org/verilator
# #
#***************************************************************************** #*****************************************************************************
# #
@@ -61,6 +61,9 @@ MAKEINFO = makeinfo
TEXI2DVI = texi2dvi TEXI2DVI = texi2dvi
PERL = @PERL@ PERL = @PERL@
# Destination prefix for RPMs
DESTDIR =
#### Don't edit: You're much better using configure switches to set these #### Don't edit: You're much better using configure switches to set these
prefix = @prefix@ prefix = @prefix@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
@@ -81,6 +84,9 @@ infodir = @infodir@
# Generally ${prefix}/share/verilator # Generally ${prefix}/share/verilator
pkgdatadir = @pkgdatadir@ pkgdatadir = @pkgdatadir@
# Directory in which to install data across multiple architectures
datarootdir = @datarootdir@
#### End of system configuration section. #### #### End of system configuration section. ####
###################################################################### ######################################################################
@@ -186,9 +192,11 @@ verilator.html: bin/verilator
verilator.pdf: bin/verilator $(DISTCONFIG) verilator.pdf: bin/verilator $(DISTCONFIG)
pod2latex --full --out verilator.tex bin/verilator pod2latex --full --out verilator.tex bin/verilator
cat < verilator.tex \ cat < verilator.tex \
| sed 's/\\begin{document}/\\usepackage[left=1.7in,right=1.7in,top=1.3in,bottom=1.3in]{geometry}\n\\begin{document}/' \
| sed 's/\\begin{document}/\\usepackage[pdftex,bookmarks=true,bookmarksnumbered=true,hypertexnames=false,breaklinks=true,linkbordercolor={0 0 1}]{hyperref}\n\\begin{document}/' \
| sed 's/\\begin{document}/\\usepackage{fancyhdr} \\pagestyle{fancy}\n\\begin{document}/' \ | sed 's/\\begin{document}/\\usepackage{fancyhdr} \\pagestyle{fancy}\n\\begin{document}/' \
| sed 's/\\begin{document}/\\setlength{\\parindent}{0pt} \\setlength{\\parskip}{\\baselineskip}\n\\begin{document}/' \ | sed 's/\\begin{document}/\\setlength{\\parindent}{0pt} \\setlength{\\parskip}{\\baselineskip}\n\\begin{document}/' \
| sed 's/\\begin{document}/\\title{$(DISTTITLE)} \\date{${DISTDATE}} \\author{Wilson Snyder\\\\ http:\/\/www.veripool.com}\n\\begin{document}/' \ | sed 's/\\begin{document}/\\title{$(DISTTITLE)} \\date{${DISTDATE}} \\author{Wilson Snyder\\\\ http:\/\/www.veripool.org}\n\\begin{document}/' \
| sed 's/\\begin{document}/\\lhead[$(DISTTITLE)]{$(DISTTITLE)}\n\\begin{document}/' \ | sed 's/\\begin{document}/\\lhead[$(DISTTITLE)]{$(DISTTITLE)}\n\\begin{document}/' \
| sed 's/\\tableofcontents/\\begin{titlepage} \\maketitle \\end{titlepage}\n\\tableofcontents/' \ | sed 's/\\tableofcontents/\\begin{titlepage} \\maketitle \\end{titlepage}\n\\tableofcontents/' \
> verilator2.tex > verilator2.tex
@@ -208,25 +216,26 @@ README: readme.texi
# See uninstall also # See uninstall also
VL_INST_BIN_FILES = verilator verilator_bin verilator_bin_dbg VL_INST_BIN_FILES = verilator verilator_bin verilator_bin_dbg
installbin: installbin:
$(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(bindir)
( cd bin ; $(INSTALL_PROGRAM) verilator $(bindir)/verilator ) ( cd bin ; $(INSTALL_PROGRAM) verilator $(DESTDIR)$(bindir)/verilator )
( $(INSTALL_PROGRAM) verilator_bin $(bindir)/verilator_bin ) ( $(INSTALL_PROGRAM) verilator_bin $(DESTDIR)$(bindir)/verilator_bin )
( $(INSTALL_PROGRAM) verilator_bin_dbg $(bindir)/verilator_bin_dbg ) ( $(INSTALL_PROGRAM) verilator_bin_dbg $(DESTDIR)$(bindir)/verilator_bin_dbg )
VL_INST_MAN_FILES = verilator.1 VL_INST_MAN_FILES = verilator.1
installman: installman:
$(SHELL) ${srcdir}/mkinstalldirs $(mandir) $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(mandir)/man1
for p in $(VL_INST_MAN_FILES) ; do \ for p in $(VL_INST_MAN_FILES) ; do \
$(INSTALL_PROGRAM) $$p $(mandir)/man1/$$p; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(mandir)/man1/$$p; \
done done
installdata: installdata:
$(SHELL) ${srcdir}/mkinstalldirs $(pkgdatadir)/examples $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgdatadir)/examples
cp -r include $(pkgdatadir) cp -r include $(DESTDIR)$(pkgdatadir)
cp -r src $(pkgdatadir) cp -r src $(DESTDIR)$(pkgdatadir)
cp -r test_c $(pkgdatadir)/examples cp -r test_c $(DESTDIR)$(pkgdatadir)/examples
cp -r test_sc $(pkgdatadir)/examples cp -r test_sc $(DESTDIR)$(pkgdatadir)/examples
cp -r test_sp $(pkgdatadir)/examples cp -r test_sp $(DESTDIR)$(pkgdatadir)/examples
cp -r test_v $(DESTDIR)$(pkgdatadir)/examples
VL_INST_DATA_FILES = verilator.1 VL_INST_DATA_FILES = verilator.1
install: all_nomsg installbin installman installdata install-msg install: all_nomsg installbin installman installdata install-msg
@@ -258,9 +267,6 @@ install-project-quick:
endif endif
ftp: info ftp: info
echo "http://www.veripool.com/verilator3.html"
cp verilator.html verilator_man.html
ftp_tree --password $(VERIPOOL_PW) --user $(VERIPOOL_USER) verilator_man.html webftp.veripool.com:/web
install-msg: install-msg:
@echo "Installed!" @echo "Installed!"
@@ -273,9 +279,9 @@ install-msg:
@echo @echo
uninstall: uninstall:
-cd $(mandir)/man1 && rm -f $(VL_INST_MAN_FILES) -cd $(DESTDIR)$(mandir)/man1 && rm -f $(VL_INST_MAN_FILES)
-cd $(bindir) && rm -f $(VL_INST_BIN_FILES) -cd $(DESTDIR)$(bindir) && rm -f $(VL_INST_BIN_FILES)
-rm -f $(pkgdatadir) -rm -f $(DESTDIR)$(pkgdatadir)
# autoheader might not change config_build.h.in, so touch a stamp file. # autoheader might not change config_build.h.in, so touch a stamp file.
IN_WILD := ${srcdir}/*.in ${srcdir}/*/*.in ${srcdir}/*/*/*.in \ IN_WILD := ${srcdir}/*.in ${srcdir}/*/*.in ${srcdir}/*/*/*.in \
@@ -300,7 +306,7 @@ configure: configure.ac
maintainer-clean:: maintainer-clean::
@echo "This command is intended for maintainers to use;" @echo "This command is intended for maintainers to use;"
@echo "rebuilding the deleted files requires makeinfo." @echo "rebuilding the deleted files requires makeinfo."
rm -f *.info* $(INFOS) faq.html verilator.html configure bin/* rm -f *.info* $(INFOS) faq.html verilator.html configure
clean mostlyclean distclean maintainer-clean maintainer-copy:: clean mostlyclean distclean maintainer-clean maintainer-copy::
for dir in $(SUBDIRS); do \ for dir in $(SUBDIRS); do \
@@ -333,7 +339,7 @@ DISTCONFIG = src/config_build.h.in
DISTTITLE := $(shell sed -e '/DTVERSION/!d' -e 's/[^0-9]*\([0-9.a-z]*\).*/verilator-\1/' -e 's/v/V/' -e q $(DISTCONFIG)) DISTTITLE := $(shell sed -e '/DTVERSION/!d' -e 's/[^0-9]*\([0-9.a-z]*\).*/verilator-\1/' -e 's/v/V/' -e q $(DISTCONFIG))
DISTNAME := $(shell sed -e '/DTVERSION/!d' -e 's/[^0-9]*\([0-9.a-z]*\).*/verilator-\1/' -e q $(DISTCONFIG)) DISTNAME := $(shell sed -e '/DTVERSION/!d' -e 's/[^0-9]*\([0-9.a-z]*\).*/verilator-\1/' -e q $(DISTCONFIG))
DISTDATEPRE := $(shell sed -e '/DTVERSION/!d' -e 's/.*\([0-3]\?[0-9].[0-3]\?[0-9].[1-2][0-9][0-9][0-9]\).*/\1/' -e q $(DISTCONFIG)) DISTDATEPRE := $(shell sed -e '/DTVERSION/!d' -e 's/.*\([1-2][0-9][0-9][0-9].[0-9]*[0-9].[0-9]*[0-9]\).*/\1/' -e q $(DISTCONFIG))
DISTTAGNAME := $(subst .,_,$(subst -,_,$(DISTNAME))) DISTTAGNAME := $(subst .,_,$(subst -,_,$(DISTNAME)))
DISTDATE := $(subst /,-,$(DISTDATEPRE)) DISTDATE := $(subst /,-,$(DISTDATEPRE))
+48 -6
View File
@@ -161,7 +161,7 @@ code, lints it, and optionally adds coverage and waveform tracing code.
For C++ and SystemC formats, it outputs .cpp and .h files. For SystemPerl For C++ and SystemC formats, it outputs .cpp and .h files. For SystemPerl
format, it outputs .sp files for the SystemPerl preprocessor, which greatly format, it outputs .sp files for the SystemPerl preprocessor, which greatly
simplifies writing SystemC code and is available at simplifies writing SystemC code and is available at
L<http://www.veripool.com>. L<http://www.veripool.org>.
The files created by Verilator are then compiled with C++. The user writes The files created by Verilator are then compiled with C++. The user writes
a little C++ wrapper file, which instantiates the top level module, and a little C++ wrapper file, which instantiates the top level module, and
@@ -197,6 +197,7 @@ descriptions in the next sections for more information.
-I<dir> Directory to search for includes -I<dir> Directory to search for includes
--inhibit-sim Create function to turn off sim --inhibit-sim Create function to turn off sim
--inline-mult <value> Tune module inlining --inline-mult <value> Tune module inlining
--language <lang> Language standard to parse
--lint-only Lint, but do not make output --lint-only Lint, but do not make output
--MMD Create .d dependency files --MMD Create .d dependency files
--MP Create phony dependency targets --MP Create phony dependency targets
@@ -217,6 +218,7 @@ descriptions in the next sections for more information.
--sc Create SystemC output --sc Create SystemC output
--sp Create SystemPerl output --sp Create SystemPerl output
--stats Create statistics file --stats Create statistics file
--top-module <topname> Name of top level input module
--trace Enable waveform creation --trace Enable waveform creation
--trace-depth <levels> Depth of tracing --trace-depth <levels> Depth of tracing
-U<var> Undefine preprocessor define -U<var> Undefine preprocessor define
@@ -379,6 +381,14 @@ values, or a value <= 1 will inline everything, will lead to longer compile
times, but potentially faster runtimes. This setting is ignored for very times, but potentially faster runtimes. This setting is ignored for very
small modules; they will always be inlined, if allowed. small modules; they will always be inlined, if allowed.
=item --language I<value>
Select the language to be used when first processing each Verilog file.
The language value must be "1364-1995", "1364-2001", "1364-2001",
"1364-2005", or "1800-2005". This should only be used for legacy code, as
the preferable option is to edit the code to repair new keywords, or add
appropriate `begin_keywords.
=item --lint-only =item --lint-only
Check the files for lint violations only, do not create any other output. Check the files for lint violations only, do not create any other output.
@@ -451,8 +461,9 @@ the backward-compatible default of sc_bv's.
=item --prefix I<topname> =item --prefix I<topname>
Specifies the name of the top level class. Defaults to the name of the first Specifies the name of the top level class and makefile. Defaults to V
Verilog file passed on the command line. prepended to the name of the --top-module switch, or V prepended to the
first Verilog filename passed on the command line.
=item --profile-cfuncs =item --profile-cfuncs
@@ -498,6 +509,13 @@ Specifies SystemPerl output mode; see also --cc and -sc.
Creates a dump file with statistics on the design in {prefix}__stats.txt. Creates a dump file with statistics on the design in {prefix}__stats.txt.
=item --top-module I<topname>
When the input Verilog contains more than one top level module, specifies
the name of the top level Verilog module to become the top, and sets the
default for if --prefix is not used. This is not needed with standard
designs with only one top.
=item --trace =item --trace
Adds waveform tracing code to the model, this will create additional Adds waveform tracing code to the model, this will create additional
@@ -985,6 +1003,8 @@ declarations inside port lists.
Verilator supports the `begin_keywords and `end_keywords compiler Verilator supports the `begin_keywords and `end_keywords compiler
directives. directives.
Verilator supports $clog2.
Verilator partially supports the uwire keyword. Verilator partially supports the uwire keyword.
=head1 SYSTEMVERILOG (IEEE 1800-2005) SUPPORT =head1 SYSTEMVERILOG (IEEE 1800-2005) SUPPORT
@@ -1528,6 +1548,10 @@ argument (as with C's printf), you cannot simply list variables standalone.
The sized display functions are rarely used and so not supported. Replace The sized display functions are rarely used and so not supported. Replace
them with a $write with the appropriate format specifier. them with a $write with the appropriate format specifier.
=item $finish, $stop
The rarely used optional parameter to $finish and $stop is ignored.
=item $fopen, $fclose, $fdisplay, $fwrite =item $fopen, $fclose, $fdisplay, $fwrite
File descriptors passed to the file PLI calls must be file descriptors, not File descriptors passed to the file PLI calls must be file descriptors, not
@@ -1667,7 +1691,7 @@ output from a sub-module.) While legal in Verilog, implicit declarations
only work for single bit wide signals (not buses), do not allow using a only work for single bit wide signals (not buses), do not allow using a
signal before it is implicitly declared by a cell, and can lead to dangling signal before it is implicitly declared by a cell, and can lead to dangling
nets. A better option is the /*AUTOWIRE*/ feature of Verilog-Mode for nets. A better option is the /*AUTOWIRE*/ feature of Verilog-Mode for
Emacs, available from L<http://www.veripool.com/> Emacs, available from L<http://www.veripool.org/>
Ignoring this warning will only suppress the lint check, it will simulate Ignoring this warning will only suppress the lint check, it will simulate
correctly. correctly.
@@ -1875,6 +1899,24 @@ The best fix, which clarifies intent and will also make all tools happy is:
Ignoring this warning will only suppress the lint check, it will simulate Ignoring this warning will only suppress the lint check, it will simulate
correctly. correctly.
=item WIDTHCONCAT
Warns that based on width rules of Verilog, a concatenate or replication
has a undeterminate width. In most cases this violates the Verilog rule
that widths inside concatenates and replicates must be sized, and should be
fixed in the code.
wire [63:0] concat = {1,2};
An example where this is technically legal (though still bad form) is:
parameter PAR = 1;
wire [63:0] concat = {PAR,PAR};
The correct fix is to either size the 1 ("32'h1"), or add the width to the
parameter definition ("parameter [31:0]"), or add the width to the
parameter usage ("{PAR[31:0],PAR[31:0]}".
=back =back
The following describes the less obvious errors: The following describes the less obvious errors:
@@ -2075,7 +2117,7 @@ use GCC 2.95, or GCC 3.4 you'll have faster builds. Two ways to cheat are
to compile on parallel machines and avoid compilations altogether. See the to compile on parallel machines and avoid compilations altogether. See the
--output-split option, and the web for the ccache, distcc and icecream --output-split option, and the web for the ccache, distcc and icecream
packages, and the Make::Cache package available from packages, and the Make::Cache package available from
L<http://www.veripool.com/>. Make::Cache will skip GCC runs between L<http://www.veripool.org/>. Make::Cache will skip GCC runs between
identical source builds, even across different users. identical source builds, even across different users.
=item Why do so many files need to recompile when I add a signal? =item Why do so many files need to recompile when I add a signal?
@@ -2213,7 +2255,7 @@ Eugene Weber, Leon Wildman, and Mat Zeno.
=head1 DISTRIBUTION =head1 DISTRIBUTION
The latest version is available from L<http://www.veripool.com/>. The latest version is available from L<http://www.veripool.org/>.
Copyright 2003-2008 by Wilson Snyder. Verilator is free software; you can Copyright 2003-2008 by Wilson Snyder. Verilator is free software; you can
redistribute it and/or modify it under the terms of either the GNU Lesser redistribute it and/or modify it under the terms of either the GNU Lesser
+1 -1
View File
@@ -178,7 +178,7 @@ Displays this message and program version and exits.
=head1 DISTRIBUTION =head1 DISTRIBUTION
The latest version is available from L<http://www.veripool.com/>. The latest version is available from L<http://www.veripool.org/verilator>.
Copyright 2005-2008 by Wilson Snyder. This package is free software; you Copyright 2005-2008 by Wilson Snyder. This package is free software; you
can redistribute it and/or modify it under the terms of either the GNU can redistribute it and/or modify it under the terms of either the GNU
+1 -1
View File
@@ -189,7 +189,7 @@ Displays this message and program version and exits.
=head1 DISTRIBUTION =head1 DISTRIBUTION
The latest version is available from L<http://www.veripool.com/>. The latest version is available from L<http://www.veripool.org/>.
Copyright 2007-2008 by Wilson Snyder. This package is free software; you Copyright 2007-2008 by Wilson Snyder. This package is free software; you
can redistribute it and/or modify it under the terms of either the GNU can redistribute it and/or modify it under the terms of either the GNU
+3 -2
View File
@@ -10,8 +10,9 @@ AC_CONFIG_HEADER(src/config_build.h)
dnl Special Substitutions dnl Special Substitutions
AC_ARG_ENABLE(defenv, AC_ARG_ENABLE(defenv,
[AS_HELP_STRING([--enable-defenv], [hardcode default environment variables])], [AS_HELP_STRING([--disable-defenv], [disable hardcoded default environment variables])],
CFG_WITH_DEFENV=1,) CFG_WITH_DEFENV=$enableval,
CFG_WITH_DEFENV=yes)
AC_SUBST(CFG_WITH_DEFENV) AC_SUBST(CFG_WITH_DEFENV)
dnl Checks for programs. dnl Checks for programs.
+1 -1
View File
@@ -18,7 +18,7 @@
/// This file must be compiled and linked against all objects /// This file must be compiled and linked against all objects
/// created from Verilator. /// created from Verilator.
/// ///
/// Code available from: http://www.veripool.com/verilator /// Code available from: http://www.veripool.org/verilator
/// ///
//========================================================================= //=========================================================================
+60 -11
View File
@@ -19,7 +19,7 @@
/// all C++ files it generates. It contains standard macros and /// all C++ files it generates. It contains standard macros and
/// classes required by the Verilated code. /// classes required by the Verilated code.
/// ///
/// Code available from: http://www.veripool.com/verilator /// Code available from: http://www.veripool.org/verilator
/// ///
//************************************************************************* //*************************************************************************
@@ -460,43 +460,92 @@ static inline IData VL_REDOR_W(int words, WDataInP lwp) {
} }
// EMIT_RULE: VL_REDXOR: oclean=dirty; obits=1; // EMIT_RULE: VL_REDXOR: oclean=dirty; obits=1;
static inline IData VL_REDXOR_W(int words, WDataInP lwp) {
IData r = lwp[0];
for (int i=1; i < words; i++) r ^= lwp[i];
r=(r^(r>>1));
r=(r^(r>>2));
r=(r^(r>>4));
r=(r^(r>>8));
r=(r^(r>>16));
return r;
}
static inline IData VL_REDXOR_2(IData r) { static inline IData VL_REDXOR_2(IData r) {
// Experiments show VL_REDXOR_2 is faster than __builtin_parityl
r=(r^(r>>1)); r=(r^(r>>1));
return r; return r;
} }
static inline IData VL_REDXOR_4(IData r) { static inline IData VL_REDXOR_4(IData r) {
#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(VL_NO_BUILTINS)
return __builtin_parityl(r);
#else
r=(r^(r>>1)); r=(r^(r>>2)); r=(r^(r>>1)); r=(r^(r>>2));
return r; return r;
#endif
} }
static inline IData VL_REDXOR_8(IData r) { static inline IData VL_REDXOR_8(IData r) {
#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(VL_NO_BUILTINS)
return __builtin_parityl(r);
#else
r=(r^(r>>1)); r=(r^(r>>2)); r=(r^(r>>4)); r=(r^(r>>1)); r=(r^(r>>2)); r=(r^(r>>4));
return r; return r;
#endif
} }
static inline IData VL_REDXOR_16(IData r) { static inline IData VL_REDXOR_16(IData r) {
#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(VL_NO_BUILTINS)
return __builtin_parityl(r);
#else
r=(r^(r>>1)); r=(r^(r>>2)); r=(r^(r>>4)); r=(r^(r>>8)); r=(r^(r>>1)); r=(r^(r>>2)); r=(r^(r>>4)); r=(r^(r>>8));
return r; return r;
#endif
} }
static inline IData VL_REDXOR_32(IData r) { static inline IData VL_REDXOR_32(IData r) {
#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(VL_NO_BUILTINS)
return __builtin_parityl(r);
#else
r=(r^(r>>1)); r=(r^(r>>2)); r=(r^(r>>4)); r=(r^(r>>8)); r=(r^(r>>16)); r=(r^(r>>1)); r=(r^(r>>2)); r=(r^(r>>4)); r=(r^(r>>8)); r=(r^(r>>16));
return r; return r;
#endif
} }
static inline IData VL_REDXOR_64(QData r) { static inline IData VL_REDXOR_64(QData r) {
#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(VL_NO_BUILTINS)
return __builtin_parityll(r);
#else
r=(r^(r>>1)); r=(r^(r>>2)); r=(r^(r>>4)); r=(r^(r>>8)); r=(r^(r>>16)); r=(r^(r>>32)); r=(r^(r>>1)); r=(r^(r>>2)); r=(r^(r>>4)); r=(r^(r>>8)); r=(r^(r>>16)); r=(r^(r>>32));
return r; return r;
#endif
}
static inline IData VL_REDXOR_W(int words, WDataInP lwp) {
IData r = lwp[0];
for (int i=1; i < words; i++) r ^= lwp[i];
return VL_REDXOR_32(r);
}
static inline IData VL_CLOG2_I(IData lhs) {
// Perhaps can do better using fls GCC4 builtins
int n=1;
IData chk;
if (!lhs) return 0;
chk = lhs >> VL_UL(16); if (chk) { n += 16; lhs = chk; }
chk = lhs >> VL_UL(8); if (chk) { n += 8; lhs = chk; }
chk = lhs >> VL_UL(4); if (chk) { n += 4; lhs = chk; }
chk = lhs >> VL_UL(2); if (chk) { n += 2; lhs = chk; }
chk = lhs >> VL_UL(1); if (chk) { n += 1; lhs = chk; }
return n;
}
static inline IData VL_CLOG2_Q(QData lhs) {
// Perhaps can do better using fls GCC4 builtins
int n=1;
QData chk;
if (!lhs) return 0;
chk = lhs >> VL_ULL(32); if (chk) { n += 32; lhs = chk; }
chk = lhs >> VL_ULL(16); if (chk) { n += 16; lhs = chk; }
chk = lhs >> VL_ULL(8); if (chk) { n += 8; lhs = chk; }
chk = lhs >> VL_ULL(4); if (chk) { n += 4; lhs = chk; }
chk = lhs >> VL_ULL(2); if (chk) { n += 2; lhs = chk; }
chk = lhs >> VL_ULL(1); if (chk) { n += 1; lhs = chk; }
return n;
}
static inline IData VL_CLOG2_W(int words, WDataInP lwp) {
for (int i=words-1; i>=0; i--) {
if (lwp[i]) return VL_CLOG2_I(lwp[i])+i*VL_WORDSIZE;
}
return 0;
} }
// EMIT_RULE: VL_COUNTONES_II: oclean = false; lhs clean // EMIT_RULE: VL_COUNTONES_II: oclean = false; lhs clean
static inline IData VL_COUNTONES_I(IData lhs) { static inline IData VL_COUNTONES_I(IData lhs) {
// This is faster than __builtin_popcountl
IData r = lhs - ((lhs >> 1) & 033333333333) - ((lhs >> 2) & 011111111111); IData r = lhs - ((lhs >> 1) & 033333333333) - ((lhs >> 2) & 011111111111);
r = (r + (r>>3)) & 030707070707; r = (r + (r>>3)) & 030707070707;
r = (r + (r>>6)); r = (r + (r>>6));
+1 -1
View File
@@ -1,7 +1,7 @@
// $Id$ -*- C++ -*- // $Id$ -*- C++ -*-
//************************************************************************* //*************************************************************************
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
//************************************************************************* //*************************************************************************
// //
+1 -1
View File
@@ -21,7 +21,7 @@
/// config_build.h.in, code needed by Verilated code only goes into /// config_build.h.in, code needed by Verilated code only goes into
/// verilated.h, and code needed by both goes here (verilatedos.h). /// verilated.h, and code needed by both goes here (verilatedos.h).
/// ///
/// Code available from: http://www.veripool.com/verilator /// Code available from: http://www.veripool.org/verilator
/// ///
//************************************************************************* //*************************************************************************
+2 -2
View File
@@ -45,7 +45,7 @@ Verilator is invoked with parameters similar to GCC or Synopsys's VCS. It
reads the specified Verilog code, lints it, and optionally adds coverage reads the specified Verilog code, lints it, and optionally adds coverage
code. For C++ format, it outputs .cpp and .h files. For SystemC format, code. For C++ format, it outputs .cpp and .h files. For SystemC format,
it outputs .sp files for the SystemPerl preprocessor available at it outputs .sp files for the SystemPerl preprocessor available at
http://veripool.com. http://www.veripool.org.
The resulting files are then compiled with C++. The user writes a little The resulting files are then compiled with C++. The user writes a little
C++ wrapper file, which instantiates the top level module. This is C++ wrapper file, which instantiates the top level module. This is
@@ -57,7 +57,7 @@ The resulting executable will perform the actual simulation.
@section Obtaining Distribution @section Obtaining Distribution
The latest version is available at The latest version is available at
@uref{http://veripool.com/verilator.htm} @uref{http://www.veripool.org/verilator}
Download the latest package from that site, and decompress. Download the latest package from that site, and decompress.
@samp{gunzip verilator_version.tar.gz ; tar xvf verilator_version.tar} @samp{gunzip verilator_version.tar.gz ; tar xvf verilator_version.tar}
+1 -1
View File
@@ -3,7 +3,7 @@
# #
# DESCRIPTION: Verilator: Makefile for verilog source # DESCRIPTION: Verilator: Makefile for verilog source
# #
# Code available from: http://www.veripool.com/verilator # Code available from: http://www.veripool.org/verilator
# #
#***************************************************************************** #*****************************************************************************
# #
+12 -4
View File
@@ -3,7 +3,7 @@
# #
# DESCRIPTION: Verilator: Makefile for verilog source # DESCRIPTION: Verilator: Makefile for verilog source
# #
# Code available from: http://www.veripool.com/verilator # Code available from: http://www.veripool.org/verilator
# #
#***************************************************************************** #*****************************************************************************
# #
@@ -34,6 +34,9 @@ CFG_WITH_DEFENV = @CFG_WITH_DEFENV@
prefix = @prefix@ prefix = @prefix@
# Directory in which to install data across multiple architectures
datarootdir = @datarootdir@
# Directory in which to install package specific files # Directory in which to install package specific files
# Generally ${prefix}/share/verilator # Generally ${prefix}/share/verilator
pkgdatadir = @pkgdatadir@ pkgdatadir = @pkgdatadir@
@@ -80,7 +83,7 @@ endif
# Allow RPM builds to specify hardcoded data directories # Allow RPM builds to specify hardcoded data directories
# To do this: # To do this:
ifneq ($(CFG_WITH_DEFENV),) ifeq ($(CFG_WITH_DEFENV),yes)
CPPFLAGS += -DDEFENV_SYSTEMC=\"$(SYSTEMC)\" CPPFLAGS += -DDEFENV_SYSTEMC=\"$(SYSTEMC)\"
CPPFLAGS += -DDEFENV_SYSTEMC_ARCH=\"$(SYSTEMC_ARCH)\" CPPFLAGS += -DDEFENV_SYSTEMC_ARCH=\"$(SYSTEMC_ARCH)\"
CPPFLAGS += -DDEFENV_SYSTEMPERL=\"$(SYSTEMPERL)\" CPPFLAGS += -DDEFENV_SYSTEMPERL=\"$(SYSTEMPERL)\"
@@ -242,14 +245,19 @@ V3PreProc.o: V3PreProc.cpp V3PreLex.yy.cpp
#### Generated files #### Generated files
# Target rule called before parallel build to make generated files # Target rule called before parallel build to make generated files
serial:: V3Ast__gen_classes.h serial:: V3Ast__gen_classes.h y.tab.c
V3Ast__gen_classes.h : $(ASTGEN) V3Ast.h V3AstNodes.h V3Ast__gen_classes.h : $(ASTGEN) V3Ast.h V3AstNodes.h
$(PERL) $(ASTGEN) -I$(srcdir) --classes $(PERL) $(ASTGEN) -I$(srcdir) --classes
y.tab.c y.tab.h: verilog.y $(HEADERS) y.tab.h: y.tab.c
# Have only one output file in this rule to prevent parallel make issues
y.tab.c: verilog.y $(HEADERS)
@echo "If you get errors from verilog.y below, try upgrading bison to version 1.875 or newer." @echo "If you get errors from verilog.y below, try upgrading bison to version 1.875 or newer."
${YACC} ${YFLAGS} $< ${YACC} ${YFLAGS} $<
mv y.tab.c y_pregen.tab.c && $(PERL) $(srcdir)/bisonfix < y_pregen.tab.c > y.tab.c
mv y.tab.h y_pregen.tab.h && $(PERL) $(srcdir)/bisonfix < y_pregen.tab.h > y.tab.h
V3Lexer_pregen.yy.cpp: verilog.l y.tab.h $(HEADERS) V3Lexer_pregen.yy.cpp: verilog.l y.tab.h $(HEADERS)
${LEX} ${LFLAGS} -o$@ $< ${LEX} ${LFLAGS} -o$@ $<
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Break always into sensitivity active domains // DESCRIPTION: Verilator: Break always into sensitivity active domains
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Break always into sensitivity block domains // DESCRIPTION: Verilator: Break always into sensitivity block domains
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Break always into sensitivity active domains // DESCRIPTION: Verilator: Break always into sensitivity active domains
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Break always into sensitivity block domains // DESCRIPTION: Verilator: Break always into sensitivity block domains
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Collect and print statistics // DESCRIPTION: Verilator: Collect and print statistics
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Assertion expansion // DESCRIPTION: Verilator: Assertion expansion
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Collect and print statistics // DESCRIPTION: Verilator: Collect and print statistics
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Assertion pre-expansion // DESCRIPTION: Verilator: Assertion pre-expansion
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Ast node structures // DESCRIPTION: Verilator: Ast node structures
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Ast node structure // DESCRIPTION: Verilator: Ast node structure
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+5 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Ast node structures // DESCRIPTION: Verilator: Ast node structures
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
@@ -304,6 +304,10 @@ void AstCellInline::dump(ostream& str) {
this->AstNode::dump(str); this->AstNode::dump(str);
str<<" -> "<<origModName(); str<<" -> "<<origModName();
} }
void AstDisplay::dump(ostream& str) {
this->AstNode::dump(str);
//str<<" "<<displayType().ascii();
}
void AstPin::dump(ostream& str) { void AstPin::dump(ostream& str) {
this->AstNode::dump(str); this->AstNode::dump(str);
if (modVarp()) { str<<" -> "; modVarp()->dump(str); } if (modVarp()) { str<<" -> "; modVarp()->dump(str); }
+16 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Ast node structure // DESCRIPTION: Verilator: Ast node structure
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
@@ -1254,6 +1254,7 @@ public:
virtual AstType type() const { return AstType::DISPLAY;} virtual AstType type() const { return AstType::DISPLAY;}
virtual AstNode* clone() { return new AstDisplay(*this); } virtual AstNode* clone() { return new AstDisplay(*this); }
virtual void accept(AstNVisitor& v, AstNUser* vup=NULL) { v.visit(this,vup); } virtual void accept(AstNVisitor& v, AstNUser* vup=NULL) { v.visit(this,vup); }
virtual void dump(ostream& str);
virtual string verilogKwd() const { return (filep() ? (string)"$f"+(string)displayType().ascii() virtual string verilogKwd() const { return (filep() ? (string)"$f"+(string)displayType().ascii()
: (string)"$"+(string)displayType().ascii()); } : (string)"$"+(string)displayType().ascii()); }
virtual bool isGateOptimizable() const { return false; } virtual bool isGateOptimizable() const { return false; }
@@ -1970,6 +1971,20 @@ struct AstUnsigned : public AstNodeUniop {
virtual bool sizeMattersLhs() {return true;} // Eliminated before matters virtual bool sizeMattersLhs() {return true;} // Eliminated before matters
virtual int instrCount() const { return 0; } virtual int instrCount() const { return 0; }
}; };
struct AstCLog2 : public AstNodeUniop {
AstCLog2(FileLine* fl, AstNode* lhsp) : AstNodeUniop(fl, lhsp) {}
virtual ~AstCLog2() {}
virtual AstType type() const { return AstType::CLOG2;}
virtual AstNode* clone() { return new AstCLog2(*this); }
virtual void accept(AstNVisitor& v, AstNUser* vup=NULL) { v.visit(this,vup); }
virtual void numberOperate(V3Number& out, const V3Number& lhs) { out.opCLog2(lhs); }
virtual string emitVerilog() { return "%k$clog2(%l)"; }
virtual bool emitWordForm() { return true; }
virtual string emitOperator() { return "VL_CLOG2"; }
virtual bool cleanOut() {return false;} virtual bool cleanLhs() {return true;}
virtual bool sizeMattersLhs() {return false;}
virtual int instrCount() const { return widthInstrs()*16; }
};
struct AstCountOnes : public AstNodeUniop { struct AstCountOnes : public AstNodeUniop {
// Number of bits set in vector // Number of bits set in vector
AstCountOnes(FileLine* fl, AstNode* lhsp) : AstNodeUniop(fl, lhsp) {} AstCountOnes(FileLine* fl, AstNode* lhsp) : AstNodeUniop(fl, lhsp) {}
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Removal of named begin blocks // DESCRIPTION: Verilator: Removal of named begin blocks
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Removal of named begin blocks // DESCRIPTION: Verilator: Removal of named begin blocks
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Branch prediction // DESCRIPTION: Verilator: Branch prediction
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Branch prediction // DESCRIPTION: Verilator: Branch prediction
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Find broken links in tree // DESCRIPTION: Verilator: Find broken links in tree
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Find broken links in tree // DESCRIPTION: Verilator: Find broken links in tree
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Break case statements up and add Unknown assigns // DESCRIPTION: Verilator: Break case statements up and add Unknown assigns
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Break case statements up and add Unknown assigns // DESCRIPTION: Verilator: Break case statements up and add Unknown assigns
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Add C++ casts across expression size changes // DESCRIPTION: Verilator: Add C++ casts across expression size changes
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Add C++ casts across expression size changes // DESCRIPTION: Verilator: Add C++ casts across expression size changes
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Add temporaries, such as for changed nodes // DESCRIPTION: Verilator: Add temporaries, such as for changed nodes
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Pre C-Emit stage changes // DESCRIPTION: Verilator: Pre C-Emit stage changes
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Add temporaries, such as for clean nodes // DESCRIPTION: Verilator: Add temporaries, such as for clean nodes
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Pre C-Emit stage changes // DESCRIPTION: Verilator: Pre C-Emit stage changes
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Clocking POS/NEGEDGE insertion // DESCRIPTION: Verilator: Clocking POS/NEGEDGE insertion
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Clocking POS/NEGEDGE insertion // DESCRIPTION: Verilator: Clocking POS/NEGEDGE insertion
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Combine common code into functions // DESCRIPTION: Verilator: Combine common code into functions
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Combine common code into functions // DESCRIPTION: Verilator: Combine common code into functions
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Constant folding // DESCRIPTION: Verilator: Constant folding
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Propagate constants across AST // DESCRIPTION: Verilator: Propagate constants across AST
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Netlist (top level) functions // DESCRIPTION: Verilator: Netlist (top level) functions
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Coverage modules/signals together // DESCRIPTION: Verilator: Coverage modules/signals together
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Dead code elimination // DESCRIPTION: Verilator: Dead code elimination
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Dead branch elimination // DESCRIPTION: Verilator: Dead branch elimination
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Add temporaries, such as for delayed nodes // DESCRIPTION: Verilator: Add temporaries, such as for delayed nodes
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Pre C-Emit stage changes // DESCRIPTION: Verilator: Pre C-Emit stage changes
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Prevent very deep expressions // DESCRIPTION: Verilator: Prevent very deep expressions
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Prevent very deep expressions // DESCRIPTION: Verilator: Prevent very deep expressions
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Prevent very deep expressions // DESCRIPTION: Verilator: Prevent very deep expressions
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Prevent very deep expressions // DESCRIPTION: Verilator: Prevent very deep expressions
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Rename scope references to module-local references // DESCRIPTION: Verilator: Rename scope references to module-local references
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Rename scope references to module-local references // DESCRIPTION: Verilator: Rename scope references to module-local references
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -3
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Emit C++ for tree // DESCRIPTION: Verilator: Emit C++ for tree
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
@@ -1027,10 +1027,8 @@ void EmitCStmts::visit(AstDisplay* nodep, AstNUser*) {
emitDispState.clear(); emitDispState.clear();
string fmt = ""; string fmt = "";
string::iterator pos = vformat.begin(); string::iterator pos = vformat.begin();
if (*pos == '"') pos++;
bool inPct = false; bool inPct = false;
for (; pos != vformat.end(); ++pos) { for (; pos != vformat.end(); ++pos) {
if (pos[0]=='"' && (pos+1)==vformat.end()) break;
if (inPct && pos[0]=='%') { if (inPct && pos[0]=='%') {
emitDispState.pushFormat("%%"); // We're printf'ing it, so need to quote the % emitDispState.pushFormat("%%"); // We're printf'ing it, so need to quote the %
inPct = false; inPct = false;
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Emit C++ code for module tree // DESCRIPTION: Verilator: Emit C++ code for module tree
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Emit C++ for tree // DESCRIPTION: Verilator: Emit C++ for tree
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Emit C++ for tree // DESCRIPTION: Verilator: Emit C++ for tree
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Emit C++ for tree // DESCRIPTION: Verilator: Emit C++ for tree
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Emit Makefile // DESCRIPTION: Verilator: Emit Makefile
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Emit Makefile // DESCRIPTION: Verilator: Emit Makefile
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Emit Verilog from tree // DESCRIPTION: Verilator: Emit Verilog from tree
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Emit Verilog code for module tree // DESCRIPTION: Verilator: Emit Verilog code for module tree
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Error handling // DESCRIPTION: Verilator: Error handling
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+3 -2
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Error handling // DESCRIPTION: Verilator: Error handling
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
@@ -61,6 +61,7 @@ public:
UNUSED, // No receivers UNUSED, // No receivers
VARHIDDEN, // Hiding variable VARHIDDEN, // Hiding variable
WIDTH, // Width mismatch WIDTH, // Width mismatch
WIDTHCONCAT, // Unsized numbers/parameters in concatenations
MAX MAX
// ***Add new elements below also*** // ***Add new elements below also***
}; };
@@ -81,7 +82,7 @@ public:
"COMBDLY", "STMTDLY", "GENCLK", "IMPLICIT", "IMPURE", "COMBDLY", "STMTDLY", "GENCLK", "IMPLICIT", "IMPURE",
"MULTIDRIVEN", "REDEFMACRO", "MULTIDRIVEN", "REDEFMACRO",
"UNDRIVEN", "UNOPT", "UNOPTFLAT", "UNSIGNED", "UNUSED", "UNDRIVEN", "UNOPT", "UNOPTFLAT", "UNSIGNED", "UNUSED",
"VARHIDDEN", "WIDTH", "VARHIDDEN", "WIDTH", "WIDTHCONCAT",
" MAX" " MAX"
}; };
return names[m_e]; return names[m_e];
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Add temporaries, such as for expand nodes // DESCRIPTION: Verilator: Add temporaries, such as for expand nodes
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Expansion of wide operator macros to C operators // DESCRIPTION: Verilator: Expansion of wide operator macros to C operators
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: File stream wrapper that understands indentation // DESCRIPTION: Verilator: File stream wrapper that understands indentation
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: File stream wrapper that understands indentation // DESCRIPTION: Verilator: File stream wrapper that understands indentation
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Gate optimizations, such as wire elimination // DESCRIPTION: Verilator: Gate optimizations, such as wire elimination
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Break always into sensitivity block domains // DESCRIPTION: Verilator: Break always into sensitivity block domains
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Generated Clock repairs // DESCRIPTION: Verilator: Generated Clock repairs
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Generated Clock Repairs // DESCRIPTION: Verilator: Generated Clock Repairs
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Common headers // DESCRIPTION: Verilator: Common headers
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Graph optimizations // DESCRIPTION: Verilator: Graph optimizations
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Graph optimizations // DESCRIPTION: Verilator: Graph optimizations
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Graph acyclic algorithm // DESCRIPTION: Verilator: Graph acyclic algorithm
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Graph optimizations // DESCRIPTION: Verilator: Graph optimizations
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Graph algorithm base class // DESCRIPTION: Verilator: Graph algorithm base class
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Graph optimizations // DESCRIPTION: Verilator: Graph optimizations
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Graph automata base class // DESCRIPTION: Verilator: Graph automata base class
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Graph tests // DESCRIPTION: Verilator: Graph tests
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Hashed common code into functions // DESCRIPTION: Verilator: Hashed common code into functions
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Hash AST trees to find duplicates // DESCRIPTION: Verilator: Hash AST trees to find duplicates
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Add temporaries, such as for inline nodes // DESCRIPTION: Verilator: Add temporaries, such as for inline nodes
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Inlining of modules // DESCRIPTION: Verilator: Inlining of modules
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Add temporaries, such as for inst nodes // DESCRIPTION: Verilator: Add temporaries, such as for inst nodes
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Break always into sensitivity inst domains // DESCRIPTION: Verilator: Break always into sensitivity inst domains
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Language rules // DESCRIPTION: Verilator: Language rules
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Lifelicate variable assignment elimination // DESCRIPTION: Verilator: Lifelicate variable assignment elimination
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Variable life analysis // DESCRIPTION: Verilator: Variable life analysis
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: AssignPost Variable assignment elimination // DESCRIPTION: Verilator: AssignPost Variable assignment elimination
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Lifepost variable analysis // DESCRIPTION: Verilator: Lifepost variable analysis
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Resolve module/signal name references // DESCRIPTION: Verilator: Resolve module/signal name references
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Link modules/signals together // DESCRIPTION: Verilator: Link modules/signals together
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
+6 -2
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Resolve module/signal name references // DESCRIPTION: Verilator: Resolve module/signal name references
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //
@@ -210,7 +210,11 @@ private:
void readModNames() { void readModNames() {
// Look at all modules, and store pointers to all module names // Look at all modules, and store pointers to all module names
for (AstModule* nodep = v3Global.rootp()->modulesp(); nodep; nodep=nodep->nextp()->castModule()) { for (AstModule* nodep = v3Global.rootp()->modulesp(); nodep; nodep=nodep->nextp()->castModule()) {
if (!m_mods.findIdName(nodep->name())) { AstNode* foundp = m_mods.findIdName(nodep->name());
if (foundp && foundp != nodep) {
nodep->v3error("Duplicate declaration of module: "<<nodep->prettyName());
foundp->v3error("... Location of original declaration");
} else if (!foundp) {
m_mods.insert(nodep->name(), nodep); m_mods.insert(nodep->name(), nodep);
} }
} }
+1 -1
View File
@@ -2,7 +2,7 @@
//************************************************************************* //*************************************************************************
// DESCRIPTION: Verilator: Link modules/signals together // DESCRIPTION: Verilator: Link modules/signals together
// //
// Code available from: http://www.veripool.com/verilator // Code available from: http://www.veripool.org/verilator
// //
// AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli // AUTHORS: Wilson Snyder with Paul Wasson, Duane Gabli
// //

Some files were not shown because too many files have changed in this diff Show More