mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f21385e41 | ||
|
|
94fed93f54 | ||
|
|
a950e4816d | ||
|
|
c87c66efb1 | ||
|
|
5a5a0006fe | ||
|
|
60b48a6830 | ||
|
|
5e41350588 | ||
|
|
ff9f5b62ac | ||
|
|
882913f0ca | ||
|
|
2062f7e97b | ||
|
|
445c83a60d | ||
|
|
1891cfd79a | ||
|
|
06d5a7b2bf | ||
|
|
5af8a8aa4c | ||
|
|
dc6b085d8b | ||
|
|
00759f777e | ||
|
|
95ac0e61b2 | ||
|
|
6c5884853f | ||
|
|
7578ef889f | ||
|
|
da254af8d5 | ||
|
|
98123dc422 | ||
|
|
466909b3d9 | ||
|
|
0d4305192a | ||
|
|
9e61b9f696 | ||
|
|
491539ff32 | ||
|
|
4c29a13a6e | ||
|
|
b66e1bdb9e | ||
|
|
7312de6bc2 | ||
|
|
1d6bcda014 | ||
|
|
5a747bad7d | ||
|
|
9542783a7e | ||
|
|
a59639413d | ||
|
|
d5eb92a071 | ||
|
|
994cde57af | ||
|
|
238a5809bf | ||
|
|
49fa65c0dd | ||
|
|
49123f169c | ||
|
|
4dc64c387f | ||
|
|
98a63711dd | ||
|
|
cb95cf4745 | ||
|
|
acd48fa61d | ||
|
|
cb7abcbaea | ||
|
|
793c974480 | ||
|
|
78a321925f | ||
|
|
643572595e | ||
|
|
fb4d462325 | ||
|
|
c0df07c86f | ||
|
|
e918d945f2 | ||
|
|
0ee5743853 | ||
|
|
486d69da5f | ||
|
|
005b4b7609 | ||
|
|
a0fd065dcf | ||
|
|
751384cb5c | ||
|
|
6ac672b4a3 | ||
|
|
a89502be9f | ||
|
|
04e7b3bd4d | ||
|
|
9ebb37b6a5 | ||
|
|
052a7e3deb | ||
|
|
108c0f6bb8 | ||
|
|
6ed89b6ca5 | ||
|
|
27ccaffb37 | ||
|
|
a001babad2 | ||
|
|
32a76c5255 | ||
|
|
099f797975 | ||
|
|
b7df3e24b4 | ||
|
|
8323092a0c | ||
|
|
e5af46d3fb | ||
|
|
a6743588b6 | ||
|
|
90cbcd2dfd | ||
|
|
a36b7afba5 | ||
|
|
4c91ade61d | ||
|
|
f2a17b9b70 | ||
|
|
b71b9ccb57 | ||
|
|
8b0af19351 | ||
|
|
9f7c473376 | ||
|
|
0206767478 |
@@ -24,3 +24,4 @@ internals.txt
|
|||||||
verilator.txt
|
verilator.txt
|
||||||
verilator_bin*
|
verilator_bin*
|
||||||
verilator_coverage_bin*
|
verilator_coverage_bin*
|
||||||
|
verilator.pc
|
||||||
|
|||||||
@@ -3,7 +3,105 @@ 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.867 devel
|
* Verilator 3.876 2015-08-12
|
||||||
|
|
||||||
|
*** Add tracing_on, etc to vlt files, bug932. [Frederic Requin]
|
||||||
|
|
||||||
|
**** Support extraction of enum bits, bug951. [Jonathon Donaldson]
|
||||||
|
|
||||||
|
**** Fix MinGW compiler error, bug927, bug929. [Hans Tichelaar]
|
||||||
|
|
||||||
|
**** Fix .c files to be treated as .cpp, bug930. [Jonathon Donaldson]
|
||||||
|
|
||||||
|
**** Fix string-to-int space conversion, bug931. [Fabrizio Ferrandi]
|
||||||
|
|
||||||
|
**** Fix dpi imports inside generates. [Michael Tresidder]
|
||||||
|
|
||||||
|
**** Fix rounding in trace $timescale, bug946. [Frederic Requin]
|
||||||
|
|
||||||
|
**** Fix $fopen with SV string, bug947. [Sven Stucki]
|
||||||
|
|
||||||
|
**** Fix hashed error with typedef inside block, bug948. [Sven Stucki]
|
||||||
|
|
||||||
|
**** Fix makefile with --coverage, bug953. [Eivind Liland]
|
||||||
|
|
||||||
|
**** Fix coverage documentation, bug954. [Thomas J Whatson]
|
||||||
|
|
||||||
|
**** Fix parameters with function parameter arguments, bug952. [Jie Xu]
|
||||||
|
|
||||||
|
**** Fix size casts as second argument of cast item, bug950. [Jonathon Donaldson]
|
||||||
|
|
||||||
|
|
||||||
|
* Verilator 3.874 2015-06-06
|
||||||
|
|
||||||
|
*** Add pkg-config .pc file, bug919. [Stefan Wallentowitz]
|
||||||
|
|
||||||
|
**** Fix installing missing manpages, bug908. [Ahmed El-Mahmoudy]
|
||||||
|
|
||||||
|
**** Fix sign extension in large localparams, bug910. [Mike Thyer]
|
||||||
|
|
||||||
|
**** Fix core dump in sync-async warnings, bug911. [Sebastian Dressler]
|
||||||
|
|
||||||
|
**** Fix truncation warning with -pins-bv, bug912. [Alfonso Martinez]
|
||||||
|
|
||||||
|
**** Fix Cygwin uint32 compile, bug914. [Matthew Barr]
|
||||||
|
|
||||||
|
**** Fix preprocessing stringified newline escapes, bug915. [Anton Rapp]
|
||||||
|
|
||||||
|
**** Fix part-select in constant function, bug916. [Andrew Bardsley]
|
||||||
|
|
||||||
|
**** Fix width extension on mis-width ports, bug918. [Patrick Maupin]
|
||||||
|
|
||||||
|
**** Fix width propagation on sized casts, bug925. [Jonathon Donaldson]
|
||||||
|
|
||||||
|
**** Fix MSVC++ compiler error, bug927. [Hans Tichelaar]
|
||||||
|
|
||||||
|
|
||||||
|
* Verilator 3.872 2015-04-05
|
||||||
|
|
||||||
|
*** Add VerilatedVcdFile to allow real-time waveforms, bug890. [HyungKi Jeong]
|
||||||
|
|
||||||
|
*** Add --clk and related optimizations, msg1533. [Jie Xu]
|
||||||
|
|
||||||
|
*** Fix order of C style arrays. [Duraid Madina]
|
||||||
|
|
||||||
|
**** Add --dump-treei-<srcfile>, bug894. [Jie Xu]
|
||||||
|
|
||||||
|
**** Fix comma-instantiations with parameters, bug884. [Franck Jullien]
|
||||||
|
|
||||||
|
**** Fix SystemC arrayed bit vectors, bug886. [David Poole]
|
||||||
|
|
||||||
|
**** Fix compile error on MinGW, bug887. [HyungKi Jeong]
|
||||||
|
|
||||||
|
|
||||||
|
* Verilator 3.870 2015-02-12
|
||||||
|
|
||||||
|
**** Suppress COMBDLY when inside always_latch, bug864. [Iztok Jeras]
|
||||||
|
|
||||||
|
**** Support cast operator with expression size, bug865. [Iztok Jeras]
|
||||||
|
|
||||||
|
**** Add warning on slice selection out of bounds, bug875. [Cong Van Nguyen].
|
||||||
|
|
||||||
|
**** Fix member select error broke in 3.868, bug867. [Iztok Jeras]
|
||||||
|
|
||||||
|
**** Fix $sccanf from string, bug866. [David Pierce]
|
||||||
|
|
||||||
|
**** Fix VM_PARALLEL_BUILDS broke in 3.868, bug870. [Hiroki Honda]
|
||||||
|
|
||||||
|
**** Fix non-ANSI modport instantiations, bug868. [Kevin Thompson]
|
||||||
|
|
||||||
|
**** Fix UNOPTFLAT change detect on multidim arrays, bug872. [Andrew Bardsley]
|
||||||
|
|
||||||
|
**** Fix slice connections of arrays to ports, bug880. [Varun Koyyalagunta]
|
||||||
|
|
||||||
|
**** Fix mis-optimizing gate assignments in unopt blocks, bug881. [Mike Thyer]
|
||||||
|
|
||||||
|
**** Fix sign extension of pattern members, bug882. [Iztok Jeras]
|
||||||
|
|
||||||
|
**** Fix clang compile warnings.
|
||||||
|
|
||||||
|
|
||||||
|
* Verilator 3.868 2014-12-20
|
||||||
|
|
||||||
** New verilator_coverage program added to replace SystemPerl's vcoverage.
|
** New verilator_coverage program added to replace SystemPerl's vcoverage.
|
||||||
|
|
||||||
@@ -2503,7 +2601,7 @@ of input ports exists for tracing.
|
|||||||
|
|
||||||
This uses outline mode in Emacs. See C-h m [M-x describe-mode].
|
This uses outline mode in Emacs. See C-h m [M-x describe-mode].
|
||||||
|
|
||||||
Copyright 2001-2014 by Wilson Snyder. This program is free software; you
|
Copyright 2001-2015 by Wilson Snyder. This program 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
|
||||||
Lesser General Public License Version 3 or the Perl Artistic License
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
Version 2.0.
|
Version 2.0.
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
.*\.tex
|
.*\.tex
|
||||||
.*\.key
|
.*\.key
|
||||||
.*\.vcd
|
.*\.vcd
|
||||||
|
.*\.1
|
||||||
/obj_dir/
|
/obj_dir/
|
||||||
/obj_dbg/
|
/obj_dbg/
|
||||||
/obj_opt/
|
/obj_opt/
|
||||||
@@ -27,6 +28,7 @@ config.cache$
|
|||||||
config.status$
|
config.status$
|
||||||
verilator.log
|
verilator.log
|
||||||
verilator.tex
|
verilator.tex
|
||||||
|
verilator.pc$
|
||||||
verilator_bin.*
|
verilator_bin.*
|
||||||
verilator_coverage_bin.*
|
verilator_coverage_bin.*
|
||||||
.vcsmx_rebuild$
|
.vcsmx_rebuild$
|
||||||
|
|||||||
+21
-17
@@ -3,13 +3,11 @@
|
|||||||
#
|
#
|
||||||
# This file is part of Verilator.
|
# This file is part of Verilator.
|
||||||
#
|
#
|
||||||
# Author: Wilson Snyder <[email protected]>
|
|
||||||
#
|
|
||||||
# Code available from: http://www.veripool.org/verilator
|
# Code available from: http://www.veripool.org/verilator
|
||||||
#
|
#
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#
|
#
|
||||||
# Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
@@ -86,6 +84,10 @@ infodir = @infodir@
|
|||||||
# Generally ${prefix}/share/verilator
|
# Generally ${prefix}/share/verilator
|
||||||
pkgdatadir = @pkgdatadir@
|
pkgdatadir = @pkgdatadir@
|
||||||
|
|
||||||
|
# Directory in which to install pkgconfig file
|
||||||
|
# Generall ${prefix}/share/pkgconfig
|
||||||
|
pkgconfigdir = @pkgconfigdir@
|
||||||
|
|
||||||
# Directory in which to install data across multiple architectures
|
# Directory in which to install data across multiple architectures
|
||||||
datarootdir = @datarootdir@
|
datarootdir = @datarootdir@
|
||||||
|
|
||||||
@@ -103,8 +105,8 @@ SHELL = /bin/sh
|
|||||||
SUBDIRS = src test_verilated test_c test_sc test_regress
|
SUBDIRS = src test_verilated test_c test_sc test_regress
|
||||||
|
|
||||||
INFOS = README README.html README.pdf internals.txt internals.html \
|
INFOS = README README.html README.pdf internals.txt internals.html \
|
||||||
internals.pdf verilator.txt verilator.html verilator.1 verilator.pdf \
|
internals.pdf verilator.txt verilator.html verilator.pdf \
|
||||||
verilator_coverage.1
|
$(VL_INST_MAN_FILES)
|
||||||
|
|
||||||
# Files that can be generated, but should be up to date for a distribution.
|
# Files that can be generated, but should be up to date for a distribution.
|
||||||
DISTDEP = info Makefile
|
DISTDEP = info Makefile
|
||||||
@@ -209,10 +211,7 @@ test_regress: all_nomsg
|
|||||||
info: $(INFOS)
|
info: $(INFOS)
|
||||||
|
|
||||||
# Use --no-split to avoid creating filenames > 14 chars.
|
# Use --no-split to avoid creating filenames > 14 chars.
|
||||||
verilator.1: ${srcdir}/bin/verilator
|
%.1: ${srcdir}/bin/%
|
||||||
pod2man $< $@
|
|
||||||
|
|
||||||
verilator_coverage.1: ${srcdir}/bin/verilator_coverage
|
|
||||||
pod2man $< $@
|
pod2man $< $@
|
||||||
|
|
||||||
verilator.txt: ${srcdir}/bin/verilator
|
verilator.txt: ${srcdir}/bin/verilator
|
||||||
@@ -230,16 +229,16 @@ verilator.pdf: ${srcdir}/bin/verilator Makefile
|
|||||||
pdflatex verilator.tex
|
pdflatex verilator.tex
|
||||||
-rm -f verilator.toc verilator.aux verilator.idx verilator.out
|
-rm -f verilator.toc verilator.aux verilator.idx verilator.out
|
||||||
|
|
||||||
README: readme.pod
|
README: README.pod
|
||||||
-rm -f $@
|
-rm -f $@
|
||||||
$(POD2TEXT) --loose $< > $@
|
$(POD2TEXT) --loose $< > $@
|
||||||
|
|
||||||
README.html: readme.pod
|
README.html: README.pod
|
||||||
pod2html $< >$@
|
pod2html $< >$@
|
||||||
|
|
||||||
# PDF needs DIST variables; but having configure.ac as dependency isn't detected
|
# PDF needs DIST variables; but having configure.ac as dependency isn't detected
|
||||||
README.pdf: readme.pod Makefile
|
README.pdf: README.pod Makefile
|
||||||
pod2latex --full --out README.tex readme.pod
|
pod2latex --full --out README.tex README.pod
|
||||||
$(PERL) $(POD2LATEXFIX) "$(DISTTITLE) README File" "${DISTDATE}" < README.tex > README2.tex
|
$(PERL) $(POD2LATEXFIX) "$(DISTTITLE) README File" "${DISTDATE}" < README.tex > README2.tex
|
||||||
mv README2.tex README.tex
|
mv README2.tex README.tex
|
||||||
pdflatex README.tex
|
pdflatex README.tex
|
||||||
@@ -269,7 +268,7 @@ VL_INST_BIN_FILES = verilator verilator_bin verilator_bin_dbg verilator_coverage
|
|||||||
# so they can be found by the user, and under $VERILATOR_ROOT.
|
# so they can be found by the user, and under $VERILATOR_ROOT.
|
||||||
|
|
||||||
# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
|
# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
|
||||||
VL_INST_MAN_FILES = verilator.1 verilator_coverage.1
|
VL_INST_MAN_FILES = verilator.1 verilator_coverage.1 verilator_profcfunc.1
|
||||||
|
|
||||||
VL_INST_INC_BLDDIR_FILES = \
|
VL_INST_INC_BLDDIR_FILES = \
|
||||||
include/verilated.mk \
|
include/verilated.mk \
|
||||||
@@ -299,7 +298,7 @@ installbin:
|
|||||||
# So important we use $< so VPATH is searched
|
# So important we use $< so VPATH is searched
|
||||||
installman: $(VL_INST_MAN_FILES)
|
installman: $(VL_INST_MAN_FILES)
|
||||||
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(mandir)/man1
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(mandir)/man1
|
||||||
for p in $< ; do \
|
for p in $^ ; do \
|
||||||
$(INSTALL_DATA) $$p $(DESTDIR)$(mandir)/man1/$$p; \
|
$(INSTALL_DATA) $$p $(DESTDIR)$(mandir)/man1/$$p; \
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -319,6 +318,8 @@ installdata:
|
|||||||
; for p in $(VL_INST_DATA_SRCDIR_FILES) ; do \
|
; for p in $(VL_INST_DATA_SRCDIR_FILES) ; do \
|
||||||
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/examples/$$p; \
|
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/examples/$$p; \
|
||||||
done
|
done
|
||||||
|
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgconfigdir)
|
||||||
|
$(INSTALL_DATA) verilator.pc $(DESTDIR)$(pkgconfigdir)
|
||||||
|
|
||||||
# We don't trust rm -rf, so rmdir instead as it will fail if user put in other files
|
# We don't trust rm -rf, so rmdir instead as it will fail if user put in other files
|
||||||
uninstall:
|
uninstall:
|
||||||
@@ -328,6 +329,7 @@ uninstall:
|
|||||||
-cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_BLDDIR_FILES)
|
-cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_BLDDIR_FILES)
|
||||||
-cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_SRCDIR_FILES)
|
-cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_SRCDIR_FILES)
|
||||||
-cd $(DESTDIR)$(pkgdatadir)/examples && rm -f $(VL_INST_DATA_SRCDIR_FILES)
|
-cd $(DESTDIR)$(pkgdatadir)/examples && rm -f $(VL_INST_DATA_SRCDIR_FILES)
|
||||||
|
-rm $(DESTDIR)$(pkgconfigdir)/verilator.pc
|
||||||
-rmdir $(DESTDIR)$(pkgdatadir)/bin
|
-rmdir $(DESTDIR)$(pkgdatadir)/bin
|
||||||
-rmdir $(DESTDIR)$(pkgdatadir)/include/vltstd
|
-rmdir $(DESTDIR)$(pkgdatadir)/include/vltstd
|
||||||
-rmdir $(DESTDIR)$(pkgdatadir)/include
|
-rmdir $(DESTDIR)$(pkgdatadir)/include
|
||||||
@@ -337,6 +339,7 @@ uninstall:
|
|||||||
-rmdir $(DESTDIR)$(pkgdatadir)/examples/test_v
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples/test_v
|
||||||
-rmdir $(DESTDIR)$(pkgdatadir)/examples
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples
|
||||||
-rmdir $(DESTDIR)$(pkgdatadir)
|
-rmdir $(DESTDIR)$(pkgdatadir)
|
||||||
|
-rmdir $(DESTDIR)$(pkgconfigdir)
|
||||||
|
|
||||||
install: all_nomsg install-all
|
install: all_nomsg install-all
|
||||||
install-all: installbin installman installdata install-msg
|
install-all: installbin installman installdata install-msg
|
||||||
@@ -406,7 +409,8 @@ endif
|
|||||||
|
|
||||||
# Use --xml flag to see the cppcheck code to use for suppression
|
# Use --xml flag to see the cppcheck code to use for suppression
|
||||||
CPPCHECK = src/cppcheck_filtered
|
CPPCHECK = src/cppcheck_filtered
|
||||||
CPPCHECK_FLAGS = --enable=all --inline-suppr --suppress=unusedScopedObject --suppress=cstyleCast
|
CPPCHECK_FLAGS = --enable=all --inline-suppr \
|
||||||
|
--suppress=unusedScopedObject --suppress=cstyleCast --suppress=useInitializationList
|
||||||
CPPCHECK_FLAGS += --xml
|
CPPCHECK_FLAGS += --xml
|
||||||
CPPCHECK_CPP = $(wildcard $(srcdir)/include/*.cpp $(srcdir)/src/*.cpp)
|
CPPCHECK_CPP = $(wildcard $(srcdir)/include/*.cpp $(srcdir)/src/*.cpp)
|
||||||
CPPCHECK_DEP = $(subst .cpp,.cppcheck,$(CPPCHECK_CPP))
|
CPPCHECK_DEP = $(subst .cpp,.cppcheck,$(CPPCHECK_CPP))
|
||||||
@@ -421,7 +425,7 @@ ftp: info
|
|||||||
install-msg:
|
install-msg:
|
||||||
@echo "Installed!"
|
@echo "Installed!"
|
||||||
@echo
|
@echo
|
||||||
@echo "Fod documentation see 'man verilator' or 'verilator --help'"
|
@echo "For documentation see 'man verilator' or 'verilator --help'"
|
||||||
@echo "For forums and to report bugs see http://www.veripool.org/verilator"
|
@echo "For forums and to report bugs see http://www.veripool.org/verilator"
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,13 @@
|
|||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
This is the Verilator Package README file.
|
This is the Verilator package README file.
|
||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
This package is Copyright 2003-2014 by Wilson Snyder. (Report bugs to
|
http://www.veripool.org/verilator
|
||||||
|
|
||||||
|
This package is Copyright 2003-2015 by Wilson Snyder. (Report bugs to
|
||||||
L<http://www.veripool.org/>.)
|
L<http://www.veripool.org/>.)
|
||||||
|
|
||||||
Verilator is free software; you can redistribute it and/or modify it under
|
Verilator is free software; you can redistribute it and/or modify it under
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
// DESCRIPTION: Verilator: List of To Do issues.
|
// DESCRIPTION: Verilator: List of To Do issues.
|
||||||
//
|
//
|
||||||
// Copyright 2004-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2004-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+157
-71
@@ -3,7 +3,7 @@ eval 'exec perl -wS $0 ${1+"$@"}'
|
|||||||
if 0;
|
if 0;
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2003-2014 by Wilson Snyder. This program is free software; you
|
# Copyright 2003-2015 by Wilson Snyder. This program 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
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
@@ -246,6 +246,7 @@ descriptions in the next sections for more information.
|
|||||||
-CFLAGS <flags> C++ Compiler flags for makefile
|
-CFLAGS <flags> C++ Compiler flags for makefile
|
||||||
--cc Create C++ output
|
--cc Create C++ output
|
||||||
--cdc Clock domain crossing analysis
|
--cdc Clock domain crossing analysis
|
||||||
|
--clk <signal-name> Mark specified signal as clock
|
||||||
--compiler <compiler-name> Tune for specified C++ compiler
|
--compiler <compiler-name> Tune for specified C++ compiler
|
||||||
--converge-limit <loops> Tune convergence settle time
|
--converge-limit <loops> Tune convergence settle time
|
||||||
--coverage Enable all coverage
|
--coverage Enable all coverage
|
||||||
@@ -262,6 +263,7 @@ descriptions in the next sections for more information.
|
|||||||
+define+<var>=<value> Set preprocessor define
|
+define+<var>=<value> Set preprocessor define
|
||||||
--dump-tree Enable dumping .tree files
|
--dump-tree Enable dumping .tree files
|
||||||
--dump-treei <level> Enable dumping .tree files at a level
|
--dump-treei <level> Enable dumping .tree files at a level
|
||||||
|
--dump-treei-<srcfile> <level> Enable dumping .tree file at a source file at a level
|
||||||
-E Preprocess, but do not compile
|
-E Preprocess, but do not compile
|
||||||
--error-limit <value> Abort after this number of errors
|
--error-limit <value> Abort after this number of errors
|
||||||
--exe Link to create executable
|
--exe Link to create executable
|
||||||
@@ -284,6 +286,7 @@ descriptions in the next sections for more information.
|
|||||||
--MP Create phony dependency targets
|
--MP Create phony dependency targets
|
||||||
--Mdir <directory> Name of output object directory
|
--Mdir <directory> Name of output object directory
|
||||||
--mod-prefix <topname> Name to prepend to lower classes
|
--mod-prefix <topname> Name to prepend to lower classes
|
||||||
|
--no-clk <signal-name> Prevent marking specified signal as clock
|
||||||
--no-pins64 Don't use vluint64_t's for 33-64 bit sigs
|
--no-pins64 Don't use vluint64_t's for 33-64 bit sigs
|
||||||
--no-skip-identical Disable skipping identical output
|
--no-skip-identical Disable skipping identical output
|
||||||
+notimingchecks Ignored
|
+notimingchecks Ignored
|
||||||
@@ -456,6 +459,23 @@ information is also written to the file {prefix}__cdc.txt.
|
|||||||
Currently only checks some items that other CDC tools missed; if you have
|
Currently only checks some items that other CDC tools missed; if you have
|
||||||
interest in adding more traditional CDC checks, please contact the authors.
|
interest in adding more traditional CDC checks, please contact the authors.
|
||||||
|
|
||||||
|
=item --clk I<signal-name>
|
||||||
|
|
||||||
|
Sometimes it is quite difficult for Verilator to distinguish clock signals from
|
||||||
|
other data signals. Occasionally the clock signals can end up in the checking
|
||||||
|
list of signals which determines if further evaluation is needed. This will
|
||||||
|
heavily degrade the performance of verilated model.
|
||||||
|
|
||||||
|
With --clk <signal-name>, user can specified root clock into the model, then
|
||||||
|
Verilator will mark the signal as clocker and propagate the clocker attribute
|
||||||
|
automatically to other signals derived from that. In this way, Verilator will
|
||||||
|
try to avoid taking the clocker signal into checking list.
|
||||||
|
|
||||||
|
Note signal-name is specified by the RTL hiearchy path. For example, v.foo.bar.
|
||||||
|
If the signal is the input to top-module, the directly the signal name. If you
|
||||||
|
find it difficult to find the exact name, try to use C</*verilator clocker*/> in
|
||||||
|
RTL file to mark the signal directly.
|
||||||
|
|
||||||
=item --compiler I<compiler-name>
|
=item --compiler I<compiler-name>
|
||||||
|
|
||||||
Enables tunings and work-arounds for the specified C++ compiler.
|
Enables tunings and work-arounds for the specified C++ compiler.
|
||||||
@@ -573,7 +593,7 @@ alias for GCC compatibility.
|
|||||||
Select the debug built image of Verilator (if available), and enable more
|
Select the debug built image of Verilator (if available), and enable more
|
||||||
internal assertions (equivelent to C<--debug-check>), debugging messages
|
internal assertions (equivelent to C<--debug-check>), debugging messages
|
||||||
(equivelent to C<--debugi 4>), and intermediate form dump files (equivilent
|
(equivelent to C<--debugi 4>), and intermediate form dump files (equivilent
|
||||||
to C<--dump-tree>).
|
to C<--dump-treei 3>).
|
||||||
|
|
||||||
=item --debug-check
|
=item --debug-check
|
||||||
|
|
||||||
@@ -626,8 +646,12 @@ large and not desired.
|
|||||||
|
|
||||||
=item --dump-treei <level>
|
=item --dump-treei <level>
|
||||||
|
|
||||||
Rarely needed. Enable writing .tree debug files with a specific dumping
|
=item --dump-treei-<srcfile> <level>
|
||||||
level, 0 disbles dumps and is equivalent to "--no-dump-tree". Level 9
|
|
||||||
|
Rarely needed - for developer use. Set internal tree dumping level
|
||||||
|
globally to a specific dumping level or set the specified Verilator source
|
||||||
|
file to the specified tree dumping level (e.g. C<--dump-treei-V3Order 9>).
|
||||||
|
Level 0 disbles dumps and is equivalent to "--no-dump-tree". Level 9
|
||||||
enables dumping of every stage.
|
enables dumping of every stage.
|
||||||
|
|
||||||
=item -E
|
=item -E
|
||||||
@@ -761,6 +785,10 @@ otherwise manually create the Mdir before calling Verilator.
|
|||||||
Specifies the name to prepend to all lower level classes. Defaults to
|
Specifies the name to prepend to all lower level classes. Defaults to
|
||||||
the same as --prefix.
|
the same as --prefix.
|
||||||
|
|
||||||
|
=item --no-clk <signal-name>
|
||||||
|
|
||||||
|
Prevent the specified signal from being marked as clock. See C<--clk>.
|
||||||
|
|
||||||
=item --no-pins64
|
=item --no-pins64
|
||||||
|
|
||||||
Backward compatible alias for "--pins-bv 33".
|
Backward compatible alias for "--pins-bv 33".
|
||||||
@@ -1331,6 +1359,7 @@ And link with SystemC. Note your path to the libraries may vary,
|
|||||||
depending on the operating system.
|
depending on the operating system.
|
||||||
|
|
||||||
export SYSTEMC_LIBDIR=/path/to/where/libsystemc.a/exists
|
export SYSTEMC_LIBDIR=/path/to/where/libsystemc.a/exists
|
||||||
|
export LD_LIBRARY_PATH=$SYSTEMC_LIBDIR:$LD_LIBRARY_PATH
|
||||||
# Might be needed if SystemC 2.3.0
|
# Might be needed if SystemC 2.3.0
|
||||||
export SYSTEMC_CXX_FLAGS=-pthread
|
export SYSTEMC_CXX_FLAGS=-pthread
|
||||||
|
|
||||||
@@ -1470,6 +1499,12 @@ After running Make, the C++ compiler should produce the following:
|
|||||||
|
|
||||||
=over 4
|
=over 4
|
||||||
|
|
||||||
|
=item LD_LIBRARY_PATH
|
||||||
|
|
||||||
|
A generic Linux/OS variable specifying what directories have shared object
|
||||||
|
(.so) files. This path should include SystemC and any other shared objects
|
||||||
|
needed at runtime.
|
||||||
|
|
||||||
=item OBJCACHE
|
=item OBJCACHE
|
||||||
|
|
||||||
Optionally specifies a caching or distribution program to place in front of
|
Optionally specifies a caching or distribution program to place in front of
|
||||||
@@ -1888,30 +1923,40 @@ The grammar of configuration commands is as follows:
|
|||||||
Take remaining text up the the next `verilog mode switch and treat it as
|
Take remaining text up the the next `verilog mode switch and treat it as
|
||||||
Verilator configuration commands.
|
Verilator configuration commands.
|
||||||
|
|
||||||
|
=item coverage_on [-file "<filename>" [-lines <line> [ - <line> ]]]
|
||||||
|
|
||||||
=item coverage_off [-file "<filename>" [-lines <line> [ - <line> ]]]
|
=item coverage_off [-file "<filename>" [-lines <line> [ - <line> ]]]
|
||||||
|
|
||||||
Disable coverage for the specified filename (or wildcard with '*' or '?',
|
Enable/disable coverage for the specified filename (or wildcard with '*' or
|
||||||
or all files if omitted) and range of line numbers (or all lines if
|
'?', or all files if omitted) and range of line numbers (or all lines if
|
||||||
omitted). Often used to ignore an entire module for coverage analysis
|
omitted). Often used to ignore an entire module for coverage analysis
|
||||||
purposes.
|
purposes.
|
||||||
|
|
||||||
|
=item lint_on [-msg <message>] [-file "<filename>" [-lines <line> [ - <line>]]]
|
||||||
|
|
||||||
=item lint_off [-msg <message>] [-file "<filename>" [-lines <line> [ - <line>]]]
|
=item lint_off [-msg <message>] [-file "<filename>" [-lines <line> [ - <line>]]]
|
||||||
|
|
||||||
Disables the specified lint warning, in the specified filename (or wildcard
|
Enable/disables the specified lint warning, in the specified filename (or
|
||||||
with '*' or '?', or all files if omitted) and range of line numbers (or all
|
wildcard with '*' or '?', or all files if omitted) and range of line
|
||||||
lines if omitted).
|
numbers (or all lines if omitted).
|
||||||
|
|
||||||
Using '*' will override any lint_on directives in the source, i.e. the
|
With lint_off using '*' will override any lint_on directives in the source,
|
||||||
warning will still not be printed.
|
i.e. the warning will still not be printed.
|
||||||
|
|
||||||
If the -msg is omitted, all lint warnings are disabled. This will override
|
If the -msg is omitted, all lint warnings are enabled/disabled. This will
|
||||||
all later lint warning enables for the specified region.
|
override all later lint warning enables for the specified region.
|
||||||
|
|
||||||
|
=item tracing_on [-file "<filename>" [-lines <line> [ - <line> ]]]
|
||||||
|
|
||||||
=item tracing_off [-file "<filename>" [-lines <line> [ - <line> ]]]
|
=item tracing_off [-file "<filename>" [-lines <line> [ - <line> ]]]
|
||||||
|
|
||||||
Disable waveform tracing for all future signals declared in the specified
|
Enable/disable waveform tracing for all future signals declared in the
|
||||||
filename (or wildcard with '*' or '?', or all files if omitted) and range
|
specified filename (or wildcard with '*' or '?', or all files if omitted)
|
||||||
of line numbers (or all lines if omitted).
|
and range of line numbers (or all lines if omitted).
|
||||||
|
|
||||||
|
For tracing_off, cells below any module in the files/ranges specified will
|
||||||
|
also not be traced.
|
||||||
|
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
@@ -1981,6 +2026,7 @@ Verilator likewise also asserts any "unique" or "priority" SystemVerilog
|
|||||||
keywords on case statement, as well as "unique" on if statements.
|
keywords on case statement, as well as "unique" on if statements.
|
||||||
However, "priority if" is currently simply ignored.
|
However, "priority if" is currently simply ignored.
|
||||||
|
|
||||||
|
|
||||||
=head1 LANGUAGE EXTENSIONS
|
=head1 LANGUAGE EXTENSIONS
|
||||||
|
|
||||||
The following additional constructs are the extensions Verilator supports
|
The following additional constructs are the extensions Verilator supports
|
||||||
@@ -2126,6 +2172,15 @@ scheduling algorithm, sometimes required for correct clock behavior, and
|
|||||||
always improving performance. It's also a good idea to enable the
|
always improving performance. It's also a good idea to enable the
|
||||||
IMPERFECTSCH warning, to insure all clock enables are properly recognized.
|
IMPERFECTSCH warning, to insure all clock enables are properly recognized.
|
||||||
|
|
||||||
|
=item /*verilator clocker*/
|
||||||
|
|
||||||
|
=item /*verilator no_clocker*/
|
||||||
|
|
||||||
|
Used after a signal declaration to indicate the signal is used as clock or
|
||||||
|
not. This information is used by Verilator to mark the signal as clocker
|
||||||
|
and propagate the clocker attribute automatically to derived signals. See
|
||||||
|
C<--clk> for more information.
|
||||||
|
|
||||||
=item /*verilator coverage_block_off*/
|
=item /*verilator coverage_block_off*/
|
||||||
|
|
||||||
Specifies the entire begin/end block should be ignored for coverage
|
Specifies the entire begin/end block should be ignored for coverage
|
||||||
@@ -2842,6 +2897,16 @@ With --cdc only, warns that asynchronous flop reset terms come from other
|
|||||||
than primary inputs or flopped outputs, creating the potential for reset
|
than primary inputs or flopped outputs, creating the potential for reset
|
||||||
glitches.
|
glitches.
|
||||||
|
|
||||||
|
=item CLKDATA
|
||||||
|
|
||||||
|
Warns that clock signal is mixed used with/as data signal. The checking for
|
||||||
|
this warning is enabled only if user has explicitly marked some signal as
|
||||||
|
clocker using command line option or in-source meta comment (see C<--clk>).
|
||||||
|
|
||||||
|
The warning can be disabled without affecting the simulation result. But it
|
||||||
|
is recommended to check the warning as this may degrade the performance of
|
||||||
|
the Verilated model.
|
||||||
|
|
||||||
=item CMPCONST
|
=item CMPCONST
|
||||||
|
|
||||||
Warns that you are comparing a value in a way that will always be constant.
|
Warns that you are comparing a value in a way that will always be constant.
|
||||||
@@ -3508,7 +3573,10 @@ First, run verilator with the --coverage option. If you're using your own
|
|||||||
makefile, compile the model with the GCC flag -DVM_COVERAGE (if using
|
makefile, compile the model with the GCC flag -DVM_COVERAGE (if using
|
||||||
Verilator's, it will do this for you.)
|
Verilator's, it will do this for you.)
|
||||||
|
|
||||||
Run your tests in different directories. Each test will create a
|
At the end of your test, call VerilatedCov::write passing the name of the
|
||||||
|
coverage data file (typically "logs/coverage.dat").
|
||||||
|
|
||||||
|
Run each of your tests in different directories. Each test will create a
|
||||||
logs/coverage.pl file.
|
logs/coverage.pl file.
|
||||||
|
|
||||||
After running all of your tests, verilator_coverage is executed.
|
After running all of your tests, verilator_coverage is executed.
|
||||||
@@ -3745,66 +3813,84 @@ as the need arises. Verilator is now about 3x faster than in 2002, and is
|
|||||||
faster than many popular commercial simulators.
|
faster than many popular commercial simulators.
|
||||||
|
|
||||||
|
|
||||||
=head1 CONTRIBUTORS
|
|
||||||
|
|
||||||
Many people have provided ideas and other assistance with Verilator.
|
|
||||||
|
|
||||||
The major corporate sponsors of Verilator, by providing significant
|
|
||||||
contributions of time or funds include include Cavium Networks, Compaq
|
|
||||||
Corporation, Digital Equipment Corporation, Embecosm Ltd., Hicamp Systems,
|
|
||||||
Intel Corporation, Mindspeed Technologies Inc., MicroTune Inc., picoChip
|
|
||||||
Designs Ltd., Sun Microsystems, Nauticus Networks, and SiCortex Inc.
|
|
||||||
|
|
||||||
The people who have contributed major functionality are Byron Bradley,
|
|
||||||
Jeremy Bennett, Lane Brooks, Duane Galbi, Paul Wasson, and Wilson Snyder.
|
|
||||||
Major testers include Jeff Dutton, Ralf Karge, David Hewson, Wim Michiels,
|
|
||||||
Alex Solomatnikov, Sebastien Van Cauwenberghe and Gene Weber.
|
|
||||||
|
|
||||||
Some of the people who have provided ideas and feedback for Verilator
|
|
||||||
include: David Addison, Vasu Arasanipalai, Jens Arm, J Baxter, Jeremy
|
|
||||||
Bennett, David Black, Gregg Bouchard, Christopher Boumenot, Nick Bowler,
|
|
||||||
Byron Bradley, Bryan Brady, Lane Brooks, John Brownlee, Lawrence Butcher,
|
|
||||||
Chris Candler, Lauren Carlson, Donal Casey, Terry Chen, Robert A. Clark,
|
|
||||||
Allan Cochrane, Gunter Dannoritzer, Ashutosh Das, Bernard Deadman, Mike
|
|
||||||
Denio, John Deroo, John Dickol, Ruben Diez, Danny Ding, Ivan Djordjevic,
|
|
||||||
Alex Duller, Jeff Dutton, Chandan Egbert, Joe Eiler, Ahmed El-Mahmoudy,
|
|
||||||
Robert Farrell, Eugen Fekete, Andrea Foletto, Bob Fredieu, Shankar Giri,
|
|
||||||
Sam Gladstone, Amir Gonnen, Chitlesh Goorah, Neil Hamilton, Thomas Hawkins,
|
|
||||||
David Hewson, Jae Hossell, Ben Jackson, Iztok Jeras, Christophe Joly, Mike
|
|
||||||
Kagen, Guy-Armand Kamendje, Vasu Kandadi, Patricio Kaplan, Ralf Karge, Dan
|
|
||||||
Katz, Sol Katzman, Jonathan Kimmitt, Gernot Koch, Soon Koh, Steve Kolecki,
|
|
||||||
David Kravitz, Steve Lang, Stephane Laurent, Walter Lavino, Christian
|
|
||||||
Leber, John Li, Charlie Lind, Andrew Ling, Paul Liu, Dan Lussier, Fred Ma,
|
|
||||||
Duraid Madina, Mark Marshall, Jason McMullan, Wim Michiels, Dennis
|
|
||||||
Muhlestein, John Murphy, Richard Myers, Dimitris Nalbantis, Paul Nitza,
|
|
||||||
Pete Nixon, Lisa Noack, Mark Nodine, Andreas Olofsson, Brad Parker, Dominic
|
|
||||||
Plunkett, Niranjan Prabhu, Usha Priyadharshini, Alberto Del Rio, Oleg
|
|
||||||
Rodionov, John Sanguinetti, Salman Sheikh, Mike Shinkarovsky, Rafael
|
|
||||||
Shirakawa, Jeffrey Short, Rodney Sinclair, Brian Small, Alex Solomatnikov,
|
|
||||||
Art Stamness, John Stroebel, Emerson Suguimoto, Gene Sullivan, Renga
|
|
||||||
Sundararajan, Stefan Thiede, Gary Thomas, Steve Tong, Hans Van Antwerpen,
|
|
||||||
Holger Waechtler, Stefan Wallentowitz, Shawn Wang, Greg Waters, Thomas
|
|
||||||
Watts, Eugene Weber, David Welch, Leon Wildman, Gerald Williams, Trevor
|
|
||||||
Williams, Jeff Winston, Joshua Wise, Johan Wouters, and Ding Xiaoliang.
|
|
||||||
|
|
||||||
Thanks to them, and all those we've missed including above.
|
|
||||||
|
|
||||||
=head1 DISTRIBUTION
|
|
||||||
|
|
||||||
The latest version is available from L<http://www.veripool.org/>.
|
|
||||||
|
|
||||||
Copyright 2003-2014 by Wilson Snyder. Verilator is free software; you can
|
|
||||||
redistribute it and/or modify the Verilator internals under the terms of
|
|
||||||
either the GNU Lesser General Public License Version 3 or the Perl Artistic
|
|
||||||
License Version 2.0.
|
|
||||||
|
|
||||||
=head1 AUTHORS
|
=head1 AUTHORS
|
||||||
|
|
||||||
When possible, please instead report bugs to L<http://www.veripool.org/>.
|
When possible, please instead report bugs to L<http://www.veripool.org/>.
|
||||||
|
|
||||||
Wilson Snyder <[email protected]>
|
Wilson Snyder <[email protected]>
|
||||||
|
|
||||||
Major concepts by Paul Wasson and Duane Galbi.
|
Major concepts by Paul Wasson, Duane Galbi and Jie Xu.
|
||||||
|
|
||||||
|
|
||||||
|
=head1 CONTRIBUTORS
|
||||||
|
|
||||||
|
Many people have provided ideas and other assistance with Verilator.
|
||||||
|
|
||||||
|
The major corporate sponsors of Verilator, by providing significant
|
||||||
|
contributions of time or funds include include Atmel Corporation, Cavium
|
||||||
|
Inc., Compaq Corporation, Digital Equipment Corporation, Embecosm Ltd.,
|
||||||
|
Hicamp Systems, Intel Corporation, Mindspeed Technologies Inc., MicroTune
|
||||||
|
Inc., picoChip Designs Ltd., Sun Microsystems Inc., Nauticus Networks Inc.,
|
||||||
|
and SiCortex Inc.
|
||||||
|
|
||||||
|
The people who have contributed major functionality are Byron Bradley,
|
||||||
|
Jeremy Bennett, Jie Xu, Lane Brooks, Duane Galbi, Paul Wasson, and Wilson
|
||||||
|
Snyder. Major testers include Jeff Dutton, Jonathon Donaldson, Ralf Karge,
|
||||||
|
David Hewson, Iztok Jeras, Wim Michiels, Alex Solomatnikov, Sebastien Van
|
||||||
|
Cauwenberghe, Gene Weber, and Clifford Wolf.
|
||||||
|
|
||||||
|
Some of the people who have provided ideas and feedback for Verilator
|
||||||
|
include: Yves Mathieu, David Addison, Nikana Anastasiadis, Hans Van
|
||||||
|
Antwerpen, Vasu Arasanipalai, Jens Arm, Sharad Bagri, Andrew Bardsley,
|
||||||
|
Geoff Barrett, J Baxter, Julius Baxter, Jeremy Bennett, Michael Berman,
|
||||||
|
David Binderman, David Black, Daniel Bone, Gregg Bouchard, Christopher
|
||||||
|
Boumenot, Nick Bowler, Byron Bradley, Bryan Brady, Charlie Brej, Lane
|
||||||
|
Brooks, John Brownlee, Jeff Bush, Lawrence Butcher, Ted Campbell, Chris
|
||||||
|
Candler, Lauren Carlson, Donal Casey, Terry Chen, Robert A. Clark, Allan
|
||||||
|
Cochrane, Gunter Dannoritzer, Ashutosh Das, Bernard Deadman, Mike Denio,
|
||||||
|
John Deroo, Philip Derrick, John Dickol, R. Diez, Ruben Diez, Danny Ding,
|
||||||
|
Ivan Djordjevic, Jonathon Donaldson, Alex Duller, Jeff Dutton, Chandan
|
||||||
|
Egbert, Joe Eiler, Ahmed El-Mahmoudy, Robert Farrell, Eugen Fekete,
|
||||||
|
Fabrizio Ferrandi, Andrea Foletto, Bob Fredieu, Christian Gelinek, Glen
|
||||||
|
Gibb, Shankar Giri, Sam Gladstone, Amir Gonnen, Chitlesh Goorah, Neil
|
||||||
|
Hamilton, Junji Hashimoto, Thomas Hawkins, David Hewson, Hiroki Honda, Alex
|
||||||
|
Hornung, Jae Hossell, Ben Jackson, Krzysztof Jankowski, HyungKi Jeong,
|
||||||
|
Iztok Jeras, James Johnson, Christophe Joly, Franck Jullien, Mike Kagen,
|
||||||
|
Kaalia Kahn, Guy-Armand Kamendje, Vasu Kandadi, Patricio Kaplan, Ralf
|
||||||
|
Karge, Dan Katz, Sol Katzman, Jonathan Kimmitt, Sobhan Klnv, Gernot Koch,
|
||||||
|
Soon Koh, Steve Kolecki, Brett Koonce, Wojciech Koszek, Varun Koyyalagunta,
|
||||||
|
David Kravitz, Roland Kruse, Ed Lander, Steve Lang, Stephane Laurent,
|
||||||
|
Walter Lavino, Christian Leber, Igor Lesik, John Li, Eivind Liland, Charlie
|
||||||
|
Lind, Andrew Ling, Paul Liu, Derek Lockhart, Arthur Low, Stefan Ludwig, Dan
|
||||||
|
Lussier, Fred Ma, Duraid Madina, Mark Marshall, Jason McMullan, Wim
|
||||||
|
Michiels, Wai Sum Mong, Sean Moore, Dennis Muhlestein, John Murphy, Richard
|
||||||
|
Myers, Dimitris Nalbantis, Bob Newgard, Cong Van Nguyen, Paul Nitza, Pete
|
||||||
|
Nixon, Lisa Noack, Mark Nodine, Andreas Olofsson, Brad Parker, David
|
||||||
|
Pierce, Dominic Plunkett, David Poole, Rich Porter, Niranjan Prabhu, Usha
|
||||||
|
Priyadharshini, Mark Jackson Pulver, Prateek Puri, Chris Randall, Frederic
|
||||||
|
Requin, Alberto Del Rio, Oleg Rodionov, Jan Egil Ruud, John Sanguinetti,
|
||||||
|
Salman Sheikh, Mike Shinkarovsky, Rafael Shirakawa, Jeffrey Short, Rodney
|
||||||
|
Sinclair, Steven Slatter, Brian Small, Wilson Snyder, Alex Solomatnikov,
|
||||||
|
Art Stamness, John Stevenson, Todd Strader, John Stroebel, Emerson
|
||||||
|
Suguimoto, Gene Sullivan, Renga Sundararajan, Yutetsu Takatsukasa, Peter
|
||||||
|
Tengstrand, Stefan Thiede, Gary Thomas, Kevin Thompson, Mike Thyer, Steve
|
||||||
|
Tong, Holger Waechtler, Stefan Wallentowitz, Shawn Wang, Greg Waters,
|
||||||
|
Thomas Watts, Eugene Weber, David Welch, Leon Wildman, Gerald Williams,
|
||||||
|
Trevor Williams, Jeff Winston, Joshua Wise, Clifford Wolf, Johan Wouters,
|
||||||
|
Ding Xiaoliang, Jie Xu, and Amir Yazdanbakhsh.
|
||||||
|
|
||||||
|
Thanks to them, and all those we've missed including above.
|
||||||
|
|
||||||
|
|
||||||
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
|
The latest version is available from L<http://www.veripool.org/>.
|
||||||
|
|
||||||
|
Copyright 2003-2015 by Wilson Snyder. Verilator is free software; you can
|
||||||
|
redistribute it and/or modify the Verilator internals under the terms of
|
||||||
|
either the GNU Lesser General Public License Version 3 or the Perl Artistic
|
||||||
|
License Version 2.0.
|
||||||
|
|
||||||
|
|
||||||
=head1 SEE ALSO
|
=head1 SEE ALSO
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ eval 'exec perl -wS $0 ${1+"$@"}'
|
|||||||
if 0;
|
if 0;
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2003-2014 by Wilson Snyder. This program is free software; you
|
# Copyright 2003-2015 by Wilson Snyder. This program 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
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
@@ -271,7 +271,7 @@ Specifies a module search directory.
|
|||||||
|
|
||||||
The latest version is available from L<http://www.veripool.org/>.
|
The latest version is available from L<http://www.veripool.org/>.
|
||||||
|
|
||||||
Copyright 2003-2014 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2003-2015 by Wilson Snyder. Verilator is free software; you can
|
||||||
redistribute it and/or modify the Verilator internals under the terms of
|
redistribute it and/or modify the Verilator internals under the terms of
|
||||||
either the GNU Lesser General Public License Version 3 or the Perl Artistic
|
either the GNU Lesser General Public License Version 3 or the Perl Artistic
|
||||||
License Version 2.0.
|
License Version 2.0.
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ Do not show differences in line numbering.
|
|||||||
|
|
||||||
The latest version is available from L<http://www.veripool.org/verilator>.
|
The latest version is available from L<http://www.veripool.org/verilator>.
|
||||||
|
|
||||||
Copyright 2005-2014 by Wilson Snyder. This package is free software; you can
|
Copyright 2005-2015 by Wilson Snyder. This package 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
|
||||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ eval 'exec perl -wS $0 ${1+"$@"}'
|
|||||||
if 0;
|
if 0;
|
||||||
# DESCRIPTION: Print include statements for each ARGV
|
# DESCRIPTION: Print include statements for each ARGV
|
||||||
#
|
#
|
||||||
# Copyright 2003-2014 by Wilson Snyder. This package is free software; you can
|
# Copyright 2003-2015 by Wilson Snyder. This package 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
|
||||||
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ Displays this message and program version and exits.
|
|||||||
|
|
||||||
The latest version is available from L<http://www.veripool.org/>.
|
The latest version is available from L<http://www.veripool.org/>.
|
||||||
|
|
||||||
Copyright 2007-2014 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2007-2015 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
|
||||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
|
|
||||||
|
|||||||
+38
-15
@@ -1,14 +1,16 @@
|
|||||||
# DESCRIPTION: Process this file with autoconf to produce a configure script.
|
# DESCRIPTION: Process this file with autoconf to produce a configure script.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2014 by Wilson Snyder. Verilator is free software; you can
|
# Copyright 2003-2015 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
|
||||||
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
|
|
||||||
#AC_INIT([Verilator],[#.### YYYY-MM-DD])
|
#AC_INIT([Verilator],[#.### YYYY-MM-DD])
|
||||||
#AC_INIT([Verilator],[#.### devel])
|
#AC_INIT([Verilator],[#.### devel])
|
||||||
AC_INIT([Verilator],[3.867 devel])
|
AC_INIT([Verilator],[3.876 2015-08-12])
|
||||||
|
# When releasing, also update header of Changes file
|
||||||
|
|
||||||
AC_CONFIG_HEADER(src/config_build.h)
|
AC_CONFIG_HEADER(src/config_build.h)
|
||||||
AC_CONFIG_FILES(Makefile src/Makefile src/Makefile_obj include/verilated.mk include/verilated_config.h)
|
AC_CONFIG_FILES(Makefile src/Makefile src/Makefile_obj include/verilated.mk include/verilated_config.h verilator.pc)
|
||||||
|
|
||||||
AC_MSG_RESULT([configuring for $PACKAGE_STRING])
|
AC_MSG_RESULT([configuring for $PACKAGE_STRING])
|
||||||
|
|
||||||
@@ -107,32 +109,51 @@ AC_DEFUN([_MY_CXX_CHECK_OPT],
|
|||||||
[# _MY_CXX_CHECK_OPT(flag) -- Check if compiler supports specific options
|
[# _MY_CXX_CHECK_OPT(flag) -- Check if compiler supports specific options
|
||||||
ACO_SAVE_CXXFLAGS="$CXXFLAGS"
|
ACO_SAVE_CXXFLAGS="$CXXFLAGS"
|
||||||
# -Werror needed otherwise unknown -Wno-div-by-zero won't report problems
|
# -Werror needed otherwise unknown -Wno-div-by-zero won't report problems
|
||||||
CXXFLAGS="$CXXFLAGS $1 -Werror"
|
CXXFLAGS="$CXXFLAGS $2 -Werror"
|
||||||
AC_MSG_CHECKING([whether $CXX accepts $1])
|
AC_MSG_CHECKING([whether $CXX accepts $2])
|
||||||
AC_COMPILE_IFELSE(
|
AC_COMPILE_IFELSE(
|
||||||
[AC_LANG_PROGRAM([],[])],
|
[AC_LANG_PROGRAM([],[])],
|
||||||
[_my_result=yes],
|
[_my_result=yes
|
||||||
|
if test -s conftest.err; then
|
||||||
|
if grep -e "$2" conftest.err >/dev/null; then
|
||||||
|
_my_result=no
|
||||||
|
fi
|
||||||
|
fi],
|
||||||
[_my_result=no])
|
[_my_result=no])
|
||||||
AC_MSG_RESULT($_my_result)
|
AC_MSG_RESULT($_my_result)
|
||||||
if test "$_my_result" = "yes" ; then
|
if test "$_my_result" = "yes" ; then
|
||||||
CFG_CXXFLAGS_NO_UNUSED="$CFG_CXXFLAGS_NO_UNUSED $1"
|
$1="$$1 $2"
|
||||||
fi
|
fi
|
||||||
CXXFLAGS="$ACO_SAVE_CXXFLAGS"
|
CXXFLAGS="$ACO_SAVE_CXXFLAGS"
|
||||||
])# _MY_CXX_CHECK_OPT
|
])# _MY_CXX_CHECK_OPT
|
||||||
|
|
||||||
|
# Flags for compiling Verilator internals including parser
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-unused-parameter)
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-char-subscripts)
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Qunused-arguments)
|
||||||
|
AC_SUBST(CFG_CXXFLAGS_SRC)
|
||||||
|
|
||||||
|
# Flags for compiling Verilator parser
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_PARSER,-Wno-unused)
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_PARSER,-Wno-parentheses-equality)
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_PARSER,-Wno-null-conversion)
|
||||||
|
AC_SUBST(CFG_CXXFLAGS_PARSER)
|
||||||
|
|
||||||
|
# Flags for Verilated makefile
|
||||||
# For example, -Wno-div-by-zero isn't in 4.1.2
|
# For example, -Wno-div-by-zero isn't in 4.1.2
|
||||||
_MY_CXX_CHECK_OPT(-Wno-char-subscripts)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-Wno-char-subscripts)
|
||||||
_MY_CXX_CHECK_OPT(-Wno-parentheses-equality)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-Wno-parentheses-equality)
|
||||||
# Random code often does / 0. Unfortunately VL_DIV_I(0,0) will warn
|
# Random code often does / 0. Unfortunately VL_DIV_I(0,0) will warn
|
||||||
# without this flag, even though there's a conditional to prevent the divide.
|
# without this flag, even though there's a conditional to prevent the divide.
|
||||||
# We still don't add no-div-by-zero as it throws message to stdout, though doesn't die.
|
# We still don't add no-div-by-zero as it throws message to stdout, though doesn't die.
|
||||||
#_MY_CXX_CHECK_OPT(-Wno-div-by-zero)
|
#_MY_CXX_CHECK_OPT(-Wno-div-by-zero)
|
||||||
_MY_CXX_CHECK_OPT(-Wno-sign-compare)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-Wno-sign-compare)
|
||||||
_MY_CXX_CHECK_OPT(-Wno-uninitialized)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-Wno-uninitialized)
|
||||||
_MY_CXX_CHECK_OPT(-Wno-unused-but-set-variable)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-Wno-unused-but-set-variable)
|
||||||
_MY_CXX_CHECK_OPT(-Wno-unused-parameter)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-Wno-unused-parameter)
|
||||||
_MY_CXX_CHECK_OPT(-Wno-unused-variable)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-Wno-unused-variable)
|
||||||
_MY_CXX_CHECK_OPT(-fbracket-depth=4096)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-fbracket-depth=4096)
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-Qunused-arguments)
|
||||||
AC_SUBST(CFG_CXXFLAGS_NO_UNUSED)
|
AC_SUBST(CFG_CXXFLAGS_NO_UNUSED)
|
||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
@@ -142,6 +163,8 @@ AC_SUBST(CFG_CXXFLAGS_NO_UNUSED)
|
|||||||
# Other install directories
|
# Other install directories
|
||||||
pkgdatadir=${datadir}/verilator
|
pkgdatadir=${datadir}/verilator
|
||||||
AC_SUBST(pkgdatadir)
|
AC_SUBST(pkgdatadir)
|
||||||
|
pkgconfigdir=${datadir}/pkgconfig
|
||||||
|
AC_SUBST(pkgconfigdir)
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
|
|||||||
+50
-34
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License.
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -476,7 +476,7 @@ static inline void _vl_vsss_advance(FILE* fp, int& floc) {
|
|||||||
if (fp) fgetc(fp);
|
if (fp) fgetc(fp);
|
||||||
else floc -= 8;
|
else floc -= 8;
|
||||||
}
|
}
|
||||||
static inline int _vl_vsss_peek(FILE* fp, int& floc, WDataInP fromp) {
|
static inline int _vl_vsss_peek(FILE* fp, int& floc, WDataInP fromp, const string& fstr) {
|
||||||
// Get a character without advancing
|
// Get a character without advancing
|
||||||
if (fp) {
|
if (fp) {
|
||||||
int data = fgetc(fp);
|
int data = fgetc(fp);
|
||||||
@@ -486,23 +486,26 @@ static inline int _vl_vsss_peek(FILE* fp, int& floc, WDataInP fromp) {
|
|||||||
} else {
|
} else {
|
||||||
if (floc < 0) return EOF;
|
if (floc < 0) return EOF;
|
||||||
floc = floc & ~7; // Align to closest character
|
floc = floc & ~7; // Align to closest character
|
||||||
int data = (fromp[VL_BITWORD_I(floc)] >> VL_BITBIT_I(floc)) & 0xff;
|
if (fromp == NULL) {
|
||||||
return data;
|
return fstr[fstr.length()-1 - (floc>>3)];
|
||||||
|
} else {
|
||||||
|
return (fromp[VL_BITWORD_I(floc)] >> VL_BITBIT_I(floc)) & 0xff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static inline void _vl_vsss_skipspace(FILE* fp, int& floc, WDataInP fromp) {
|
static inline void _vl_vsss_skipspace(FILE* fp, int& floc, WDataInP fromp, const string& fstr) {
|
||||||
while (1) {
|
while (1) {
|
||||||
int c = _vl_vsss_peek(fp, floc, fromp);
|
int c = _vl_vsss_peek(fp, floc, fromp, fstr);
|
||||||
if (c==EOF || !isspace(c)) return;
|
if (c==EOF || !isspace(c)) return;
|
||||||
_vl_vsss_advance(fp, floc);
|
_vl_vsss_advance(fp, floc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static inline void _vl_vsss_read(FILE* fp, int& floc, WDataInP fromp,
|
static inline void _vl_vsss_read(FILE* fp, int& floc, WDataInP fromp, const string& fstr,
|
||||||
char* tmpp, const char* acceptp) {
|
char* tmpp, const char* acceptp) {
|
||||||
// Read into tmp, consisting of characters from acceptp list
|
// Read into tmp, consisting of characters from acceptp list
|
||||||
char* cp = tmpp;
|
char* cp = tmpp;
|
||||||
while (1) {
|
while (1) {
|
||||||
int c = _vl_vsss_peek(fp, floc, fromp);
|
int c = _vl_vsss_peek(fp, floc, fromp, fstr);
|
||||||
if (c==EOF || isspace(c)) break;
|
if (c==EOF || isspace(c)) break;
|
||||||
if (acceptp!=NULL // String - allow anything
|
if (acceptp!=NULL // String - allow anything
|
||||||
&& NULL==strchr(acceptp, c)) break;
|
&& NULL==strchr(acceptp, c)) break;
|
||||||
@@ -547,6 +550,7 @@ static inline void _vl_vsss_based(WDataOutP owp, int obits, int baseLog2, const
|
|||||||
|
|
||||||
IData _vl_vsscanf(FILE* fp, // If a fscanf
|
IData _vl_vsscanf(FILE* fp, // If a fscanf
|
||||||
int fbits, WDataInP fromp, // Else if a sscanf
|
int fbits, WDataInP fromp, // Else if a sscanf
|
||||||
|
const string& fstr, // if a sscanf to string
|
||||||
const char* formatp, va_list ap) {
|
const char* formatp, va_list ap) {
|
||||||
// Read a Verilog $sscanf/$fscanf style format into the output list
|
// Read a Verilog $sscanf/$fscanf style format into the output list
|
||||||
// The format must be pre-processed (and lower cased) by Verilator
|
// The format must be pre-processed (and lower cased) by Verilator
|
||||||
@@ -557,15 +561,15 @@ IData _vl_vsscanf(FILE* fp, // If a fscanf
|
|||||||
bool inPct = false;
|
bool inPct = false;
|
||||||
const char* pos = formatp;
|
const char* pos = formatp;
|
||||||
for (; *pos && !_vl_vsss_eof(fp,floc); ++pos) {
|
for (; *pos && !_vl_vsss_eof(fp,floc); ++pos) {
|
||||||
//VL_PRINTF("_vlscan fmt='%c' floc=%d file='%c'\n", pos[0], floc, _vl_vsss_peek(fp,floc,fromp));
|
//VL_PRINTF("_vlscan fmt='%c' floc=%d file='%c'\n", pos[0], floc, _vl_vsss_peek(fp,floc,fromp,fstr));
|
||||||
if (!inPct && pos[0]=='%') {
|
if (!inPct && pos[0]=='%') {
|
||||||
inPct = true;
|
inPct = true;
|
||||||
} else if (!inPct && isspace(pos[0])) { // Format spaces
|
} else if (!inPct && isspace(pos[0])) { // Format spaces
|
||||||
while (isspace(pos[1])) pos++;
|
while (isspace(pos[1])) pos++;
|
||||||
_vl_vsss_skipspace(fp,floc,fromp);
|
_vl_vsss_skipspace(fp,floc,fromp,fstr);
|
||||||
} else if (!inPct) { // Expected Format
|
} else if (!inPct) { // Expected Format
|
||||||
_vl_vsss_skipspace(fp,floc,fromp);
|
_vl_vsss_skipspace(fp,floc,fromp,fstr);
|
||||||
int c = _vl_vsss_peek(fp,floc,fromp);
|
int c = _vl_vsss_peek(fp,floc,fromp,fstr);
|
||||||
if (c != pos[0]) goto done;
|
if (c != pos[0]) goto done;
|
||||||
else _vl_vsss_advance(fp,floc);
|
else _vl_vsss_advance(fp,floc);
|
||||||
} else { // Format character
|
} else { // Format character
|
||||||
@@ -574,7 +578,7 @@ IData _vl_vsscanf(FILE* fp, // If a fscanf
|
|||||||
char fmt = pos[0];
|
char fmt = pos[0];
|
||||||
switch (fmt) {
|
switch (fmt) {
|
||||||
case '%': {
|
case '%': {
|
||||||
int c = _vl_vsss_peek(fp,floc,fromp);
|
int c = _vl_vsss_peek(fp,floc,fromp,fstr);
|
||||||
if (c != '%') goto done;
|
if (c != '%') goto done;
|
||||||
else _vl_vsss_advance(fp,floc);
|
else _vl_vsss_advance(fp,floc);
|
||||||
break;
|
break;
|
||||||
@@ -591,15 +595,15 @@ IData _vl_vsscanf(FILE* fp, // If a fscanf
|
|||||||
for (int i=0; i<VL_WORDS_I(obits); i++) owp[i] = 0;
|
for (int i=0; i<VL_WORDS_I(obits); i++) owp[i] = 0;
|
||||||
switch (fmt) {
|
switch (fmt) {
|
||||||
case 'c': {
|
case 'c': {
|
||||||
int c = _vl_vsss_peek(fp,floc,fromp);
|
int c = _vl_vsss_peek(fp,floc,fromp,fstr);
|
||||||
if (c==EOF) goto done;
|
if (c==EOF) goto done;
|
||||||
else _vl_vsss_advance(fp,floc);
|
else _vl_vsss_advance(fp,floc);
|
||||||
owp[0] = c;
|
owp[0] = c;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 's': {
|
case 's': {
|
||||||
_vl_vsss_skipspace(fp,floc,fromp);
|
_vl_vsss_skipspace(fp,floc,fromp,fstr);
|
||||||
_vl_vsss_read(fp,floc,fromp, tmp, NULL);
|
_vl_vsss_read(fp,floc,fromp,fstr, tmp, NULL);
|
||||||
if (!tmp[0]) goto done;
|
if (!tmp[0]) goto done;
|
||||||
int pos = ((int)strlen(tmp))-1;
|
int pos = ((int)strlen(tmp))-1;
|
||||||
int lsb = 0;
|
int lsb = 0;
|
||||||
@@ -609,8 +613,8 @@ IData _vl_vsscanf(FILE* fp, // If a fscanf
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'd': { // Signed decimal
|
case 'd': { // Signed decimal
|
||||||
_vl_vsss_skipspace(fp,floc,fromp);
|
_vl_vsss_skipspace(fp,floc,fromp,fstr);
|
||||||
_vl_vsss_read(fp,floc,fromp, tmp, "0123456789+-xXzZ?_");
|
_vl_vsss_read(fp,floc,fromp,fstr, tmp, "0123456789+-xXzZ?_");
|
||||||
if (!tmp[0]) goto done;
|
if (!tmp[0]) goto done;
|
||||||
vlsint64_t ld;
|
vlsint64_t ld;
|
||||||
sscanf(tmp,"%30" VL_PRI64 "d",&ld);
|
sscanf(tmp,"%30" VL_PRI64 "d",&ld);
|
||||||
@@ -620,8 +624,8 @@ IData _vl_vsscanf(FILE* fp, // If a fscanf
|
|||||||
case 'f':
|
case 'f':
|
||||||
case 'e':
|
case 'e':
|
||||||
case 'g': { // Real number
|
case 'g': { // Real number
|
||||||
_vl_vsss_skipspace(fp,floc,fromp);
|
_vl_vsss_skipspace(fp,floc,fromp,fstr);
|
||||||
_vl_vsss_read(fp,floc,fromp, tmp, "+-.0123456789eE");
|
_vl_vsss_read(fp,floc,fromp,fstr, tmp, "+-.0123456789eE");
|
||||||
if (!tmp[0]) goto done;
|
if (!tmp[0]) goto done;
|
||||||
union { double r; vlsint64_t ld; } u;
|
union { double r; vlsint64_t ld; } u;
|
||||||
u.r = strtod(tmp, NULL);
|
u.r = strtod(tmp, NULL);
|
||||||
@@ -630,8 +634,8 @@ IData _vl_vsscanf(FILE* fp, // If a fscanf
|
|||||||
}
|
}
|
||||||
case 't': // FALLTHRU // Time
|
case 't': // FALLTHRU // Time
|
||||||
case 'u': { // Unsigned decimal
|
case 'u': { // Unsigned decimal
|
||||||
_vl_vsss_skipspace(fp,floc,fromp);
|
_vl_vsss_skipspace(fp,floc,fromp,fstr);
|
||||||
_vl_vsss_read(fp,floc,fromp, tmp, "0123456789+-xXzZ?_");
|
_vl_vsss_read(fp,floc,fromp,fstr, tmp, "0123456789+-xXzZ?_");
|
||||||
if (!tmp[0]) goto done;
|
if (!tmp[0]) goto done;
|
||||||
QData ld;
|
QData ld;
|
||||||
sscanf(tmp,"%30" VL_PRI64 "u",&ld);
|
sscanf(tmp,"%30" VL_PRI64 "u",&ld);
|
||||||
@@ -639,22 +643,22 @@ IData _vl_vsscanf(FILE* fp, // If a fscanf
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'b': {
|
case 'b': {
|
||||||
_vl_vsss_skipspace(fp,floc,fromp);
|
_vl_vsss_skipspace(fp,floc,fromp,fstr);
|
||||||
_vl_vsss_read(fp,floc,fromp, tmp, "01xXzZ?_");
|
_vl_vsss_read(fp,floc,fromp,fstr, tmp, "01xXzZ?_");
|
||||||
if (!tmp[0]) goto done;
|
if (!tmp[0]) goto done;
|
||||||
_vl_vsss_based(owp,obits, 1, tmp, 0, (int)strlen(tmp));
|
_vl_vsss_based(owp,obits, 1, tmp, 0, (int)strlen(tmp));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'o': {
|
case 'o': {
|
||||||
_vl_vsss_skipspace(fp,floc,fromp);
|
_vl_vsss_skipspace(fp,floc,fromp,fstr);
|
||||||
_vl_vsss_read(fp,floc,fromp, tmp, "01234567xXzZ?_");
|
_vl_vsss_read(fp,floc,fromp,fstr, tmp, "01234567xXzZ?_");
|
||||||
if (!tmp[0]) goto done;
|
if (!tmp[0]) goto done;
|
||||||
_vl_vsss_based(owp,obits, 3, tmp, 0, (int)strlen(tmp));
|
_vl_vsss_based(owp,obits, 3, tmp, 0, (int)strlen(tmp));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'x': {
|
case 'x': {
|
||||||
_vl_vsss_skipspace(fp,floc,fromp);
|
_vl_vsss_skipspace(fp,floc,fromp,fstr);
|
||||||
_vl_vsss_read(fp,floc,fromp, tmp, "0123456789abcdefABCDEFxXzZ?_");
|
_vl_vsss_read(fp,floc,fromp,fstr, tmp, "0123456789abcdefABCDEFxXzZ?_");
|
||||||
if (!tmp[0]) goto done;
|
if (!tmp[0]) goto done;
|
||||||
_vl_vsss_based(owp,obits, 4, tmp, 0, (int)strlen(tmp));
|
_vl_vsss_based(owp,obits, 4, tmp, 0, (int)strlen(tmp));
|
||||||
break;
|
break;
|
||||||
@@ -704,8 +708,8 @@ void _VL_VINT_TO_STRING(int obits, char* destoutp, WDataInP sourcep) {
|
|||||||
start = false; // Drop leading 0s
|
start = false; // Drop leading 0s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*destp++ = '\0'; // Terminate
|
*destp = '\0'; // Terminate
|
||||||
while (isspace(*(destp-1)) && destp>destoutp) *--destp = '\0'; // Drop trailing spaces
|
if (!start) while (isspace(*(destp-1)) && destp>destoutp) *--destp = '\0'; // Drop trailing spaces
|
||||||
}
|
}
|
||||||
|
|
||||||
void _VL_STRING_TO_VINT(int obits, void* destp, int srclen, const char* srcp) {
|
void _VL_STRING_TO_VINT(int obits, void* destp, int srclen, const char* srcp) {
|
||||||
@@ -746,6 +750,11 @@ IData VL_FGETS_IXI(int obits, void* destp, IData fpi) {
|
|||||||
return got;
|
return got;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IData VL_FOPEN_NI(const string& filename, IData mode) {
|
||||||
|
char modez[5];
|
||||||
|
_VL_VINT_TO_STRING(VL_WORDSIZE, modez, &mode);
|
||||||
|
return VL_FOPEN_S(filename.c_str(), modez);
|
||||||
|
}
|
||||||
IData VL_FOPEN_QI(QData filename, IData mode) {
|
IData VL_FOPEN_QI(QData filename, IData mode) {
|
||||||
IData fnw[2]; VL_SET_WQ(fnw, filename);
|
IData fnw[2]; VL_SET_WQ(fnw, filename);
|
||||||
return VL_FOPEN_WI(2, fnw, mode);
|
return VL_FOPEN_WI(2, fnw, mode);
|
||||||
@@ -875,7 +884,7 @@ IData VL_FSCANF_IX(IData fpi, const char* formatp, ...) {
|
|||||||
|
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap,formatp);
|
va_start(ap,formatp);
|
||||||
IData got = _vl_vsscanf(fp, 0, NULL, formatp, ap);
|
IData got = _vl_vsscanf(fp, 0, NULL, "", formatp, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return got;
|
return got;
|
||||||
}
|
}
|
||||||
@@ -885,7 +894,7 @@ IData VL_SSCANF_IIX(int lbits, IData ld, const char* formatp, ...) {
|
|||||||
|
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap,formatp);
|
va_start(ap,formatp);
|
||||||
IData got = _vl_vsscanf(NULL, lbits, fnw, formatp, ap);
|
IData got = _vl_vsscanf(NULL, lbits, fnw, "", formatp, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return got;
|
return got;
|
||||||
}
|
}
|
||||||
@@ -894,14 +903,21 @@ IData VL_SSCANF_IQX(int lbits, QData ld, const char* formatp, ...) {
|
|||||||
|
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap,formatp);
|
va_start(ap,formatp);
|
||||||
IData got = _vl_vsscanf(NULL, lbits, fnw, formatp, ap);
|
IData got = _vl_vsscanf(NULL, lbits, fnw, "", formatp, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return got;
|
return got;
|
||||||
}
|
}
|
||||||
IData VL_SSCANF_IWX(int lbits, WDataInP lwp, const char* formatp, ...) {
|
IData VL_SSCANF_IWX(int lbits, WDataInP lwp, const char* formatp, ...) {
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap,formatp);
|
va_start(ap,formatp);
|
||||||
IData got = _vl_vsscanf(NULL, lbits, lwp, formatp, ap);
|
IData got = _vl_vsscanf(NULL, lbits, lwp, "", formatp, ap);
|
||||||
|
va_end(ap);
|
||||||
|
return got;
|
||||||
|
}
|
||||||
|
IData VL_SSCANF_INX(int, const string& ld, const char* formatp, ...) {
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap,formatp);
|
||||||
|
IData got = _vl_vsscanf(NULL, ld.length()*8, NULL, ld, formatp, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return got;
|
return got;
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-4
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License.
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -357,6 +357,7 @@ extern IData VL_FOPEN_WI(int fnwords, WDataInP ofilename, IData mode);
|
|||||||
extern IData VL_FOPEN_QI(QData ofilename, IData mode);
|
extern IData VL_FOPEN_QI(QData ofilename, IData mode);
|
||||||
inline IData VL_FOPEN_II(IData ofilename, IData mode) { return VL_FOPEN_QI(ofilename,mode); }
|
inline IData VL_FOPEN_II(IData ofilename, IData mode) { return VL_FOPEN_QI(ofilename,mode); }
|
||||||
|
|
||||||
|
|
||||||
extern void VL_FCLOSE_I(IData fdi);
|
extern void VL_FCLOSE_I(IData fdi);
|
||||||
|
|
||||||
extern void VL_READMEM_W(bool hex, int width, int depth, int array_lsb, int fnwords,
|
extern void VL_READMEM_W(bool hex, int width, int depth, int array_lsb, int fnwords,
|
||||||
@@ -594,13 +595,13 @@ static inline void VL_ASSIGNBIT_WO(int, int bit, WDataOutP owp, IData) {
|
|||||||
|
|
||||||
#define VL_ASSIGN_SWI(obits,svar,rd) { \
|
#define VL_ASSIGN_SWI(obits,svar,rd) { \
|
||||||
sc_bv<obits> _bvtemp; \
|
sc_bv<obits> _bvtemp; \
|
||||||
_bvtemp.set_word(0,rd); \
|
_bvtemp.set_word(0,(rd)); \
|
||||||
svar.write(_bvtemp); \
|
svar.write(_bvtemp); \
|
||||||
}
|
}
|
||||||
#define VL_ASSIGN_SWQ(obits,svar,rd) { \
|
#define VL_ASSIGN_SWQ(obits,svar,rd) { \
|
||||||
sc_bv<obits> _bvtemp; \
|
sc_bv<obits> _bvtemp; \
|
||||||
_bvtemp.set_word(0,rd); \
|
_bvtemp.set_word(0,(IData)(rd)); \
|
||||||
_bvtemp.set_word(1,rd>>VL_WORDSIZE); \
|
_bvtemp.set_word(1,(IData)((rd)>>VL_WORDSIZE)); \
|
||||||
svar.write(_bvtemp); \
|
svar.write(_bvtemp); \
|
||||||
}
|
}
|
||||||
#define VL_ASSIGN_SWW(obits,svar,rwp) { \
|
#define VL_ASSIGN_SWW(obits,svar,rwp) { \
|
||||||
@@ -1132,7 +1133,9 @@ static inline WDataOutP VL_DIVS_WWW(int lbits, WDataOutP owp,WDataInP lwp,WDataI
|
|||||||
int words = VL_WORDS_I(lbits);
|
int words = VL_WORDS_I(lbits);
|
||||||
IData lsign = VL_SIGN_I(lbits,lwp[words-1]);
|
IData lsign = VL_SIGN_I(lbits,lwp[words-1]);
|
||||||
IData rsign = VL_SIGN_I(lbits,rwp[words-1]);
|
IData rsign = VL_SIGN_I(lbits,rwp[words-1]);
|
||||||
|
// cppcheck-suppress variableScope
|
||||||
IData lwstore[VL_MULS_MAX_WORDS]; // Fixed size, as MSVC++ doesn't allow [words] here
|
IData lwstore[VL_MULS_MAX_WORDS]; // Fixed size, as MSVC++ doesn't allow [words] here
|
||||||
|
// cppcheck-suppress variableScope
|
||||||
IData rwstore[VL_MULS_MAX_WORDS];
|
IData rwstore[VL_MULS_MAX_WORDS];
|
||||||
WDataInP ltup = lwp;
|
WDataInP ltup = lwp;
|
||||||
WDataInP rtup = rwp;
|
WDataInP rtup = rwp;
|
||||||
@@ -1151,7 +1154,9 @@ static inline WDataOutP VL_MODDIVS_WWW(int lbits, WDataOutP owp,WDataInP lwp,WDa
|
|||||||
int words = VL_WORDS_I(lbits);
|
int words = VL_WORDS_I(lbits);
|
||||||
IData lsign = VL_SIGN_I(lbits,lwp[words-1]);
|
IData lsign = VL_SIGN_I(lbits,lwp[words-1]);
|
||||||
IData rsign = VL_SIGN_I(lbits,rwp[words-1]);
|
IData rsign = VL_SIGN_I(lbits,rwp[words-1]);
|
||||||
|
// cppcheck-suppress variableScope
|
||||||
IData lwstore[VL_MULS_MAX_WORDS]; // Fixed size, as MSVC++ doesn't allow [words] here
|
IData lwstore[VL_MULS_MAX_WORDS]; // Fixed size, as MSVC++ doesn't allow [words] here
|
||||||
|
// cppcheck-suppress variableScope
|
||||||
IData rwstore[VL_MULS_MAX_WORDS];
|
IData rwstore[VL_MULS_MAX_WORDS];
|
||||||
WDataInP ltup = lwp;
|
WDataInP ltup = lwp;
|
||||||
WDataInP rtup = rwp;
|
WDataInP rtup = rwp;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
######################################################################
|
######################################################################
|
||||||
# DESCRIPTION: Makefile commands for all verilated target files
|
# DESCRIPTION: Makefile commands for all verilated target files
|
||||||
#
|
#
|
||||||
# Copyright 2003-2014 by Wilson Snyder. Verilator is free software; you can
|
# Copyright 2003-2015 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
|
||||||
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
######################################################################
|
######################################################################
|
||||||
@@ -120,10 +120,6 @@ ifeq ($(VM_SP),1)
|
|||||||
$(SP_PREPROC) -M sp_preproc.d --tree $(VM_PREFIX).sp_tree \
|
$(SP_PREPROC) -M sp_preproc.d --tree $(VM_PREFIX).sp_tree \
|
||||||
--preproc $(VK_CLASSES_SP)
|
--preproc $(VK_CLASSES_SP)
|
||||||
else
|
else
|
||||||
ifeq ($(VM_COVERAGE),1)
|
|
||||||
CPPFLAGS += -I$(SYSTEMPERL_INCLUDE)
|
|
||||||
VPATH += $(SYSTEMPERL_INCLUDE)
|
|
||||||
endif
|
|
||||||
preproc:
|
preproc:
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -153,7 +149,7 @@ VK_USER_OBJS = $(addsuffix .o, $(VM_USER_CLASSES))
|
|||||||
|
|
||||||
VK_GLOBAL_OBJS = $(addsuffix .o, $(VM_GLOBAL_FAST) $(VM_GLOBAL_SLOW))
|
VK_GLOBAL_OBJS = $(addsuffix .o, $(VM_GLOBAL_FAST) $(VM_GLOBAL_SLOW))
|
||||||
|
|
||||||
ifneq ($(VM_PARALLEL_BUILDS),0)
|
ifneq ($(VM_PARALLEL_BUILDS),1)
|
||||||
# Fast building, all .cpp's in one fell swoop
|
# Fast building, all .cpp's in one fell swoop
|
||||||
# This saves about 5 sec per module, but can be slower if only a little changes
|
# This saves about 5 sec per module, but can be slower if only a little changes
|
||||||
VK_OBJS += $(VM_PREFIX)__ALLcls.o $(VM_PREFIX)__ALLsup.o
|
VK_OBJS += $(VM_PREFIX)__ALLcls.o $(VM_PREFIX)__ALLsup.o
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License.
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License.
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2014 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2015 by Wilson Snyder. This program is free software;
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// you can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
//
|
//
|
||||||
@@ -17,8 +17,6 @@
|
|||||||
/// \file
|
/// \file
|
||||||
/// \brief Verilator coverage analysis
|
/// \brief Verilator coverage analysis
|
||||||
///
|
///
|
||||||
/// AUTHOR: Wilson Snyder
|
|
||||||
///
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
#include "verilatedos.h"
|
#include "verilatedos.h"
|
||||||
@@ -52,7 +50,10 @@ public: // But only local to this file
|
|||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
// Derived classes should call zero() in their constructor
|
// Derived classes should call zero() in their constructor
|
||||||
VerilatedCovImpItem() {
|
VerilatedCovImpItem() {
|
||||||
for (int i=0; i<MAX_KEYS; i++) m_keys[i]=KEY_UNDEF;
|
for (int i=0; i<MAX_KEYS; i++) {
|
||||||
|
m_keys[i]=KEY_UNDEF;
|
||||||
|
m_vals[i]=0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
virtual ~VerilatedCovImpItem() {}
|
virtual ~VerilatedCovImpItem() {}
|
||||||
virtual vluint64_t count() const = 0;
|
virtual vluint64_t count() const = 0;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2014 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2015 by Wilson Snyder. This program is free software;
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// you can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
//
|
//
|
||||||
@@ -17,8 +17,6 @@
|
|||||||
/// \file
|
/// \file
|
||||||
/// \brief Coverage analysis support
|
/// \brief Coverage analysis support
|
||||||
///
|
///
|
||||||
/// AUTHOR: Wilson Snyder
|
|
||||||
///
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
#ifndef _VERILATED_COV_H_
|
#ifndef _VERILATED_COV_H_
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2014 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2015 by Wilson Snyder. This program is free software;
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// you can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
//
|
//
|
||||||
@@ -17,8 +17,6 @@
|
|||||||
/// \file
|
/// \file
|
||||||
/// \brief Coverage item keys
|
/// \brief Coverage item keys
|
||||||
///
|
///
|
||||||
/// AUTHOR: Wilson Snyder
|
|
||||||
///
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
#ifndef _VERILATED_COV_KEY_H_
|
#ifndef _VERILATED_COV_KEY_H_
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2009-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2009-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License.
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -82,7 +82,7 @@ void svGetPartselLogic(svLogicVecVal* d, const svLogicVecVal* s, int i, int w) {
|
|||||||
void svPutPartselBit(svBitVecVal* d, const svBitVecVal s, int i, int w) {
|
void svPutPartselBit(svBitVecVal* d, const svBitVecVal s, int i, int w) {
|
||||||
_VL_SVDPI_UNIMP();
|
_VL_SVDPI_UNIMP();
|
||||||
}
|
}
|
||||||
void svPutPartselLogic(svLogicVecVal* d, const svLogicVecVal s, int i, int w) {
|
void svPutPartselLogic(svLogicVecVal* d, const svLogicVecVal* s, int i, int w) {
|
||||||
_VL_SVDPI_UNIMP();
|
_VL_SVDPI_UNIMP();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License.
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2010-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2010-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License.
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -41,7 +41,7 @@ inline string VL_CVT_PACK_STR_NQ(QData lhs) {
|
|||||||
IData lw[2]; VL_SET_WQ(lw, lhs);
|
IData lw[2]; VL_SET_WQ(lw, lhs);
|
||||||
return VL_CVT_PACK_STR_NW(2, lw);
|
return VL_CVT_PACK_STR_NW(2, lw);
|
||||||
}
|
}
|
||||||
inline string VL_CVT_PACK_STR_NQ(const string& lhs) {
|
inline string VL_CVT_PACK_STR_NN(const string& lhs) {
|
||||||
return lhs;
|
return lhs;
|
||||||
}
|
}
|
||||||
inline string VL_CVT_PACK_STR_NI(IData lhs) {
|
inline string VL_CVT_PACK_STR_NI(IData lhs) {
|
||||||
@@ -51,7 +51,7 @@ inline string VL_CVT_PACK_STR_NI(IData lhs) {
|
|||||||
inline string VL_CONCATN_NNN(const string& lhs, const string& rhs) {
|
inline string VL_CONCATN_NNN(const string& lhs, const string& rhs) {
|
||||||
return lhs+rhs;
|
return lhs+rhs;
|
||||||
}
|
}
|
||||||
inline string VL_REPLICATEN_NNQ(int,int,int rbits, const string& lhs, IData rep) {
|
inline string VL_REPLICATEN_NNQ(int,int,int, const string& lhs, IData rep) {
|
||||||
string out; out.reserve(lhs.length() * rep);
|
string out; out.reserve(lhs.length() * rep);
|
||||||
for (unsigned times=0; times<rep; times++) out += lhs;
|
for (unsigned times=0; times<rep; times++) out += lhs;
|
||||||
return out;
|
return out;
|
||||||
@@ -60,6 +60,8 @@ inline string VL_REPLICATEN_NNI(int obits,int lbits,int rbits, const string& lhs
|
|||||||
return VL_REPLICATEN_NNQ(obits,lbits,rbits,lhs,rep);
|
return VL_REPLICATEN_NNQ(obits,lbits,rbits,lhs,rep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern IData VL_FOPEN_NI(const string& filename, IData mode);
|
||||||
|
extern IData VL_SSCANF_INX(int lbits, const string& ld, const char* formatp, ...);
|
||||||
extern void VL_SFORMAT_X(int obits_ignored, string &output, const char* formatp, ...);
|
extern void VL_SFORMAT_X(int obits_ignored, string &output, const char* formatp, ...);
|
||||||
extern string VL_SFORMATF_NX(const char* formatp, ...);
|
extern string VL_SFORMATF_NX(const char* formatp, ...);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2009-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2009-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License.
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2014 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2015 by Wilson Snyder. This program is free software;
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// you can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
//
|
//
|
||||||
@@ -17,8 +17,6 @@
|
|||||||
/// \file
|
/// \file
|
||||||
/// \brief C++ Tracing in VCD Format
|
/// \brief C++ Tracing in VCD Format
|
||||||
///
|
///
|
||||||
/// AUTHOR: Wilson Snyder
|
|
||||||
///
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
#include "verilatedos.h"
|
#include "verilatedos.h"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2012-2014 by Wilson Snyder. This program is free software;
|
// Copyright 2012-2015 by Wilson Snyder. This program is free software;
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// you can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
//
|
//
|
||||||
@@ -17,8 +17,6 @@
|
|||||||
/// \file
|
/// \file
|
||||||
/// \brief Save-restore serialization of verilated modules
|
/// \brief Save-restore serialization of verilated modules
|
||||||
///
|
///
|
||||||
/// AUTHOR: Wilson Snyder
|
|
||||||
///
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
#ifndef _VERILATED_SAVE_C_H_
|
#ifndef _VERILATED_SAVE_C_H_
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2009-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2009-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License.
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License.
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+45
-13
@@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2014 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2015 by Wilson Snyder. This program is free software;
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// you can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
//
|
//
|
||||||
@@ -17,8 +17,6 @@
|
|||||||
/// \file
|
/// \file
|
||||||
/// \brief C++ Tracing in VCD Format
|
/// \brief C++ Tracing in VCD Format
|
||||||
///
|
///
|
||||||
/// AUTHOR: Wilson Snyder
|
|
||||||
///
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// SPDIFF_OFF
|
// SPDIFF_OFF
|
||||||
|
|
||||||
@@ -76,11 +74,48 @@ protected:
|
|||||||
: m_initcb(icb), m_fullcb(fcb), m_changecb(changecb), m_userthis(ut), m_code(code) {};
|
: m_initcb(icb), m_fullcb(fcb), m_changecb(changecb), m_userthis(ut), m_code(code) {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
//=============================================================================
|
||||||
|
//=============================================================================
|
||||||
|
// VerilatedVcdFile
|
||||||
|
|
||||||
|
bool VerilatedVcdFile::open(const string& name) {
|
||||||
|
m_fd = ::open(name.c_str(), O_CREAT|O_WRONLY|O_TRUNC|O_LARGEFILE|O_NONBLOCK, 0666);
|
||||||
|
return (m_fd>=0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void VerilatedVcdFile::close() {
|
||||||
|
::close(m_fd);
|
||||||
|
}
|
||||||
|
|
||||||
|
ssize_t VerilatedVcdFile::write(const char* bufp, ssize_t len) {
|
||||||
|
return ::write(m_fd, bufp, len);
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// Opening/Closing
|
// Opening/Closing
|
||||||
|
|
||||||
|
VerilatedVcd::VerilatedVcd(VerilatedVcdFile* filep)
|
||||||
|
: m_isOpen(false), m_rolloverMB(0), m_modDepth(0), m_nextCode(1) {
|
||||||
|
// Not in header to avoid link issue if header is included without this .cpp file
|
||||||
|
m_fileNewed = (filep == NULL);
|
||||||
|
m_filep = m_fileNewed ? new VerilatedVcdFile : filep;
|
||||||
|
m_namemapp = NULL;
|
||||||
|
m_timeRes = m_timeUnit = 1e-9;
|
||||||
|
m_timeLastDump = 0;
|
||||||
|
m_sigs_oldvalp = NULL;
|
||||||
|
m_evcd = false;
|
||||||
|
m_scopeEscape = '.'; // Backward compatibility
|
||||||
|
m_fullDump = true;
|
||||||
|
m_wrChunkSize = 8*1024;
|
||||||
|
m_wrBufp = new char [m_wrChunkSize*8];
|
||||||
|
m_wrFlushp = m_wrBufp + m_wrChunkSize * 6;
|
||||||
|
m_writep = m_wrBufp;
|
||||||
|
m_wroteBytes = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void VerilatedVcd::open (const char* filename) {
|
void VerilatedVcd::open (const char* filename) {
|
||||||
if (isOpen()) return;
|
if (isOpen()) return;
|
||||||
|
|
||||||
@@ -142,9 +177,7 @@ void VerilatedVcd::openNext (bool incFilename) {
|
|||||||
assert(0); // Not supported yet.
|
assert(0); // Not supported yet.
|
||||||
} else {
|
} else {
|
||||||
// cppcheck-suppress duplicateExpression
|
// cppcheck-suppress duplicateExpression
|
||||||
m_fd = ::open (m_filename.c_str(), O_CREAT|O_WRONLY|O_TRUNC|O_LARGEFILE|O_NONBLOCK
|
if (!m_filep->open(m_filename)) {
|
||||||
, 0666);
|
|
||||||
if (m_fd<0) {
|
|
||||||
// User code can check isOpen()
|
// User code can check isOpen()
|
||||||
m_isOpen = false;
|
m_isOpen = false;
|
||||||
return;
|
return;
|
||||||
@@ -199,6 +232,7 @@ VerilatedVcd::~VerilatedVcd() {
|
|||||||
if (m_wrBufp) { delete[] m_wrBufp; m_wrBufp=NULL; }
|
if (m_wrBufp) { delete[] m_wrBufp; m_wrBufp=NULL; }
|
||||||
if (m_sigs_oldvalp) { delete[] m_sigs_oldvalp; m_sigs_oldvalp=NULL; }
|
if (m_sigs_oldvalp) { delete[] m_sigs_oldvalp; m_sigs_oldvalp=NULL; }
|
||||||
deleteNameMap();
|
deleteNameMap();
|
||||||
|
if (m_filep && m_fileNewed) { delete m_filep; m_filep = NULL; }
|
||||||
// Remove from list of traces
|
// Remove from list of traces
|
||||||
vector<VerilatedVcd*>::iterator pos = find(s_vcdVecp.begin(), s_vcdVecp.end(), this);
|
vector<VerilatedVcd*>::iterator pos = find(s_vcdVecp.begin(), s_vcdVecp.end(), this);
|
||||||
if (pos != s_vcdVecp.end()) { s_vcdVecp.erase(pos); }
|
if (pos != s_vcdVecp.end()) { s_vcdVecp.erase(pos); }
|
||||||
@@ -209,7 +243,7 @@ void VerilatedVcd::closePrev () {
|
|||||||
|
|
||||||
bufferFlush();
|
bufferFlush();
|
||||||
m_isOpen = false;
|
m_isOpen = false;
|
||||||
::close(m_fd);
|
m_filep->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VerilatedVcd::closeErr () {
|
void VerilatedVcd::closeErr () {
|
||||||
@@ -219,7 +253,7 @@ void VerilatedVcd::closeErr () {
|
|||||||
|
|
||||||
// No buffer flush, just fclose
|
// No buffer flush, just fclose
|
||||||
m_isOpen = false;
|
m_isOpen = false;
|
||||||
::close(m_fd); // May get error, just ignore it
|
m_filep->close(); // May get error, just ignore it
|
||||||
}
|
}
|
||||||
|
|
||||||
void VerilatedVcd::close() {
|
void VerilatedVcd::close() {
|
||||||
@@ -285,7 +319,7 @@ void VerilatedVcd::bufferFlush () {
|
|||||||
ssize_t remaining = (m_writep - wp);
|
ssize_t remaining = (m_writep - wp);
|
||||||
if (remaining==0) break;
|
if (remaining==0) break;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
ssize_t got = write (m_fd, wp, remaining);
|
ssize_t got = m_filep->write(wp, remaining);
|
||||||
if (got>0) {
|
if (got>0) {
|
||||||
wp += got;
|
wp += got;
|
||||||
m_wroteBytes += got;
|
m_wroteBytes += got;
|
||||||
@@ -308,13 +342,11 @@ void VerilatedVcd::bufferFlush () {
|
|||||||
// Simple methods
|
// Simple methods
|
||||||
|
|
||||||
void VerilatedVcd::set_time_unit (const char* unitp) {
|
void VerilatedVcd::set_time_unit (const char* unitp) {
|
||||||
string unitstr (unitp);
|
|
||||||
//cout<<" set_time_unit ("<<unitp<<") == "<<timescaleToDouble(unitp)<<" == "<<doubleToTimescale(timescaleToDouble(unitp))<<endl;
|
//cout<<" set_time_unit ("<<unitp<<") == "<<timescaleToDouble(unitp)<<" == "<<doubleToTimescale(timescaleToDouble(unitp))<<endl;
|
||||||
m_timeUnit = timescaleToDouble(unitp);
|
m_timeUnit = timescaleToDouble(unitp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VerilatedVcd::set_time_resolution (const char* unitp) {
|
void VerilatedVcd::set_time_resolution (const char* unitp) {
|
||||||
string unitstr (unitp);
|
|
||||||
//cout<<"set_time_resolution ("<<unitp<<") == "<<timescaleToDouble(unitp)<<" == "<<doubleToTimescale(timescaleToDouble(unitp))<<endl;
|
//cout<<"set_time_resolution ("<<unitp<<") == "<<timescaleToDouble(unitp)<<" == "<<doubleToTimescale(timescaleToDouble(unitp))<<endl;
|
||||||
m_timeRes = timescaleToDouble(unitp);
|
m_timeRes = timescaleToDouble(unitp);
|
||||||
}
|
}
|
||||||
@@ -346,7 +378,7 @@ string VerilatedVcd::doubleToTimescale (double value) {
|
|||||||
else if (value>=1e-12) { suffixp="ps"; value *= 1e12; }
|
else if (value>=1e-12) { suffixp="ps"; value *= 1e12; }
|
||||||
else if (value>=1e-15) { suffixp="fs"; value *= 1e15; }
|
else if (value>=1e-15) { suffixp="fs"; value *= 1e15; }
|
||||||
else if (value>=1e-18) { suffixp="as"; value *= 1e18; }
|
else if (value>=1e-18) { suffixp="as"; value *= 1e18; }
|
||||||
char valuestr[100]; sprintf(valuestr,"%d%s",(int)(value), suffixp);
|
char valuestr[100]; sprintf(valuestr,"%3.0f%s", value, suffixp);
|
||||||
return valuestr; // Gets converted to string, so no ref to stack
|
return valuestr; // Gets converted to string, so no ref to stack
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -440,7 +472,7 @@ void VerilatedVcd::dumpHeader () {
|
|||||||
deleteNameMap();
|
deleteNameMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VerilatedVcd::module (string name) {
|
void VerilatedVcd::module (const string& name) {
|
||||||
m_modName = name;
|
m_modName = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+22
-21
@@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2014 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2015 by Wilson Snyder. This program is free software;
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// you can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
//
|
//
|
||||||
@@ -17,8 +17,6 @@
|
|||||||
/// \file
|
/// \file
|
||||||
/// \brief C++ Tracing in VCD Format
|
/// \brief C++ Tracing in VCD Format
|
||||||
///
|
///
|
||||||
/// AUTHOR: Wilson Snyder
|
|
||||||
///
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// SPDIFF_OFF
|
// SPDIFF_OFF
|
||||||
|
|
||||||
@@ -36,6 +34,22 @@ class VerilatedVcd;
|
|||||||
class VerilatedVcdCallInfo;
|
class VerilatedVcdCallInfo;
|
||||||
|
|
||||||
// SPDIFF_ON
|
// SPDIFF_ON
|
||||||
|
//=============================================================================
|
||||||
|
// VerilatedFile
|
||||||
|
/// File handling routines, which can be overrode for e.g. socket I/O
|
||||||
|
|
||||||
|
class VerilatedVcdFile {
|
||||||
|
private:
|
||||||
|
int m_fd; ///< File descriptor we're writing to
|
||||||
|
public:
|
||||||
|
// METHODS
|
||||||
|
VerilatedVcdFile() : m_fd(0) {}
|
||||||
|
virtual ~VerilatedVcdFile() {}
|
||||||
|
virtual bool open(const string& name);
|
||||||
|
virtual void close();
|
||||||
|
virtual ssize_t write(const char* bufp, ssize_t len);
|
||||||
|
};
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// VerilatedVcdSig
|
// VerilatedVcdSig
|
||||||
/// Internal data on one signal being traced.
|
/// Internal data on one signal being traced.
|
||||||
@@ -62,9 +76,10 @@ typedef void (*VerilatedVcdCallback_t)(VerilatedVcd* vcdp, void* userthis, vluin
|
|||||||
|
|
||||||
class VerilatedVcd {
|
class VerilatedVcd {
|
||||||
private:
|
private:
|
||||||
|
VerilatedVcdFile* m_filep; ///< File we're writing to
|
||||||
|
bool m_fileNewed; ///< m_filep needs destruction
|
||||||
bool m_isOpen; ///< True indicates open file
|
bool m_isOpen; ///< True indicates open file
|
||||||
bool m_evcd; ///< True for evcd format
|
bool m_evcd; ///< True for evcd format
|
||||||
int m_fd; ///< File descriptor we're writing to
|
|
||||||
string m_filename; ///< Filename we're writing to (if open)
|
string m_filename; ///< Filename we're writing to (if open)
|
||||||
vluint64_t m_rolloverMB; ///< MB of file size to rollover at
|
vluint64_t m_rolloverMB; ///< MB of file size to rollover at
|
||||||
char m_scopeEscape; ///< Character to separate scope components
|
char m_scopeEscape; ///< Character to separate scope components
|
||||||
@@ -135,21 +150,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// CREATORS
|
// CREATORS
|
||||||
VerilatedVcd () : m_isOpen(false), m_rolloverMB(0), m_modDepth(0), m_nextCode(1) {
|
VerilatedVcd(VerilatedVcdFile* filep=NULL);
|
||||||
m_namemapp = NULL;
|
|
||||||
m_timeRes = m_timeUnit = 1e-9;
|
|
||||||
m_timeLastDump = 0;
|
|
||||||
m_sigs_oldvalp = NULL;
|
|
||||||
m_evcd = false;
|
|
||||||
m_scopeEscape = '.'; // Backward compatibility
|
|
||||||
m_fd = 0;
|
|
||||||
m_fullDump = true;
|
|
||||||
m_wrChunkSize = 8*1024;
|
|
||||||
m_wrBufp = new char [m_wrChunkSize*8];
|
|
||||||
m_wrFlushp = m_wrBufp + m_wrChunkSize * 6;
|
|
||||||
m_writep = m_wrBufp;
|
|
||||||
m_wroteBytes = 0;
|
|
||||||
}
|
|
||||||
~VerilatedVcd();
|
~VerilatedVcd();
|
||||||
|
|
||||||
// ACCESSORS
|
// ACCESSORS
|
||||||
@@ -191,7 +192,7 @@ public:
|
|||||||
void* userthis);
|
void* userthis);
|
||||||
|
|
||||||
/// Inside dumping routines, declare a module
|
/// Inside dumping routines, declare a module
|
||||||
void module (const string name);
|
void module (const string& name);
|
||||||
/// Inside dumping routines, declare a signal
|
/// Inside dumping routines, declare a signal
|
||||||
void declBit (vluint32_t code, const char* name, int arraynum);
|
void declBit (vluint32_t code, const char* name, int arraynum);
|
||||||
void declBus (vluint32_t code, const char* name, int arraynum, int msb, int lsb);
|
void declBus (vluint32_t code, const char* name, int arraynum, int msb, int lsb);
|
||||||
@@ -398,7 +399,7 @@ class VerilatedVcdC {
|
|||||||
VerilatedVcd m_sptrace; ///< Trace file being created
|
VerilatedVcd m_sptrace; ///< Trace file being created
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
VerilatedVcdC() {}
|
VerilatedVcdC(VerilatedVcdFile* filep=NULL) : m_sptrace(filep) {}
|
||||||
~VerilatedVcdC() {}
|
~VerilatedVcdC() {}
|
||||||
// ACCESSORS
|
// ACCESSORS
|
||||||
/// Is file open?
|
/// Is file open?
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2014 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2015 by Wilson Snyder. This program is free software;
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// you can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
//
|
//
|
||||||
@@ -17,8 +17,6 @@
|
|||||||
/// \file
|
/// \file
|
||||||
/// \brief Verilator tracing in VCD Format
|
/// \brief Verilator tracing in VCD Format
|
||||||
///
|
///
|
||||||
/// AUTHOR: Wilson Snyder
|
|
||||||
///
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// SPDIFF_OFF
|
// SPDIFF_OFF
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
// THIS MODULE IS PUBLICLY LICENSED
|
// THIS MODULE IS PUBLICLY LICENSED
|
||||||
//
|
//
|
||||||
// Copyright 2001-2014 by Wilson Snyder. This program is free software;
|
// Copyright 2001-2015 by Wilson Snyder. This program is free software;
|
||||||
// you can redistribute it and/or modify it under the terms of either the GNU
|
// you can redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
// Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
//
|
//
|
||||||
@@ -17,8 +17,6 @@
|
|||||||
/// \file
|
/// \file
|
||||||
/// \brief Verilator tracing in VCD format
|
/// \brief Verilator tracing in VCD format
|
||||||
///
|
///
|
||||||
/// AUTHOR: Wilson Snyder
|
|
||||||
///
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// SPDIFF_OFF
|
// SPDIFF_OFF
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2009-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2009-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License.
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2009-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2009-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License.
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -421,7 +421,7 @@ public:
|
|||||||
do { \
|
do { \
|
||||||
va_list args; \
|
va_list args; \
|
||||||
va_start(args, message); \
|
va_start(args, message); \
|
||||||
vsnprintf(m_buff, sizeof(m_buff), message.c_str(), args); \
|
VL_VSNPRINTF(m_buff, sizeof(m_buff), message.c_str(), args); \
|
||||||
va_end(args); \
|
va_end(args); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
@@ -787,6 +787,7 @@ void vpi_put_delays(vpiHandle object, p_vpi_delay delay_p) {
|
|||||||
|
|
||||||
void vpi_get_value(vpiHandle object, p_vpi_value value_p) {
|
void vpi_get_value(vpiHandle object, p_vpi_value value_p) {
|
||||||
static VL_THREAD char outStr[1+VL_MULS_MAX_WORDS*32]; // Maximum required size is for binary string, one byte per bit plus null termination
|
static VL_THREAD char outStr[1+VL_MULS_MAX_WORDS*32]; // Maximum required size is for binary string, one byte per bit plus null termination
|
||||||
|
// cppcheck-suppress variableScope
|
||||||
static VL_THREAD int outStrSz = sizeof(outStr)-1;
|
static VL_THREAD int outStrSz = sizeof(outStr)-1;
|
||||||
VL_DEBUG_IF_PLI(VL_PRINTF("-vltVpi: vpi_get_value %p\n",object););
|
VL_DEBUG_IF_PLI(VL_PRINTF("-vltVpi: vpi_get_value %p\n",object););
|
||||||
_VL_VPI_ERROR_RESET(); // reset vpi error status
|
_VL_VPI_ERROR_RESET(); // reset vpi error status
|
||||||
@@ -919,10 +920,10 @@ void vpi_get_value(vpiHandle object, p_vpi_value value_p) {
|
|||||||
value_p->value.str = outStr;
|
value_p->value.str = outStr;
|
||||||
switch (vop->varp()->vltype()) {
|
switch (vop->varp()->vltype()) {
|
||||||
// outStrSz does not include NULL termination so add one
|
// outStrSz does not include NULL termination so add one
|
||||||
case VLVT_UINT8 : snprintf(outStr, outStrSz+1, "%hhu", (unsigned char )*((CData*)(vop->varDatap()))); return;
|
case VLVT_UINT8 : VL_SNPRINTF(outStr, outStrSz+1, "%hhu", (unsigned char )*((CData*)(vop->varDatap()))); return;
|
||||||
case VLVT_UINT16: snprintf(outStr, outStrSz+1, "%hu", (unsigned short)*((SData*)(vop->varDatap()))); return;
|
case VLVT_UINT16: VL_SNPRINTF(outStr, outStrSz+1, "%hu", (unsigned short)*((SData*)(vop->varDatap()))); return;
|
||||||
case VLVT_UINT32: snprintf(outStr, outStrSz+1, "%u", (unsigned int )*((IData*)(vop->varDatap()))); return;
|
case VLVT_UINT32: VL_SNPRINTF(outStr, outStrSz+1, "%u", (unsigned int )*((IData*)(vop->varDatap()))); return;
|
||||||
case VLVT_UINT64: snprintf(outStr, outStrSz+1, "%llu", (unsigned long long)*((QData*)(vop->varDatap()))); return;
|
case VLVT_UINT64: VL_SNPRINTF(outStr, outStrSz+1, "%llu", (unsigned long long)*((QData*)(vop->varDatap()))); return;
|
||||||
default:
|
default:
|
||||||
strcpy(outStr, "-1");
|
strcpy(outStr, "-1");
|
||||||
_VL_VPI_ERROR(__FILE__, __LINE__, "%s: Unsupported format (%s) for %s, maximum limit is 64 bits",
|
_VL_VPI_ERROR(__FILE__, __LINE__, "%s: Unsupported format (%s) for %s, maximum limit is 64 bits",
|
||||||
|
|||||||
+15
-2
@@ -1,7 +1,7 @@
|
|||||||
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License.
|
// Lesser General Public License Version 3 or the Perl Artistic License.
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -139,7 +139,7 @@ typedef unsigned char uint8_t; ///< 8-bit unsigned type (backward comp
|
|||||||
typedef unsigned short int uint16_t; ///< 16-bit unsigned type (backward compatibility)
|
typedef unsigned short int uint16_t; ///< 16-bit unsigned type (backward compatibility)
|
||||||
typedef unsigned char vluint8_t; ///< 8-bit unsigned type
|
typedef unsigned char vluint8_t; ///< 8-bit unsigned type
|
||||||
typedef unsigned short int vluint16_t; ///< 16-bit unsigned type
|
typedef unsigned short int vluint16_t; ///< 16-bit unsigned type
|
||||||
# ifdef __uint32_t_defined // Newer Cygwin uint32_t in stdint.h as an unsigned int
|
# if defined(__uint32_t_defined) || defined(___int32_t_defined) // Newer Cygwin uint32_t in stdint.h as an unsigned int
|
||||||
typedef int32_t vlsint32_t; ///< 32-bit signed type
|
typedef int32_t vlsint32_t; ///< 32-bit signed type
|
||||||
typedef uint32_t vluint32_t; ///< 32-bit unsigned type
|
typedef uint32_t vluint32_t; ///< 32-bit unsigned type
|
||||||
# else // Older Cygwin has long==uint32_t
|
# else // Older Cygwin has long==uint32_t
|
||||||
@@ -178,6 +178,7 @@ typedef signed __int32 ssize_t; ///< signed size_t; returned fro
|
|||||||
#else // Linux or compliant Unix flavors, -m64
|
#else // Linux or compliant Unix flavors, -m64
|
||||||
|
|
||||||
# include <stdint.h> // Linux and most flavors
|
# include <stdint.h> // Linux and most flavors
|
||||||
|
# include <unistd.h> // Linux ssize_t
|
||||||
# include <inttypes.h> // Solaris
|
# include <inttypes.h> // Solaris
|
||||||
typedef uint8_t vluint8_t; ///< 32-bit unsigned type
|
typedef uint8_t vluint8_t; ///< 32-bit unsigned type
|
||||||
typedef uint16_t vluint16_t; ///< 32-bit unsigned type
|
typedef uint16_t vluint16_t; ///< 32-bit unsigned type
|
||||||
@@ -206,6 +207,18 @@ typedef unsigned long long vluint64_t; ///< 64-bit unsigned type
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_WIN32) && defined(_MSC_VER)
|
||||||
|
# if (_MSC_VER < 1900)
|
||||||
|
# define VL_SNPRINTF _snprintf
|
||||||
|
# else
|
||||||
|
# define VL_SNPRINTF snprintf
|
||||||
|
# endif
|
||||||
|
# define VL_VSNPRINTF vsnprintf
|
||||||
|
#else
|
||||||
|
# define VL_SNPRINTF snprintf
|
||||||
|
# define VL_VSNPRINTF vsnprintf
|
||||||
|
#endif
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
// File system functions
|
// File system functions
|
||||||
|
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ XXTERN void svGetPartselBit(svBitVecVal* d, const svBitVecVal* s, int i, int w);
|
|||||||
XXTERN void svGetPartselLogic(svLogicVecVal* d, const svLogicVecVal* s, int i, int w);
|
XXTERN void svGetPartselLogic(svLogicVecVal* d, const svLogicVecVal* s, int i, int w);
|
||||||
|
|
||||||
XXTERN void svPutPartselBit(svBitVecVal* d, const svBitVecVal s, int i, int w);
|
XXTERN void svPutPartselBit(svBitVecVal* d, const svBitVecVal s, int i, int w);
|
||||||
XXTERN void svPutPartselLogic(svLogicVecVal* d, const svLogicVecVal s, int i, int w);
|
XXTERN void svPutPartselLogic(svLogicVecVal* d, const svLogicVecVal* s, int i, int w);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Open array querying functions
|
* Open array querying functions
|
||||||
@@ -427,7 +427,7 @@ XXTERN void svGetPartSelectLogic(svLogicVec32* d, const svLogicPackedArrRef s,
|
|||||||
/* actual <-- canonical */
|
/* actual <-- canonical */
|
||||||
XXTERN void svPutPartSelectBit(svBitPackedArrRef d, const svBitVec32 s,
|
XXTERN void svPutPartSelectBit(svBitPackedArrRef d, const svBitVec32 s,
|
||||||
int i, int w);
|
int i, int w);
|
||||||
XXTERN void svPutPartSelectLogic(svLogicPackedArrRef d, const svLogicVec32 s,
|
XXTERN void svPutPartSelectLogic(svLogicPackedArrRef d, const svLogicVec32* s,
|
||||||
int i, int w);
|
int i, int w);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+13
-1
@@ -407,6 +407,18 @@ Tests that fail should by convention have the suffix C<_bad> in their name,
|
|||||||
and include C<fails =E<gt> 1> in either their C<compile> or C<execute> step as
|
and include C<fails =E<gt> 1> in either their C<compile> or C<execute> step as
|
||||||
appropriate.
|
appropriate.
|
||||||
|
|
||||||
|
=head2 Preparing to Run Tests
|
||||||
|
|
||||||
|
For all tests to pass you must install the following packages:
|
||||||
|
|
||||||
|
* SystemC to compile the SystemC outputs, see http://systemc.org
|
||||||
|
|
||||||
|
* Parallel::Forker from CPAN to run tests in parallel, you can install this
|
||||||
|
with e.g. "sudo cpan install Parallel::Forker".
|
||||||
|
|
||||||
|
* vcddiff to find differences in VCD outputs. See the readme at
|
||||||
|
https://github.com/veripool/vcddiff
|
||||||
|
|
||||||
=head2 Controlling the Test Driver
|
=head2 Controlling the Test Driver
|
||||||
|
|
||||||
Test drivers are written in PERL. All invoke the main test driver script,
|
Test drivers are written in PERL. All invoke the main test driver script,
|
||||||
@@ -773,7 +785,7 @@ in C<src/Makefile_obj.in> and reconfigure.
|
|||||||
|
|
||||||
The latest version is available from L<http://www.veripool.org/>.
|
The latest version is available from L<http://www.veripool.org/>.
|
||||||
|
|
||||||
Copyright 2008-2014 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2008-2015 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
|
||||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2007-2014 by Wilson Snyder. This package is free software; you
|
# Copyright 2007-2015 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
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2007-2014 by Wilson Snyder. This package is free software; you
|
# Copyright 2007-2015 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
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
|||||||
+1
-1
@@ -143,7 +143,7 @@ Displays this message and program version and exits.
|
|||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
Copyright 2005-2014 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2005-2015 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
|
||||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -184,7 +184,7 @@ Displays this message and program version and exits.
|
|||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
Copyright 2005-2014 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2005-2015 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
|
||||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2007-2014 by Wilson Snyder. This package is free software; you
|
# Copyright 2007-2015 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
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
|||||||
+1
-1
@@ -183,7 +183,7 @@ Runs a specific test stage (see the script).
|
|||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
Copyright 2009-2014 by Wilson Snyder. This package is free software; you
|
Copyright 2009-2015 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
|
||||||
Lesser General Public License Version 3 or the Perl Artistic License
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
Version 2.0.
|
Version 2.0.
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ invoke_atsim - Invoke tool under "modules" command
|
|||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
Copyright 2005-2014 by Wilson Snyder. This package is free software; you
|
Copyright 2005-2015 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
|
||||||
Lesser General Public License Version 3 or the Perl Artistic License
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
Version 2.0.
|
Version 2.0.
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ invoke_iccr - Invoke tool under "modules" command
|
|||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
Copyright 2007-2014 by Wilson Snyder. This package is free software; you
|
Copyright 2007-2015 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
|
||||||
Lesser General Public License Version 3 or the Perl Artistic License
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
Version 2.0.
|
Version 2.0.
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ invoke_ncverilog - Invoke tool under "modules" command
|
|||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
Copyright 2005-2014 by Wilson Snyder. This package is free software; you
|
Copyright 2005-2015 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
|
||||||
Lesser General Public License Version 3 or the Perl Artistic License
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
Version 2.0.
|
Version 2.0.
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ invoke_vcs - Invoke tool under "modules" command
|
|||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
Copyright 2005-2014 by Wilson Snyder. This package is free software; you
|
Copyright 2005-2015 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
|
||||||
Lesser General Public License Version 3 or the Perl Artistic License
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
Version 2.0.
|
Version 2.0.
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ Displays this message and program version and exits.
|
|||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
Copyright 2005-2014 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2005-2015 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
|
||||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# DESCRIPTION: Verilator: GDB startup file with useful defines
|
# DESCRIPTION: Verilator: GDB startup file with useful defines
|
||||||
#
|
#
|
||||||
# Copyright 2012-2014 by Wilson Snyder. This program is free software; you can
|
# Copyright 2012-2015 by Wilson Snyder. This program is free software; you can
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#
|
#
|
||||||
# Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
|||||||
+12
-8
@@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#
|
#
|
||||||
# Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
# redistribute it and/or modify it under the terms of either the GNU
|
# redistribute it and/or modify it under the terms of either the GNU
|
||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
@@ -62,6 +62,8 @@ CFG_WITH_DEFENV = @CFG_WITH_DEFENV@
|
|||||||
CPPFLAGS += @CPPFLAGS@
|
CPPFLAGS += @CPPFLAGS@
|
||||||
LDFLAGS += @LDFLAGS@
|
LDFLAGS += @LDFLAGS@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
CFG_CXXFLAGS_SRC = @CFG_CXXFLAGS_SRC@
|
||||||
|
CFG_CXXFLAGS_PARSER = @CFG_CXXFLAGS_PARSER@
|
||||||
|
|
||||||
#### End of system configuration section. ####
|
#### End of system configuration section. ####
|
||||||
|
|
||||||
@@ -85,7 +87,8 @@ endif
|
|||||||
#CCMALLOC = /usr/local/lib/ccmalloc-gcc.o -lccmalloc -ldl
|
#CCMALLOC = /usr/local/lib/ccmalloc-gcc.o -lccmalloc -ldl
|
||||||
|
|
||||||
# -lfl not needed as Flex invoked with %nowrap option
|
# -lfl not needed as Flex invoked with %nowrap option
|
||||||
LIBS = -lm
|
# -lstdc++ needed for clang, believed harmless with gcc
|
||||||
|
LIBS = -lm -lstdc++
|
||||||
|
|
||||||
CPPFLAGS += -MMD
|
CPPFLAGS += -MMD
|
||||||
CPPFLAGS += -I. -I$(bldsrc) -I$(srcdir) -I$(incdir)
|
CPPFLAGS += -I. -I$(bldsrc) -I$(srcdir) -I$(incdir)
|
||||||
@@ -94,11 +97,11 @@ CPPFLAGS += -DYYDEBUG # Required to get nice error messages
|
|||||||
CPPFLAGS += $(COPT)
|
CPPFLAGS += $(COPT)
|
||||||
CPPFLAGS += -MP # Only works on recent GCC versions
|
CPPFLAGS += -MP # Only works on recent GCC versions
|
||||||
ifeq ($(CFG_WITH_CCWARN),yes) # Local... Else don't burden users
|
ifeq ($(CFG_WITH_CCWARN),yes) # Local... Else don't burden users
|
||||||
CPPFLAGS += -W -Wall -Wno-unused-parameter -Wno-char-subscripts -Werror
|
CPPFLAGS += -W -Wall $(CFG_CXXFLAGS_SRC) -Werror
|
||||||
#CPPFLAGS += -pedantic-errors
|
#CPPFLAGS += -pedantic-errors
|
||||||
endif
|
endif
|
||||||
CPPFLAGSWALL = $(CPPFLAGS)
|
CPPFLAGSWALL = $(CPPFLAGS)
|
||||||
CPPFLAGSNOWALL = $(CPPFLAGS) -Wno-unused
|
CPPFLAGSPARSER = $(CPPFLAGS) $(CFG_CXXFLAGS_PARSER)
|
||||||
|
|
||||||
ifneq ($(SYSTEMPERL),) # Intuit SYSTEMPERL_INCLUDE as it's new
|
ifneq ($(SYSTEMPERL),) # Intuit SYSTEMPERL_INCLUDE as it's new
|
||||||
SYSTEMPERL_INCLUDE ?= $(SYSTEMPERL)/src
|
SYSTEMPERL_INCLUDE ?= $(SYSTEMPERL)/src
|
||||||
@@ -212,6 +215,7 @@ RAW_OBJS = \
|
|||||||
V3Number.o \
|
V3Number.o \
|
||||||
V3Options.o \
|
V3Options.o \
|
||||||
V3Order.o \
|
V3Order.o \
|
||||||
|
V3Os.o \
|
||||||
V3Param.o \
|
V3Param.o \
|
||||||
V3PreShell.o \
|
V3PreShell.o \
|
||||||
V3Premit.o \
|
V3Premit.o \
|
||||||
@@ -277,16 +281,16 @@ V3Number_test: V3Number_test.o
|
|||||||
$(OBJCACHE) ${CC} ${CPPFLAGSWALL} -c $<
|
$(OBJCACHE) ${CC} ${CPPFLAGSWALL} -c $<
|
||||||
|
|
||||||
V3ParseLex.o: V3ParseLex.cpp V3Lexer.yy.cpp V3ParseBison.c
|
V3ParseLex.o: V3ParseLex.cpp V3Lexer.yy.cpp V3ParseBison.c
|
||||||
$(OBJCACHE) ${CXX} ${CPPFLAGSNOWALL} -c $<
|
$(OBJCACHE) ${CXX} ${CPPFLAGSPARSER} -c $<
|
||||||
|
|
||||||
V3ParseGrammar.o: V3ParseGrammar.cpp V3ParseBison.c
|
V3ParseGrammar.o: V3ParseGrammar.cpp V3ParseBison.c
|
||||||
$(OBJCACHE) ${CXX} ${CPPFLAGSNOWALL} -c $<
|
$(OBJCACHE) ${CXX} ${CPPFLAGSPARSER} -c $<
|
||||||
|
|
||||||
V3ParseImp.o: V3ParseImp.cpp V3ParseBison.c
|
V3ParseImp.o: V3ParseImp.cpp V3ParseBison.c
|
||||||
$(OBJCACHE) ${CXX} ${CPPFLAGSNOWALL} -c $<
|
$(OBJCACHE) ${CXX} ${CPPFLAGSPARSER} -c $<
|
||||||
|
|
||||||
V3PreProc.o: V3PreProc.cpp V3PreLex.yy.cpp
|
V3PreProc.o: V3PreProc.cpp V3PreLex.yy.cpp
|
||||||
$(OBJCACHE) ${CXX} ${CPPFLAGSNOWALL} -c $<
|
$(OBJCACHE) ${CXX} ${CPPFLAGSPARSER} -c $<
|
||||||
|
|
||||||
#### Generated files
|
#### Generated files
|
||||||
|
|
||||||
|
|||||||
+13
-6
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -163,7 +163,7 @@ public:
|
|||||||
|
|
||||||
class ActiveDlyVisitor : public ActiveBaseVisitor {
|
class ActiveDlyVisitor : public ActiveBaseVisitor {
|
||||||
public:
|
public:
|
||||||
enum CheckType { CT_SEQ, CT_COMBO, CT_INITIAL };
|
enum CheckType { CT_SEQ, CT_COMBO, CT_INITIAL, CT_LATCH };
|
||||||
private:
|
private:
|
||||||
CheckType m_check; // Combo logic or other
|
CheckType m_check; // Combo logic or other
|
||||||
AstNode* m_alwaysp; // Always we're under
|
AstNode* m_alwaysp; // Always we're under
|
||||||
@@ -175,6 +175,8 @@ private:
|
|||||||
UINFO(5," ASSIGNDLY "<<nodep<<endl);
|
UINFO(5," ASSIGNDLY "<<nodep<<endl);
|
||||||
if (m_check == CT_INITIAL) {
|
if (m_check == CT_INITIAL) {
|
||||||
nodep->v3warn(INITIALDLY,"Delayed assignments (<=) in initial or final block; suggest blocking assignments (=).");
|
nodep->v3warn(INITIALDLY,"Delayed assignments (<=) in initial or final block; suggest blocking assignments (=).");
|
||||||
|
} else if (m_check == CT_LATCH) {
|
||||||
|
// Suppress. Shouldn't matter that the interior of the latch races
|
||||||
} else {
|
} else {
|
||||||
nodep->v3warn(COMBDLY,"Delayed assignments (<=) in non-clocked (non flop or latch) block; suggest blocking assignments (=).");
|
nodep->v3warn(COMBDLY,"Delayed assignments (<=) in non-clocked (non flop or latch) block; suggest blocking assignments (=).");
|
||||||
}
|
}
|
||||||
@@ -306,7 +308,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// METHODS
|
// METHODS
|
||||||
void visitAlways(AstNode* nodep, AstSenTree* oldsensesp) {
|
void visitAlways(AstNode* nodep, AstSenTree* oldsensesp, VAlwaysKwd kwd) {
|
||||||
// Move always to appropriate ACTIVE based on its sense list
|
// Move always to appropriate ACTIVE based on its sense list
|
||||||
if (oldsensesp
|
if (oldsensesp
|
||||||
&& oldsensesp->sensesp()
|
&& oldsensesp->sensesp()
|
||||||
@@ -358,7 +360,11 @@ private:
|
|||||||
|
|
||||||
// Warn and/or convert any delayed assignments
|
// Warn and/or convert any delayed assignments
|
||||||
if (combo && !sequent) {
|
if (combo && !sequent) {
|
||||||
ActiveDlyVisitor dlyvisitor (nodep, ActiveDlyVisitor::CT_COMBO);
|
if (kwd == VAlwaysKwd::ALWAYS_LATCH) {
|
||||||
|
ActiveDlyVisitor dlyvisitor (nodep, ActiveDlyVisitor::CT_LATCH);
|
||||||
|
} else {
|
||||||
|
ActiveDlyVisitor dlyvisitor (nodep, ActiveDlyVisitor::CT_COMBO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!combo && sequent) {
|
else if (!combo && sequent) {
|
||||||
ActiveDlyVisitor dlyvisitor (nodep, ActiveDlyVisitor::CT_SEQ);
|
ActiveDlyVisitor dlyvisitor (nodep, ActiveDlyVisitor::CT_SEQ);
|
||||||
@@ -374,13 +380,13 @@ private:
|
|||||||
nodep->unlinkFrBack()->deleteTree(); nodep=NULL;
|
nodep->unlinkFrBack()->deleteTree(); nodep=NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
visitAlways(nodep, nodep->sensesp());
|
visitAlways(nodep, nodep->sensesp(), nodep->keyword());
|
||||||
}
|
}
|
||||||
virtual void visit(AstAlwaysPublic* nodep, AstNUser*) {
|
virtual void visit(AstAlwaysPublic* nodep, AstNUser*) {
|
||||||
// Move always to appropriate ACTIVE based on its sense list
|
// Move always to appropriate ACTIVE based on its sense list
|
||||||
UINFO(4," ALWPub "<<nodep<<endl);
|
UINFO(4," ALWPub "<<nodep<<endl);
|
||||||
//if (debug()>=9) nodep->dumpTree(cout," Alw: ");
|
//if (debug()>=9) nodep->dumpTree(cout," Alw: ");
|
||||||
visitAlways(nodep, nodep->sensesp());
|
visitAlways(nodep, nodep->sensesp(), VAlwaysKwd::ALWAYS);
|
||||||
}
|
}
|
||||||
virtual void visit(AstSenGate* nodep, AstNUser*) {
|
virtual void visit(AstSenGate* nodep, AstNUser*) {
|
||||||
AstSenItem* subitemp = nodep->sensesp();
|
AstSenItem* subitemp = nodep->sensesp();
|
||||||
@@ -430,4 +436,5 @@ public:
|
|||||||
void V3Active::activeAll(AstNetlist* nodep) {
|
void V3Active::activeAll(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
ActiveVisitor visitor (nodep);
|
ActiveVisitor visitor (nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("active.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+2
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -160,4 +160,5 @@ public:
|
|||||||
void V3ActiveTop::activeTopAll(AstNetlist* nodep) {
|
void V3ActiveTop::activeTopAll(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
ActiveTopVisitor visitor (nodep);
|
ActiveTopVisitor visitor (nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("activetop.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+2
-16
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2005-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2005-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -88,21 +88,6 @@ private:
|
|||||||
return newp;
|
return newp;
|
||||||
}
|
}
|
||||||
|
|
||||||
AstNode* newIfCoverageOn(AstNode* nodep) {
|
|
||||||
// Add a internal if to check coverage is on
|
|
||||||
// Don't make this a AND term, as it's unlikely to need to test this.
|
|
||||||
AstNode* newp
|
|
||||||
= new AstIf (nodep->fileline(),
|
|
||||||
// If assertions are off, have constant propagation rip them out later
|
|
||||||
// This allows syntax errors and such to be detected normally.
|
|
||||||
(v3Global.opt.coverage()
|
|
||||||
? (AstNode*)(new AstConst(nodep->fileline(), AstConst::LogicTrue()))
|
|
||||||
: (AstNode*)(new AstConst(nodep->fileline(), AstConst::LogicFalse()))),
|
|
||||||
nodep, NULL);
|
|
||||||
newp->user1(true); // Don't assert/cover this if
|
|
||||||
return newp;
|
|
||||||
}
|
|
||||||
|
|
||||||
AstNode* newFireAssert(AstNode* nodep, const string& message) {
|
AstNode* newFireAssert(AstNode* nodep, const string& message) {
|
||||||
AstDisplay* dispp = new AstDisplay (nodep->fileline(), AstDisplayType::DT_ERROR, message, NULL, NULL);
|
AstDisplay* dispp = new AstDisplay (nodep->fileline(), AstDisplayType::DT_ERROR, message, NULL, NULL);
|
||||||
AstNode* bodysp = dispp;
|
AstNode* bodysp = dispp;
|
||||||
@@ -352,4 +337,5 @@ public:
|
|||||||
void V3Assert::assertAll(AstNetlist* nodep) {
|
void V3Assert::assertAll(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
AssertVisitor visitor (nodep);
|
AssertVisitor visitor (nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("assert.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2005-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2005-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+2
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2005-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2005-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -137,4 +137,5 @@ public:
|
|||||||
void V3AssertPre::assertPreAll(AstNetlist* nodep) {
|
void V3AssertPre::assertPreAll(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
AssertPreVisitor visitor (nodep);
|
AssertPreVisitor visitor (nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("assertpre.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2005-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2005-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+6
-2
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -176,6 +176,10 @@ string AstNode::prettyName(const string& namein) {
|
|||||||
pretty += ".";
|
pretty += ".";
|
||||||
pos += 7;
|
pos += 7;
|
||||||
}
|
}
|
||||||
|
else if (0==strncmp(pos,"->",2)) {
|
||||||
|
pretty += ".";
|
||||||
|
pos += 2;
|
||||||
|
}
|
||||||
else if (0==strncmp(pos,"__PVT__",7)) {
|
else if (0==strncmp(pos,"__PVT__",7)) {
|
||||||
pretty += "";
|
pretty += "";
|
||||||
pos += 7;
|
pos += 7;
|
||||||
@@ -1009,7 +1013,7 @@ void AstNode::dumpTreeAndNext(ostream& os, const string& indent, int maxDepth) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AstNode::dumpTreeFile(const string& filename, bool append, bool doDump) {
|
void AstNode::dumpTreeFile(const string& filename, bool append, bool doDump) {
|
||||||
if (v3Global.opt.dumpTree() && doDump) {
|
if (doDump) {
|
||||||
{ // Write log & close
|
{ // Write log & close
|
||||||
UINFO(2,"Dumping "<<filename<<endl);
|
UINFO(2,"Dumping "<<filename<<endl);
|
||||||
const auto_ptr<ofstream> logsp (V3File::new_ofstream(filename, append));
|
const auto_ptr<ofstream> logsp (V3File::new_ofstream(filename, append));
|
||||||
|
|||||||
+40
-4
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -239,6 +239,7 @@ public:
|
|||||||
//
|
//
|
||||||
DT_PUBLIC, // V3LinkParse moves to AstTypedef::attrPublic
|
DT_PUBLIC, // V3LinkParse moves to AstTypedef::attrPublic
|
||||||
//
|
//
|
||||||
|
ENUM_BASE, // V3LinkResolve creates for AstPreSel, V3LinkParam removes
|
||||||
ENUM_FIRST, // V3Width processes
|
ENUM_FIRST, // V3Width processes
|
||||||
ENUM_LAST, // V3Width processes
|
ENUM_LAST, // V3Width processes
|
||||||
ENUM_NUM, // V3Width processes
|
ENUM_NUM, // V3Width processes
|
||||||
@@ -257,7 +258,9 @@ public:
|
|||||||
VAR_PUBLIC_FLAT_RW, // V3LinkParse moves to AstVar::sigPublic
|
VAR_PUBLIC_FLAT_RW, // V3LinkParse moves to AstVar::sigPublic
|
||||||
VAR_ISOLATE_ASSIGNMENTS, // V3LinkParse moves to AstVar::attrIsolateAssign
|
VAR_ISOLATE_ASSIGNMENTS, // V3LinkParse moves to AstVar::attrIsolateAssign
|
||||||
VAR_SC_BV, // V3LinkParse moves to AstVar::attrScBv
|
VAR_SC_BV, // V3LinkParse moves to AstVar::attrScBv
|
||||||
VAR_SFORMAT // V3LinkParse moves to AstVar::attrSFormat
|
VAR_SFORMAT, // V3LinkParse moves to AstVar::attrSFormat
|
||||||
|
VAR_CLOCKER, // V3LinkParse moves to AstVar::attrClocker
|
||||||
|
VAR_NO_CLOCKER // V3LinkParse moves to AstVar::attrClocker
|
||||||
};
|
};
|
||||||
enum en m_e;
|
enum en m_e;
|
||||||
const char* ascii() const {
|
const char* ascii() const {
|
||||||
@@ -266,11 +269,12 @@ public:
|
|||||||
"DIM_BITS", "DIM_DIMENSIONS", "DIM_HIGH", "DIM_INCREMENT", "DIM_LEFT",
|
"DIM_BITS", "DIM_DIMENSIONS", "DIM_HIGH", "DIM_INCREMENT", "DIM_LEFT",
|
||||||
"DIM_LOW", "DIM_RIGHT", "DIM_SIZE", "DIM_UNPK_DIMENSIONS",
|
"DIM_LOW", "DIM_RIGHT", "DIM_SIZE", "DIM_UNPK_DIMENSIONS",
|
||||||
"DT_PUBLIC",
|
"DT_PUBLIC",
|
||||||
"ENUM_FIRST", "ENUM_LAST", "ENUM_NUM", "ENUM_NEXT", "ENUM_PREV", "ENUM_NAME",
|
"ENUM_BASE", "ENUM_FIRST", "ENUM_LAST", "ENUM_NUM", "ENUM_NEXT", "ENUM_PREV", "ENUM_NAME",
|
||||||
"MEMBER_BASE",
|
"MEMBER_BASE",
|
||||||
"VAR_BASE", "VAR_CLOCK", "VAR_CLOCK_ENABLE", "VAR_PUBLIC",
|
"VAR_BASE", "VAR_CLOCK", "VAR_CLOCK_ENABLE", "VAR_PUBLIC",
|
||||||
"VAR_PUBLIC_FLAT", "VAR_PUBLIC_FLAT_RD","VAR_PUBLIC_FLAT_RW",
|
"VAR_PUBLIC_FLAT", "VAR_PUBLIC_FLAT_RD","VAR_PUBLIC_FLAT_RW",
|
||||||
"VAR_ISOLATE_ASSIGNMENTS", "VAR_SC_BV", "VAR_SFORMAT"
|
"VAR_ISOLATE_ASSIGNMENTS", "VAR_SC_BV", "VAR_SFORMAT", "VAR_CLOCKER",
|
||||||
|
"VAR_NO_CLOCKER"
|
||||||
};
|
};
|
||||||
return names[m_e];
|
return names[m_e];
|
||||||
};
|
};
|
||||||
@@ -485,6 +489,37 @@ public:
|
|||||||
|
|
||||||
//######################################################################
|
//######################################################################
|
||||||
|
|
||||||
|
class AstVarAttrClocker {
|
||||||
|
public:
|
||||||
|
enum en {
|
||||||
|
CLOCKER_UNKNOWN=0,
|
||||||
|
CLOCKER_YES,
|
||||||
|
CLOCKER_NO,
|
||||||
|
_ENUM_END
|
||||||
|
};
|
||||||
|
enum en m_e;
|
||||||
|
// CONSTRUCTOR - note defaults to *UNKNOWN*
|
||||||
|
inline AstVarAttrClocker () : m_e(CLOCKER_UNKNOWN) {}
|
||||||
|
inline AstVarAttrClocker (en _e) : m_e(_e) {}
|
||||||
|
explicit inline AstVarAttrClocker (int _e) : m_e(static_cast<en>(_e)) {}
|
||||||
|
operator en () const { return m_e; }
|
||||||
|
AstVarAttrClocker invert() const {
|
||||||
|
if (m_e==CLOCKER_YES) return CLOCKER_NO;
|
||||||
|
else if (m_e==CLOCKER_NO) return CLOCKER_YES;
|
||||||
|
else return m_e;
|
||||||
|
}
|
||||||
|
const char* ascii() const {
|
||||||
|
static const char* names[] = {
|
||||||
|
"","clker","non_clker"};
|
||||||
|
return names[m_e]; }
|
||||||
|
};
|
||||||
|
inline bool operator== (AstVarAttrClocker lhs, AstVarAttrClocker rhs) { return (lhs.m_e == rhs.m_e); }
|
||||||
|
inline bool operator== (AstVarAttrClocker lhs, AstVarAttrClocker::en rhs) { return (lhs.m_e == rhs); }
|
||||||
|
inline bool operator== (AstVarAttrClocker::en lhs, AstVarAttrClocker rhs) { return (lhs == rhs.m_e); }
|
||||||
|
inline ostream& operator<<(ostream& os, AstVarAttrClocker rhs) { return os<<rhs.ascii(); }
|
||||||
|
|
||||||
|
//######################################################################
|
||||||
|
|
||||||
class VAlwaysKwd {
|
class VAlwaysKwd {
|
||||||
public:
|
public:
|
||||||
enum en {
|
enum en {
|
||||||
@@ -1045,6 +1080,7 @@ public:
|
|||||||
//TODO stomp these width functions out, and call via dtypep() instead
|
//TODO stomp these width functions out, and call via dtypep() instead
|
||||||
int width() const;
|
int width() const;
|
||||||
int widthMin() const;
|
int widthMin() const;
|
||||||
|
int widthMinV() const { return v3Global.widthMinUsage()==VWidthMinUsage::VERILOG_WIDTH ? widthMin() : width(); }
|
||||||
int widthWords() const { return VL_WORDS_I(width()); }
|
int widthWords() const { return VL_WORDS_I(width()); }
|
||||||
bool isQuad() const { return (width()>VL_WORDSIZE && width()<=VL_QUADSIZE); }
|
bool isQuad() const { return (width()>VL_WORDSIZE && width()<=VL_QUADSIZE); }
|
||||||
bool isWide() const { return (width()>VL_QUADSIZE); }
|
bool isWide() const { return (width()>VL_QUADSIZE); }
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+27
-25
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -350,6 +350,27 @@ string AstVar::scType() const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AstVar* AstVar::scVarRecurse(AstNode* nodep) {
|
||||||
|
// See if this is a SC assignment; if so return that type
|
||||||
|
// Historically sc variables are identified by a variable
|
||||||
|
// attribute. TODO it would better be a data type attribute.
|
||||||
|
if (AstVar* anodep = nodep->castVar()) {
|
||||||
|
if (anodep->isSc()) return anodep;
|
||||||
|
else return NULL;
|
||||||
|
}
|
||||||
|
else if (nodep->castVarRef()) {
|
||||||
|
if (nodep->castVarRef()->varp()->isSc()) return nodep->castVarRef()->varp();
|
||||||
|
else return NULL;
|
||||||
|
}
|
||||||
|
else if (nodep->castArraySel()) {
|
||||||
|
if (nodep->op1p()) if (AstVar* p = scVarRecurse(nodep->op1p())) return p;
|
||||||
|
if (nodep->op2p()) if (AstVar* p = scVarRecurse(nodep->op2p())) return p;
|
||||||
|
if (nodep->op3p()) if (AstVar* p = scVarRecurse(nodep->op3p())) return p;
|
||||||
|
if (nodep->op4p()) if (AstVar* p = scVarRecurse(nodep->op4p())) return p;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
AstNodeDType* AstNodeDType::dtypeDimensionp(int dimension) {
|
AstNodeDType* AstNodeDType::dtypeDimensionp(int dimension) {
|
||||||
// dimension passed from AstArraySel::dimension
|
// dimension passed from AstArraySel::dimension
|
||||||
// Dimension 0 means the VAR itself, 1 is the closest SEL to the AstVar,
|
// Dimension 0 means the VAR itself, 1 is the closest SEL to the AstVar,
|
||||||
@@ -485,9 +506,9 @@ string AstScope::nameDotless() const {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
string AstScopeName::scopePrettyName() const {
|
string AstScopeName::scopePrettyNameFormatter(AstText* scopeTextp) const {
|
||||||
string out;
|
string out;
|
||||||
for (AstText* textp=scopeAttrp(); textp; textp=textp->nextp()->castText()) {
|
for (AstText* textp=scopeTextp; textp; textp=textp->nextp()->castText()) {
|
||||||
out += textp->text();
|
out += textp->text();
|
||||||
}
|
}
|
||||||
// TOP will be replaced by top->name()
|
// TOP will be replaced by top->name()
|
||||||
@@ -497,27 +518,9 @@ string AstScopeName::scopePrettyName() const {
|
|||||||
return AstNode::prettyName(out);
|
return AstNode::prettyName(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
string AstScopeName::scopeSymName() const {
|
string AstScopeName::scopeNameFormatter(AstText* scopeTextp) const {
|
||||||
string out;
|
string out;
|
||||||
for (AstText* textp=scopeAttrp(); textp; textp=textp->nextp()->castText()) {
|
for (AstText* textp=scopeTextp; textp; textp=textp->nextp()->castText()) {
|
||||||
out += textp->text();
|
|
||||||
}
|
|
||||||
if (out.substr(0,10) == "__DOT__TOP") out.replace(0,10,"");
|
|
||||||
if (out.substr(0,7) == "__DOT__") out.replace(0,7,"");
|
|
||||||
if (out.substr(0,1) == ".") out.replace(0,1,"");
|
|
||||||
string::size_type pos;
|
|
||||||
while ((pos=out.find(".")) != string::npos) {
|
|
||||||
out.replace(pos, 1, "__");
|
|
||||||
}
|
|
||||||
while ((pos=out.find("__DOT__")) != string::npos) {
|
|
||||||
out.replace(pos, 7, "__");
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
string AstScopeName::scopeDpiName() const {
|
|
||||||
string out;
|
|
||||||
for (AstText* textp=scopeEntrp(); textp; textp=textp->nextp()->castText()) {
|
|
||||||
out += textp->text();
|
out += textp->text();
|
||||||
}
|
}
|
||||||
if (out.substr(0,10) == "__DOT__TOP") out.replace(0,10,"");
|
if (out.substr(0,10) == "__DOT__TOP") out.replace(0,10,"");
|
||||||
@@ -863,7 +866,7 @@ void AstNodeDType::dumpSmall(ostream& str) {
|
|||||||
void AstNodeArrayDType::dumpSmall(ostream& str) {
|
void AstNodeArrayDType::dumpSmall(ostream& str) {
|
||||||
this->AstNodeDType::dumpSmall(str);
|
this->AstNodeDType::dumpSmall(str);
|
||||||
if (castPackArrayDType()) str<<"p"; else str<<"u";
|
if (castPackArrayDType()) str<<"p"; else str<<"u";
|
||||||
str<<" "<<declRange();
|
str<<declRange();
|
||||||
}
|
}
|
||||||
void AstNodeArrayDType::dump(ostream& str) {
|
void AstNodeArrayDType::dump(ostream& str) {
|
||||||
this->AstNodeDType::dump(str);
|
this->AstNodeDType::dump(str);
|
||||||
@@ -918,7 +921,6 @@ void AstTypeTable::dump(ostream& str) {
|
|||||||
for (DetailedMap::const_iterator it = mapr.begin(); it != mapr.end(); ++it) {
|
for (DetailedMap::const_iterator it = mapr.begin(); it != mapr.end(); ++it) {
|
||||||
AstBasicDType* dtypep = it->second;
|
AstBasicDType* dtypep = it->second;
|
||||||
str<<endl; // Newline from caller, so newline first
|
str<<endl; // Newline from caller, so newline first
|
||||||
stringstream nsstr;
|
|
||||||
str<<"\t\tdetailed -> ";
|
str<<"\t\tdetailed -> ";
|
||||||
dtypep->dump(str);
|
dtypep->dump(str);
|
||||||
}
|
}
|
||||||
|
|||||||
+34
-11
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -103,7 +103,7 @@ public:
|
|||||||
return num().isCaseEq(samep->castConst()->num()); }
|
return num().isCaseEq(samep->castConst()->num()); }
|
||||||
virtual int instrCount() const { return widthInstrs(); }
|
virtual int instrCount() const { return widthInstrs(); }
|
||||||
bool isEqAllOnes() const { return num().isEqAllOnes(width()); }
|
bool isEqAllOnes() const { return num().isEqAllOnes(width()); }
|
||||||
bool isEqAllOnesV() const { return num().isEqAllOnes(widthMin()); }
|
bool isEqAllOnesV() const { return num().isEqAllOnes(widthMinV()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
class AstRange : public AstNode {
|
class AstRange : public AstNode {
|
||||||
@@ -434,7 +434,7 @@ public:
|
|||||||
virtual AstBasicDType* basicp() const { return subDTypep()->basicp(); } // (Slow) recurse down to find basic data type
|
virtual AstBasicDType* basicp() const { return subDTypep()->basicp(); } // (Slow) recurse down to find basic data type
|
||||||
virtual AstNodeDType* skipRefp() const { return subDTypep()->skipRefp(); }
|
virtual AstNodeDType* skipRefp() const { return subDTypep()->skipRefp(); }
|
||||||
virtual AstNodeDType* skipRefToConstp() const { return (AstNodeDType*)this; }
|
virtual AstNodeDType* skipRefToConstp() const { return (AstNodeDType*)this; }
|
||||||
virtual AstNodeDType* skipRefToEnump() const { return (AstNodeDType*)this; }
|
virtual AstNodeDType* skipRefToEnump() const { return subDTypep()->skipRefToEnump(); }
|
||||||
virtual int widthAlignBytes() const { return subDTypep()->widthAlignBytes(); }
|
virtual int widthAlignBytes() const { return subDTypep()->widthAlignBytes(); }
|
||||||
virtual int widthTotalBytes() const { return subDTypep()->widthTotalBytes(); }
|
virtual int widthTotalBytes() const { return subDTypep()->widthTotalBytes(); }
|
||||||
};
|
};
|
||||||
@@ -594,7 +594,7 @@ public:
|
|||||||
AstNodeDType* dtypeSkipRefp() const { return subDTypep()->skipRefp(); } // op1 = Range of variable (Note don't need virtual - AstVar isn't a NodeDType)
|
AstNodeDType* dtypeSkipRefp() const { return subDTypep()->skipRefp(); } // op1 = Range of variable (Note don't need virtual - AstVar isn't a NodeDType)
|
||||||
virtual AstNodeDType* skipRefp() const { return subDTypep()->skipRefp(); }
|
virtual AstNodeDType* skipRefp() const { return subDTypep()->skipRefp(); }
|
||||||
virtual AstNodeDType* skipRefToConstp() const { return subDTypep()->skipRefToConstp(); }
|
virtual AstNodeDType* skipRefToConstp() const { return subDTypep()->skipRefToConstp(); }
|
||||||
virtual AstNodeDType* skipRefToEnump() const { return (AstNodeDType*)this; }
|
virtual AstNodeDType* skipRefToEnump() const { return subDTypep()->skipRefToEnump(); }
|
||||||
virtual int widthAlignBytes() const { return subDTypep()->widthAlignBytes(); } // (Slow) recurses - Structure alignment 1,2,4 or 8 bytes (arrays affect this)
|
virtual int widthAlignBytes() const { return subDTypep()->widthAlignBytes(); } // (Slow) recurses - Structure alignment 1,2,4 or 8 bytes (arrays affect this)
|
||||||
virtual int widthTotalBytes() const { return subDTypep()->widthTotalBytes(); } // (Slow) recurses - Width in bytes rounding up 1,2,4,8,12,...
|
virtual int widthTotalBytes() const { return subDTypep()->widthTotalBytes(); } // (Slow) recurses - Width in bytes rounding up 1,2,4,8,12,...
|
||||||
// METHODS
|
// METHODS
|
||||||
@@ -942,6 +942,7 @@ private:
|
|||||||
bool m_isIfaceParent:1; // dtype is reference to interface present in this module
|
bool m_isIfaceParent:1; // dtype is reference to interface present in this module
|
||||||
bool m_noSubst:1; // Do not substitute out references
|
bool m_noSubst:1; // Do not substitute out references
|
||||||
bool m_trace:1; // Trace this variable
|
bool m_trace:1; // Trace this variable
|
||||||
|
AstVarAttrClocker m_attrClocker;
|
||||||
|
|
||||||
void init() {
|
void init() {
|
||||||
m_input=false; m_output=false; m_tristate=false; m_declOutput=false;
|
m_input=false; m_output=false; m_tristate=false; m_declOutput=false;
|
||||||
@@ -952,8 +953,7 @@ private:
|
|||||||
m_funcLocal=false; m_funcReturn=false;
|
m_funcLocal=false; m_funcReturn=false;
|
||||||
m_attrClockEn=false; m_attrScBv=false; m_attrIsolateAssign=false; m_attrSFormat=false;
|
m_attrClockEn=false; m_attrScBv=false; m_attrIsolateAssign=false; m_attrSFormat=false;
|
||||||
m_fileDescr=false; m_isConst=false; m_isStatic=false; m_isPulldown=false; m_isPullup=false;
|
m_fileDescr=false; m_isConst=false; m_isStatic=false; m_isPulldown=false; m_isPullup=false;
|
||||||
m_isIfaceParent=false;
|
m_isIfaceParent=false; m_attrClocker=AstVarAttrClocker::CLOCKER_UNKNOWN; m_noSubst=false;
|
||||||
m_noSubst=false;
|
|
||||||
m_trace=false;
|
m_trace=false;
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
@@ -1026,6 +1026,7 @@ public:
|
|||||||
void childDTypep(AstNodeDType* nodep) { setOp1p(nodep); }
|
void childDTypep(AstNodeDType* nodep) { setOp1p(nodep); }
|
||||||
AstNodeDType* subDTypep() const { return dtypep() ? dtypep() : childDTypep(); }
|
AstNodeDType* subDTypep() const { return dtypep() ? dtypep() : childDTypep(); }
|
||||||
void attrClockEn(bool flag) { m_attrClockEn = flag; }
|
void attrClockEn(bool flag) { m_attrClockEn = flag; }
|
||||||
|
void attrClocker(AstVarAttrClocker flag) { m_attrClocker = flag; }
|
||||||
void attrFileDescr(bool flag) { m_fileDescr = flag; }
|
void attrFileDescr(bool flag) { m_fileDescr = flag; }
|
||||||
void attrScClocked(bool flag) { m_scClocked = flag; }
|
void attrScClocked(bool flag) { m_scClocked = flag; }
|
||||||
void attrScBv(bool flag) { m_attrScBv = flag; }
|
void attrScBv(bool flag) { m_attrScBv = flag; }
|
||||||
@@ -1105,6 +1106,7 @@ public:
|
|||||||
bool attrScClocked() const { return m_scClocked; }
|
bool attrScClocked() const { return m_scClocked; }
|
||||||
bool attrSFormat() const { return m_attrSFormat; }
|
bool attrSFormat() const { return m_attrSFormat; }
|
||||||
bool attrIsolateAssign() const { return m_attrIsolateAssign; }
|
bool attrIsolateAssign() const { return m_attrIsolateAssign; }
|
||||||
|
AstVarAttrClocker attrClocker() const { return m_attrClocker; }
|
||||||
virtual string verilogKwd() const;
|
virtual string verilogKwd() const;
|
||||||
void propagateAttrFrom(AstVar* fromp) {
|
void propagateAttrFrom(AstVar* fromp) {
|
||||||
// This is getting connected to fromp; keep attributes
|
// This is getting connected to fromp; keep attributes
|
||||||
@@ -1132,6 +1134,7 @@ public:
|
|||||||
if (varType()==AstVarType::INOUT) m_varType = AstVarType::TRIWIRE;
|
if (varType()==AstVarType::INOUT) m_varType = AstVarType::TRIWIRE;
|
||||||
if (varType()==AstVarType::INPUT || varType()==AstVarType::OUTPUT) m_varType = AstVarType::WIRE;
|
if (varType()==AstVarType::INPUT || varType()==AstVarType::OUTPUT) m_varType = AstVarType::WIRE;
|
||||||
}
|
}
|
||||||
|
static AstVar* scVarRecurse(AstNode* nodep);
|
||||||
};
|
};
|
||||||
|
|
||||||
class AstDefParam : public AstNode {
|
class AstDefParam : public AstNode {
|
||||||
@@ -3064,6 +3067,8 @@ class AstScopeName : public AstNodeMath {
|
|||||||
// Children: TEXT
|
// Children: TEXT
|
||||||
private:
|
private:
|
||||||
bool m_dpiExport; // Is for dpiExport
|
bool m_dpiExport; // Is for dpiExport
|
||||||
|
string scopeNameFormatter(AstText* textp) const;
|
||||||
|
string scopePrettyNameFormatter(AstText* textp) const;
|
||||||
public:
|
public:
|
||||||
AstScopeName(FileLine* fl) : AstNodeMath(fl), m_dpiExport(false) {
|
AstScopeName(FileLine* fl) : AstNodeMath(fl), m_dpiExport(false) {
|
||||||
dtypeSetUInt64(); }
|
dtypeSetUInt64(); }
|
||||||
@@ -3077,9 +3082,10 @@ public:
|
|||||||
void scopeAttrp(AstNode* nodep) { addOp1p(nodep); }
|
void scopeAttrp(AstNode* nodep) { addOp1p(nodep); }
|
||||||
AstText* scopeEntrp() const { return op2p()->castText(); }
|
AstText* scopeEntrp() const { return op2p()->castText(); }
|
||||||
void scopeEntrp(AstNode* nodep) { addOp2p(nodep); }
|
void scopeEntrp(AstNode* nodep) { addOp2p(nodep); }
|
||||||
string scopeSymName() const; // Name for __Vscope variable including children
|
string scopeSymName() const { return scopeNameFormatter(scopeAttrp()); } // Name for __Vscope variable including children
|
||||||
string scopeDpiName() const; // Name for DPI import scope
|
string scopeDpiName() const { return scopeNameFormatter(scopeEntrp()); } // Name for DPI import scope
|
||||||
string scopePrettyName() const; // Name for __Vscope printing
|
string scopePrettySymName() const { return scopePrettyNameFormatter(scopeAttrp()); } // Name for __Vscope variable including children
|
||||||
|
string scopePrettyDpiName() const { return scopePrettyNameFormatter(scopeEntrp()); } // Name for __Vscope variable including children
|
||||||
bool dpiExport() const { return m_dpiExport; }
|
bool dpiExport() const { return m_dpiExport; }
|
||||||
void dpiExport(bool flag) { m_dpiExport=flag; }
|
void dpiExport(bool flag) { m_dpiExport=flag; }
|
||||||
};
|
};
|
||||||
@@ -3307,7 +3313,8 @@ public:
|
|||||||
dtypeSetLogicSized(width,width,AstNumeric::UNSIGNED); }
|
dtypeSetLogicSized(width,width,AstNumeric::UNSIGNED); }
|
||||||
ASTNODE_NODE_FUNCS(ExtendS, EXTENDS)
|
ASTNODE_NODE_FUNCS(ExtendS, EXTENDS)
|
||||||
virtual void numberOperate(V3Number& out, const V3Number& lhs) {
|
virtual void numberOperate(V3Number& out, const V3Number& lhs) {
|
||||||
out.opExtendS(lhs, lhsp()->widthMin()); }
|
out.opExtendS(lhs, lhsp()->widthMinV());
|
||||||
|
}
|
||||||
virtual string emitVerilog() { return "%l"; }
|
virtual string emitVerilog() { return "%l"; }
|
||||||
virtual string emitC() { return "VL_EXTENDS_%nq%lq(%nw,%lw, %P, %li)"; }
|
virtual string emitC() { return "VL_EXTENDS_%nq%lq(%nw,%lw, %P, %li)"; }
|
||||||
virtual bool cleanOut() {return false;} virtual bool cleanLhs() {return true;}
|
virtual bool cleanOut() {return false;} virtual bool cleanLhs() {return true;}
|
||||||
@@ -3485,6 +3492,21 @@ public:
|
|||||||
AstNodeDType* childDTypep() const { return op2p()->castNodeDType(); }
|
AstNodeDType* childDTypep() const { return op2p()->castNodeDType(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class AstCastParse : public AstNode {
|
||||||
|
// Cast to appropriate type, where we haven't determined yet what the data type is
|
||||||
|
public:
|
||||||
|
AstCastParse(FileLine* fl, AstNode* lhsp, AstNode* dtp) : AstNode(fl) {
|
||||||
|
setOp1p(lhsp); setOp2p(dtp);
|
||||||
|
}
|
||||||
|
ASTNODE_NODE_FUNCS(CastParse, CASTPARSE)
|
||||||
|
virtual string emitVerilog() { return "((%d)'(%l))"; }
|
||||||
|
virtual string emitC() { V3ERROR_NA; return ""; }
|
||||||
|
virtual bool cleanOut() { V3ERROR_NA; return true;} virtual bool cleanLhs() {return true;}
|
||||||
|
virtual bool sizeMattersLhs() {return false;}
|
||||||
|
AstNode* lhsp() const { return op1p(); }
|
||||||
|
AstNode* dtp() const { return op2p(); }
|
||||||
|
};
|
||||||
|
|
||||||
class AstCastSize : public AstNode {
|
class AstCastSize : public AstNode {
|
||||||
// Cast to specific size; signed/twostate inherited from lower element per IEEE
|
// Cast to specific size; signed/twostate inherited from lower element per IEEE
|
||||||
public:
|
public:
|
||||||
@@ -3492,6 +3514,7 @@ public:
|
|||||||
setOp1p(lhsp); setOp2p(rhsp);
|
setOp1p(lhsp); setOp2p(rhsp);
|
||||||
}
|
}
|
||||||
ASTNODE_NODE_FUNCS(CastSize, CASTSIZE)
|
ASTNODE_NODE_FUNCS(CastSize, CASTSIZE)
|
||||||
|
// No hasDType because widthing removes this node before the hasDType check
|
||||||
virtual string emitVerilog() { return "((%r)'(%l))"; }
|
virtual string emitVerilog() { return "((%r)'(%l))"; }
|
||||||
virtual string emitC() { V3ERROR_NA; return ""; }
|
virtual string emitC() { V3ERROR_NA; return ""; }
|
||||||
virtual bool cleanOut() { V3ERROR_NA; return true;} virtual bool cleanLhs() {return true;}
|
virtual bool cleanOut() { V3ERROR_NA; return true;} virtual bool cleanLhs() {return true;}
|
||||||
@@ -4132,7 +4155,7 @@ public:
|
|||||||
}
|
}
|
||||||
ASTNODE_NODE_FUNCS(ShiftRS, SHIFTRS)
|
ASTNODE_NODE_FUNCS(ShiftRS, SHIFTRS)
|
||||||
virtual void numberOperate(V3Number& out, const V3Number& lhs, const V3Number& rhs) {
|
virtual void numberOperate(V3Number& out, const V3Number& lhs, const V3Number& rhs) {
|
||||||
out.opShiftRS(lhs,rhs,lhsp()->widthMin()); }
|
out.opShiftRS(lhs,rhs,lhsp()->widthMinV()); }
|
||||||
virtual string emitVerilog() { return "%k(%l %f>>> %r)"; }
|
virtual string emitVerilog() { return "%k(%l %f>>> %r)"; }
|
||||||
virtual string emitC() { return "VL_SHIFTRS_%nq%lq%rq(%nw,%lw,%rw, %P, %li, %ri)"; }
|
virtual string emitC() { return "VL_SHIFTRS_%nq%lq%rq(%nw,%lw,%rw, %P, %li, %ri)"; }
|
||||||
virtual string emitSimpleOperator() { return ""; }
|
virtual string emitSimpleOperator() { return ""; }
|
||||||
|
|||||||
+2
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -271,4 +271,5 @@ void V3Begin::debeginAll(AstNetlist* nodep) {
|
|||||||
if (state.anyFuncInBegin()) {
|
if (state.anyFuncInBegin()) {
|
||||||
BeginRelinkVisitor brvisitor (nodep,&state);
|
BeginRelinkVisitor brvisitor (nodep,&state);
|
||||||
}
|
}
|
||||||
|
V3Global::dumpCheckGlobalTree("begin.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+9
-12
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -204,6 +204,12 @@ public:
|
|||||||
|
|
||||||
class BrokenCheckVisitor : public AstNVisitor {
|
class BrokenCheckVisitor : public AstNVisitor {
|
||||||
private:
|
private:
|
||||||
|
void checkWidthMin(AstNode* nodep) {
|
||||||
|
if (nodep->width() != nodep->widthMin()
|
||||||
|
&& v3Global.widthMinUsage()==VWidthMinUsage::MATCHES_WIDTH) {
|
||||||
|
nodep->v3fatalSrc("Width != WidthMin");
|
||||||
|
}
|
||||||
|
}
|
||||||
virtual void visit(AstNode* nodep, AstNUser*) {
|
virtual void visit(AstNode* nodep, AstNUser*) {
|
||||||
BrokenTable::setUnder(nodep,true);
|
BrokenTable::setUnder(nodep,true);
|
||||||
if (const char* whyp=nodep->broken()) {
|
if (const char* whyp=nodep->broken()) {
|
||||||
@@ -220,18 +226,9 @@ private:
|
|||||||
if (nodep->dtypep()) nodep->v3fatalSrc("DType on node without hasDType(): "<<nodep->prettyTypeName());
|
if (nodep->dtypep()) nodep->v3fatalSrc("DType on node without hasDType(): "<<nodep->prettyTypeName());
|
||||||
}
|
}
|
||||||
if (nodep->getChildDTypep()) nodep->v3fatalSrc("childDTypep() non-null on node after should have removed");
|
if (nodep->getChildDTypep()) nodep->v3fatalSrc("childDTypep() non-null on node after should have removed");
|
||||||
if (AstNodeDType* dnodep = nodep->castNodeDType()) {
|
if (AstNodeDType* dnodep = nodep->castNodeDType()) checkWidthMin(dnodep);
|
||||||
if (dnodep->width() != dnodep->widthMin()
|
|
||||||
&& v3Global.assertWidthsMatch()) {
|
|
||||||
dnodep->v3fatalSrc("Width != WidthMin");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (v3Global.assertWidthsMatch()) {
|
|
||||||
if (nodep->width() != nodep->widthMin()) {
|
|
||||||
nodep->v3fatalSrc("Width != WidthMin");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
checkWidthMin(nodep);
|
||||||
nodep->iterateChildrenConst(*this);
|
nodep->iterateChildrenConst(*this);
|
||||||
BrokenTable::setUnder(nodep,false);
|
BrokenTable::setUnder(nodep,false);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+4
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -411,6 +411,7 @@ private:
|
|||||||
AstNode* itemexprp = ifexprp; ifexprp=NULL;
|
AstNode* itemexprp = ifexprp; ifexprp=NULL;
|
||||||
if (depth == (CASE_ENCODER_GROUP_DEPTH)) { // End of group - can skip the condition
|
if (depth == (CASE_ENCODER_GROUP_DEPTH)) { // End of group - can skip the condition
|
||||||
itemexprp->deleteTree(); itemexprp=NULL;
|
itemexprp->deleteTree(); itemexprp=NULL;
|
||||||
|
// cppcheck-suppress redundantAssignment
|
||||||
itemexprp = new AstConst(itemp->fileline(), AstConst::LogicTrue());
|
itemexprp = new AstConst(itemp->fileline(), AstConst::LogicTrue());
|
||||||
}
|
}
|
||||||
AstIf* newp = new AstIf(itemp->fileline(), itemexprp, istmtsp, NULL);
|
AstIf* newp = new AstIf(itemp->fileline(), itemexprp, istmtsp, NULL);
|
||||||
@@ -462,6 +463,7 @@ private:
|
|||||||
replaceCaseFast(nodep); nodep=NULL;
|
replaceCaseFast(nodep); nodep=NULL;
|
||||||
} else {
|
} else {
|
||||||
++m_statCaseSlow;
|
++m_statCaseSlow;
|
||||||
|
// cppcheck-supporess uselessAssignmentPtrArg
|
||||||
replaceCaseComplicated(nodep); nodep=NULL;
|
replaceCaseComplicated(nodep); nodep=NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -489,6 +491,7 @@ public:
|
|||||||
void V3Case::caseAll(AstNetlist* nodep) {
|
void V3Case::caseAll(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
CaseVisitor visitor (nodep);
|
CaseVisitor visitor (nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("case.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
void V3Case::caseLint(AstNodeCase* nodep) {
|
void V3Case::caseLint(AstNodeCase* nodep) {
|
||||||
UINFO(4,__FUNCTION__<<": "<<endl);
|
UINFO(4,__FUNCTION__<<": "<<endl);
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+3
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2004-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2004-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -149,6 +149,7 @@ private:
|
|||||||
if (!nodep->lvalue()
|
if (!nodep->lvalue()
|
||||||
&& !nodep->backp()->castCCast()
|
&& !nodep->backp()->castCCast()
|
||||||
&& nodep->backp()->castNodeMath()
|
&& nodep->backp()->castNodeMath()
|
||||||
|
&& !nodep->backp()->castArraySel()
|
||||||
&& nodep->backp()->width()
|
&& nodep->backp()->width()
|
||||||
&& castSize(nodep) != castSize(nodep->varp())) {
|
&& castSize(nodep) != castSize(nodep->varp())) {
|
||||||
// Cast vars to IData first, else below has upper bits wrongly set
|
// Cast vars to IData first, else below has upper bits wrongly set
|
||||||
@@ -187,4 +188,5 @@ public:
|
|||||||
void V3Cast::castAll(AstNetlist* nodep) {
|
void V3Cast::castAll(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
CastVisitor visitor (nodep);
|
CastVisitor visitor (nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("cast.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2004-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2004-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+143
-77
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -43,6 +43,130 @@
|
|||||||
#include "V3Changed.h"
|
#include "V3Changed.h"
|
||||||
#include "V3EmitCBase.h"
|
#include "V3EmitCBase.h"
|
||||||
|
|
||||||
|
//######################################################################
|
||||||
|
|
||||||
|
class ChangedState {
|
||||||
|
public:
|
||||||
|
// STATE
|
||||||
|
AstNodeModule* m_topModp; // Top module
|
||||||
|
AstScope* m_scopetopp; // Scope under TOPSCOPE
|
||||||
|
AstCFunc* m_chgFuncp; // Change function we're building
|
||||||
|
ChangedState() {
|
||||||
|
m_topModp = NULL;
|
||||||
|
m_chgFuncp = NULL;
|
||||||
|
m_scopetopp = NULL;
|
||||||
|
}
|
||||||
|
~ChangedState() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
//######################################################################
|
||||||
|
// Utility visitor to find elements to be compared
|
||||||
|
|
||||||
|
class ChangedInsertVisitor : public AstNVisitor {
|
||||||
|
private:
|
||||||
|
// STATE
|
||||||
|
ChangedState* m_statep; // Shared state across visitors
|
||||||
|
AstVarScope* m_vscp; // Original (non-change) variable we're change-detecting
|
||||||
|
AstVarScope* m_newvscp; // New (change detect) variable we're change-detecting
|
||||||
|
AstNode* m_varEqnp; // Original var's equation to get var value
|
||||||
|
AstNode* m_newLvEqnp; // New var's equation to read value
|
||||||
|
AstNode* m_newRvEqnp; // New var's equation to set value
|
||||||
|
uint32_t m_detects; // # detects created
|
||||||
|
|
||||||
|
// CONSTANTS
|
||||||
|
enum MiscConsts {
|
||||||
|
DETECTARRAY_MAX_INDEXES = 256 // How many indexes before error
|
||||||
|
// Ok to increase this, but may result in much slower model
|
||||||
|
};
|
||||||
|
|
||||||
|
void newChangeDet() {
|
||||||
|
if (++m_detects > DETECTARRAY_MAX_INDEXES) {
|
||||||
|
m_vscp->v3warn(E_DETECTARRAY, "Unsupported: Can't detect more than "<<cvtToStr(DETECTARRAY_MAX_INDEXES)
|
||||||
|
<<" array indexes (probably with UNOPTFLAT warning suppressed): "<<m_vscp->prettyName()<<endl
|
||||||
|
<<m_vscp->warnMore()
|
||||||
|
<<"... Could recompile with DETECTARRAY_MAX_INDEXES increased"<<endl);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
AstChangeDet* changep = new AstChangeDet (m_vscp->fileline(),
|
||||||
|
m_varEqnp->cloneTree(true),
|
||||||
|
m_newRvEqnp->cloneTree(true), false);
|
||||||
|
m_statep->m_chgFuncp->addStmtsp(changep);
|
||||||
|
AstAssign* initp = new AstAssign (m_vscp->fileline(),
|
||||||
|
m_newLvEqnp->cloneTree(true),
|
||||||
|
m_varEqnp->cloneTree(true));
|
||||||
|
m_statep->m_chgFuncp->addFinalsp(initp);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void visit(AstBasicDType* nodep, AstNUser*) {
|
||||||
|
newChangeDet();
|
||||||
|
}
|
||||||
|
virtual void visit(AstPackArrayDType* nodep, AstNUser*) {
|
||||||
|
newChangeDet();
|
||||||
|
}
|
||||||
|
virtual void visit(AstUnpackArrayDType* nodep, AstNUser*) {
|
||||||
|
for (int index=0; index < nodep->elementsConst(); ++index) {
|
||||||
|
AstNode* origVEp = m_varEqnp;
|
||||||
|
AstNode* origNLEp = m_newLvEqnp;
|
||||||
|
AstNode* origNREp = m_newRvEqnp;
|
||||||
|
|
||||||
|
m_varEqnp = new AstArraySel(nodep->fileline(), m_varEqnp->cloneTree(true), index);
|
||||||
|
m_newLvEqnp = new AstArraySel(nodep->fileline(), m_newLvEqnp->cloneTree(true), index);
|
||||||
|
m_newRvEqnp = new AstArraySel(nodep->fileline(), m_newRvEqnp->cloneTree(true), index);
|
||||||
|
|
||||||
|
nodep->subDTypep()->skipRefp()->accept(*this);
|
||||||
|
|
||||||
|
m_varEqnp->deleteTree();
|
||||||
|
m_newLvEqnp->deleteTree();
|
||||||
|
m_newRvEqnp->deleteTree();
|
||||||
|
|
||||||
|
m_varEqnp = origVEp;
|
||||||
|
m_newLvEqnp = origNLEp;
|
||||||
|
m_newRvEqnp = origNREp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
virtual void visit(AstNodeClassDType* nodep, AstNUser*) {
|
||||||
|
if (nodep->packedUnsup()) {
|
||||||
|
newChangeDet();
|
||||||
|
} else {
|
||||||
|
if (debug()) nodep->dumpTree(cout,"-DETECTARRAY-class-");
|
||||||
|
m_vscp->v3warn(E_DETECTARRAY, "Unsupported: Can't detect changes on complex variable (probably with UNOPTFLAT warning suppressed): "<<m_vscp->varp()->prettyName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
virtual void visit(AstNode* nodep, AstNUser*) {
|
||||||
|
nodep->iterateChildren(*this);
|
||||||
|
if (debug()) nodep->dumpTree(cout,"-DETECTARRAY-general-");
|
||||||
|
m_vscp->v3warn(E_DETECTARRAY, "Unsupported: Can't detect changes on complex variable (probably with UNOPTFLAT warning suppressed): "<<m_vscp->varp()->prettyName());
|
||||||
|
}
|
||||||
|
public:
|
||||||
|
// CONSTUCTORS
|
||||||
|
ChangedInsertVisitor(AstVarScope* vscp, ChangedState* statep) {
|
||||||
|
m_statep = statep;
|
||||||
|
m_vscp = vscp;
|
||||||
|
m_detects = 0;
|
||||||
|
{
|
||||||
|
AstVar* varp = m_vscp->varp();
|
||||||
|
string newvarname = "__Vchglast__"+m_vscp->scopep()->nameDotless()+"__"+varp->shortName();
|
||||||
|
// Create: VARREF(_last)
|
||||||
|
// ASSIGN(VARREF(_last), VARREF(var))
|
||||||
|
// ...
|
||||||
|
// CHANGEDET(VARREF(_last), VARREF(var))
|
||||||
|
AstVar* newvarp = new AstVar (varp->fileline(), AstVarType::MODULETEMP, newvarname, varp);
|
||||||
|
m_statep->m_topModp->addStmtp(newvarp);
|
||||||
|
m_newvscp = new AstVarScope(m_vscp->fileline(), m_statep->m_scopetopp, newvarp);
|
||||||
|
m_statep->m_scopetopp->addVarp(m_newvscp);
|
||||||
|
|
||||||
|
m_varEqnp = new AstVarRef(m_vscp->fileline(), m_vscp, false);
|
||||||
|
m_newLvEqnp = new AstVarRef(m_vscp->fileline(), m_newvscp, true);
|
||||||
|
m_newRvEqnp = new AstVarRef(m_vscp->fileline(), m_newvscp, false);
|
||||||
|
}
|
||||||
|
vscp->dtypep()->skipRefp()->accept(*this);
|
||||||
|
m_varEqnp->deleteTree();
|
||||||
|
m_newLvEqnp->deleteTree();
|
||||||
|
m_newRvEqnp->deleteTree();
|
||||||
|
}
|
||||||
|
virtual ~ChangedInsertVisitor() {}
|
||||||
|
};
|
||||||
|
|
||||||
//######################################################################
|
//######################################################################
|
||||||
// Changed state, as a visitor of each AstNode
|
// Changed state, as a visitor of each AstNode
|
||||||
|
|
||||||
@@ -54,15 +178,7 @@ private:
|
|||||||
AstUser1InUse m_inuser1;
|
AstUser1InUse m_inuser1;
|
||||||
|
|
||||||
// STATE
|
// STATE
|
||||||
AstNodeModule* m_topModp; // Top module
|
ChangedState* m_statep; // Shared state across visitors
|
||||||
AstScope* m_scopetopp; // Scope under TOPSCOPE
|
|
||||||
AstCFunc* m_chgFuncp; // Change function we're building
|
|
||||||
|
|
||||||
// CONSTANTS
|
|
||||||
enum MiscConsts {
|
|
||||||
DETECTARRAY_MAX_INDEXES = 256 // How many indexes before error
|
|
||||||
// Ok to increase this, but may result in much slower model
|
|
||||||
};
|
|
||||||
|
|
||||||
// METHODS
|
// METHODS
|
||||||
static int debug() {
|
static int debug() {
|
||||||
@@ -71,69 +187,16 @@ private:
|
|||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
|
|
||||||
AstNode* aselIfNeeded(bool isArray, int index, AstNode* childp) {
|
|
||||||
if (isArray) {
|
|
||||||
return new AstArraySel(childp->fileline(), childp,
|
|
||||||
new AstConst(childp->fileline(), index));
|
|
||||||
} else {
|
|
||||||
return childp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void genChangeDet(AstVarScope* vscp) {
|
void genChangeDet(AstVarScope* vscp) {
|
||||||
AstVar* varp = vscp->varp();
|
|
||||||
vscp->v3warn(IMPERFECTSCH,"Imperfect scheduling of variable: "<<vscp);
|
vscp->v3warn(IMPERFECTSCH,"Imperfect scheduling of variable: "<<vscp);
|
||||||
AstUnpackArrayDType* uarrayp = varp->dtypeSkipRefp()->castUnpackArrayDType();
|
ChangedInsertVisitor visitor (vscp, m_statep);
|
||||||
AstPackArrayDType* parrayp = varp->dtypeSkipRefp()->castPackArrayDType();
|
|
||||||
AstNodeClassDType *classp = varp->dtypeSkipRefp()->castNodeClassDType();
|
|
||||||
bool isUnpackArray = uarrayp;
|
|
||||||
bool isPackArray = parrayp;
|
|
||||||
bool isClass = classp && classp->packedUnsup();
|
|
||||||
int elements = isUnpackArray ? uarrayp->elementsConst() : 1;
|
|
||||||
if (isUnpackArray && (elements > DETECTARRAY_MAX_INDEXES)) {
|
|
||||||
vscp->v3warn(E_DETECTARRAY, "Unsupported: Can't detect more than "<<cvtToStr(DETECTARRAY_MAX_INDEXES)
|
|
||||||
<<" array indexes (probably with UNOPTFLAT warning suppressed): "<<varp->prettyName()<<endl
|
|
||||||
<<vscp->warnMore()
|
|
||||||
<<"... Could recompile with DETECTARRAY_MAX_INDEXES increased to at least "<<cvtToStr(elements));
|
|
||||||
} else if (!isUnpackArray && !isClass && !isPackArray
|
|
||||||
&& !varp->dtypeSkipRefp()->castBasicDType()) {
|
|
||||||
if (debug()) varp->dumpTree(cout,"-DETECTARRAY-");
|
|
||||||
vscp->v3warn(E_DETECTARRAY, "Unsupported: Can't detect changes on complex variable (probably with UNOPTFLAT warning suppressed): "<<varp->prettyName());
|
|
||||||
} else {
|
|
||||||
string newvarname = "__Vchglast__"+vscp->scopep()->nameDotless()+"__"+varp->shortName();
|
|
||||||
// Create: VARREF(_last)
|
|
||||||
// ASSIGN(VARREF(_last), VARREF(var))
|
|
||||||
// ...
|
|
||||||
// CHANGEDET(VARREF(_last), VARREF(var))
|
|
||||||
AstVar* newvarp = new AstVar (varp->fileline(), AstVarType::MODULETEMP, newvarname, varp);
|
|
||||||
m_topModp->addStmtp(newvarp);
|
|
||||||
AstVarScope* newvscp = new AstVarScope(vscp->fileline(), m_scopetopp, newvarp);
|
|
||||||
m_scopetopp->addVarp(newvscp);
|
|
||||||
for (int index=0; index<elements; ++index) {
|
|
||||||
AstChangeDet* changep
|
|
||||||
= new AstChangeDet (vscp->fileline(),
|
|
||||||
aselIfNeeded(isUnpackArray, index,
|
|
||||||
new AstVarRef(vscp->fileline(), vscp, false)),
|
|
||||||
aselIfNeeded(isUnpackArray, index,
|
|
||||||
new AstVarRef(vscp->fileline(), newvscp, false)),
|
|
||||||
false);
|
|
||||||
m_chgFuncp->addStmtsp(changep);
|
|
||||||
AstAssign* initp
|
|
||||||
= new AstAssign (vscp->fileline(),
|
|
||||||
aselIfNeeded(isUnpackArray, index,
|
|
||||||
new AstVarRef(vscp->fileline(), newvscp, true)),
|
|
||||||
aselIfNeeded(isUnpackArray, index,
|
|
||||||
new AstVarRef(vscp->fileline(), vscp, false)));
|
|
||||||
m_chgFuncp->addFinalsp(initp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// VISITORS
|
// VISITORS
|
||||||
virtual void visit(AstNodeModule* nodep, AstNUser*) {
|
virtual void visit(AstNodeModule* nodep, AstNUser*) {
|
||||||
UINFO(4," MOD "<<nodep<<endl);
|
UINFO(4," MOD "<<nodep<<endl);
|
||||||
if (nodep->isTop()) {
|
if (nodep->isTop()) {
|
||||||
m_topModp = nodep;
|
m_statep->m_topModp = nodep;
|
||||||
}
|
}
|
||||||
nodep->iterateChildren(*this);
|
nodep->iterateChildren(*this);
|
||||||
}
|
}
|
||||||
@@ -144,15 +207,15 @@ private:
|
|||||||
// Create the change detection function
|
// Create the change detection function
|
||||||
AstScope* scopep = nodep->scopep();
|
AstScope* scopep = nodep->scopep();
|
||||||
if (!scopep) nodep->v3fatalSrc("No scope found on top level, perhaps you have no statements?\n");
|
if (!scopep) nodep->v3fatalSrc("No scope found on top level, perhaps you have no statements?\n");
|
||||||
m_scopetopp = scopep;
|
m_statep->m_scopetopp = scopep;
|
||||||
// Create change detection function
|
// Create change detection function
|
||||||
m_chgFuncp = new AstCFunc(nodep->fileline(), "_change_request", scopep, "QData");
|
m_statep->m_chgFuncp = new AstCFunc(nodep->fileline(), "_change_request", scopep, "QData");
|
||||||
m_chgFuncp->argTypes(EmitCBaseVisitor::symClassVar());
|
m_statep->m_chgFuncp->argTypes(EmitCBaseVisitor::symClassVar());
|
||||||
m_chgFuncp->symProlog(true);
|
m_statep->m_chgFuncp->symProlog(true);
|
||||||
m_chgFuncp->declPrivate(true);
|
m_statep->m_chgFuncp->declPrivate(true);
|
||||||
m_scopetopp->addActivep(m_chgFuncp);
|
m_statep->m_scopetopp->addActivep(m_statep->m_chgFuncp);
|
||||||
// We need at least one change detect so we know to emit the correct code
|
// We need at least one change detect so we know to emit the correct code
|
||||||
m_chgFuncp->addStmtsp(new AstChangeDet(nodep->fileline(), NULL, NULL, false));
|
m_statep->m_chgFuncp->addStmtsp(new AstChangeDet(nodep->fileline(), NULL, NULL, false));
|
||||||
//
|
//
|
||||||
nodep->iterateChildren(*this);
|
nodep->iterateChildren(*this);
|
||||||
}
|
}
|
||||||
@@ -164,6 +227,9 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
virtual void visit(AstNodeMath* nodep, AstNUser*) {
|
||||||
|
// Short-circuit
|
||||||
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
// Default: Just iterate
|
||||||
virtual void visit(AstNode* nodep, AstNUser*) {
|
virtual void visit(AstNode* nodep, AstNUser*) {
|
||||||
@@ -172,10 +238,8 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTUCTORS
|
// CONSTUCTORS
|
||||||
ChangedVisitor(AstNetlist* nodep) {
|
ChangedVisitor(AstNetlist* nodep, ChangedState* statep) {
|
||||||
m_topModp = NULL;
|
m_statep = statep;
|
||||||
m_chgFuncp = NULL;
|
|
||||||
m_scopetopp = NULL;
|
|
||||||
nodep->accept(*this);
|
nodep->accept(*this);
|
||||||
}
|
}
|
||||||
virtual ~ChangedVisitor() {}
|
virtual ~ChangedVisitor() {}
|
||||||
@@ -186,5 +250,7 @@ public:
|
|||||||
|
|
||||||
void V3Changed::changedAll(AstNetlist* nodep) {
|
void V3Changed::changedAll(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
ChangedVisitor visitor (nodep);
|
ChangedState state;
|
||||||
|
ChangedVisitor visitor (nodep, &state);
|
||||||
|
V3Global::dumpCheckGlobalTree("changed.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+2
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -292,4 +292,5 @@ public:
|
|||||||
void V3Clean::cleanAll(AstNetlist* nodep) {
|
void V3Clean::cleanAll(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
CleanVisitor visitor (nodep);
|
CleanVisitor visitor (nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("clean.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+2
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2008-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2008-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -914,4 +914,5 @@ void V3ClkGater::clkGaterAll(AstNetlist* nodep) {
|
|||||||
// While the gater does well at some modules, it seems to slow down many others
|
// While the gater does well at some modules, it seems to slow down many others
|
||||||
UINFO(5,"ClkGater is disabled due to performance issues\n");
|
UINFO(5,"ClkGater is disabled due to performance issues\n");
|
||||||
//GaterVisitor visitor (nodep);
|
//GaterVisitor visitor (nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("clkgater.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+2
-13
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -99,18 +99,6 @@ private:
|
|||||||
UINFO(4,"New Last: "<<newvscp<<endl);
|
UINFO(4,"New Last: "<<newvscp<<endl);
|
||||||
return newvscp;
|
return newvscp;
|
||||||
}
|
}
|
||||||
AstVarScope* getCreateLocalVar(FileLine* fl, const string& name, AstVar* examplep, int width) {
|
|
||||||
AstVar* newvarp;
|
|
||||||
if (width) {
|
|
||||||
newvarp = new AstVar (fl, AstVarType::BLOCKTEMP, name, VFlagLogicPacked(), width);
|
|
||||||
} else {
|
|
||||||
newvarp = new AstVar (fl, AstVarType::BLOCKTEMP, name, examplep); // No range; 1 bit.
|
|
||||||
}
|
|
||||||
m_modp->addStmtp(newvarp);
|
|
||||||
AstVarScope* newvscp = new AstVarScope(fl, m_scopep, newvarp);
|
|
||||||
m_scopep->addVarp(newvscp);
|
|
||||||
return newvscp;
|
|
||||||
}
|
|
||||||
AstNode* createSenItemEquation(AstSenItem* nodep) {
|
AstNode* createSenItemEquation(AstSenItem* nodep) {
|
||||||
// We know the var is clean, and one bit, so we use binary ops
|
// We know the var is clean, and one bit, so we use binary ops
|
||||||
// for speed instead of logical ops.
|
// for speed instead of logical ops.
|
||||||
@@ -419,4 +407,5 @@ public:
|
|||||||
void V3Clock::clockAll(AstNetlist* nodep) {
|
void V3Clock::clockAll(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
ClockVisitor visitor (nodep);
|
ClockVisitor visitor (nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("clock.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+2
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -474,4 +474,5 @@ public:
|
|||||||
void V3Combine::combineAll(AstNetlist* nodep) {
|
void V3Combine::combineAll(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
CombineVisitor visitor (nodep);
|
CombineVisitor visitor (nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("combine.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+5
-5
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2010-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2010-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -144,12 +144,12 @@ V3ConfigIgnores V3ConfigIgnores::s_singleton;
|
|||||||
//######################################################################
|
//######################################################################
|
||||||
// V3Config
|
// V3Config
|
||||||
|
|
||||||
void V3Config::addIgnore(V3ErrorCode code, string filename, int min, int max) {
|
void V3Config::addIgnore(V3ErrorCode code, bool on, string filename, int min, int max) {
|
||||||
if (filename=="*") {
|
if (filename=="*") {
|
||||||
FileLine::globalWarnOff(code,true);
|
FileLine::globalWarnOff(code,!on);
|
||||||
} else {
|
} else {
|
||||||
V3ConfigIgnores::singleton().addIgnore(code, filename, min, false);
|
V3ConfigIgnores::singleton().addIgnore(code, filename, min, on);
|
||||||
if (max) V3ConfigIgnores::singleton().addIgnore(code, filename, max, true);
|
if (max) V3ConfigIgnores::singleton().addIgnore(code, filename, max, !on);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2010-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2010-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
class V3Config {
|
class V3Config {
|
||||||
public:
|
public:
|
||||||
static void addIgnore(V3ErrorCode code, string filename, int min, int max);
|
static void addIgnore(V3ErrorCode code, bool on, string filename, int min, int max);
|
||||||
static void applyIgnores(FileLine* filelinep);
|
static void applyIgnores(FileLine* filelinep);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -2383,12 +2383,14 @@ void V3Const::constifyAllLint(AstNetlist* nodep) {
|
|||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
ConstVisitor visitor (ConstVisitor::PROC_V_WARN);
|
ConstVisitor visitor (ConstVisitor::PROC_V_WARN);
|
||||||
(void)visitor.mainAcceptEdit(nodep);
|
(void)visitor.mainAcceptEdit(nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("const.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3Const::constifyCpp(AstNetlist* nodep) {
|
void V3Const::constifyCpp(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
ConstVisitor visitor (ConstVisitor::PROC_CPP);
|
ConstVisitor visitor (ConstVisitor::PROC_CPP);
|
||||||
(void)visitor.mainAcceptEdit(nodep);
|
(void)visitor.mainAcceptEdit(nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("const_cpp.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
AstNode* V3Const::constifyEdit(AstNode* nodep) {
|
AstNode* V3Const::constifyEdit(AstNode* nodep) {
|
||||||
@@ -2404,6 +2406,7 @@ void V3Const::constifyAllLive(AstNetlist* nodep) {
|
|||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
ConstVisitor visitor (ConstVisitor::PROC_LIVE);
|
ConstVisitor visitor (ConstVisitor::PROC_LIVE);
|
||||||
(void)visitor.mainAcceptEdit(nodep);
|
(void)visitor.mainAcceptEdit(nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("const.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void V3Const::constifyAll(AstNetlist* nodep) {
|
void V3Const::constifyAll(AstNetlist* nodep) {
|
||||||
@@ -2411,6 +2414,7 @@ void V3Const::constifyAll(AstNetlist* nodep) {
|
|||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
ConstVisitor visitor (ConstVisitor::PROC_V_EXPENSIVE);
|
ConstVisitor visitor (ConstVisitor::PROC_V_EXPENSIVE);
|
||||||
(void)visitor.mainAcceptEdit(nodep);
|
(void)visitor.mainAcceptEdit(nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("const.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
AstNode* V3Const::constifyExpensiveEdit(AstNode* nodep) {
|
AstNode* V3Const::constifyExpensiveEdit(AstNode* nodep) {
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+2
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -395,4 +395,5 @@ public:
|
|||||||
void V3Coverage::coverage(AstNetlist* rootp) {
|
void V3Coverage::coverage(AstNetlist* rootp) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
CoverageVisitor visitor (rootp);
|
CoverageVisitor visitor (rootp);
|
||||||
|
V3Global::dumpCheckGlobalTree("coverage.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -135,4 +135,5 @@ public:
|
|||||||
void V3CoverageJoin::coverageJoin(AstNetlist* rootp) {
|
void V3CoverageJoin::coverageJoin(AstNetlist* rootp) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
CoverageJoinVisitor visitor (rootp);
|
CoverageJoinVisitor visitor (rootp);
|
||||||
|
V3Global::dumpCheckGlobalTree("coveragejoin.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+4
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -291,12 +291,15 @@ public:
|
|||||||
void V3Dead::deadifyModules(AstNetlist* nodep) {
|
void V3Dead::deadifyModules(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
DeadVisitor visitor (nodep, false, false);
|
DeadVisitor visitor (nodep, false, false);
|
||||||
|
V3Global::dumpCheckGlobalTree("deadModules.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 6);
|
||||||
}
|
}
|
||||||
void V3Dead::deadifyDTypes(AstNetlist* nodep) {
|
void V3Dead::deadifyDTypes(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
DeadVisitor visitor (nodep, false, true);
|
DeadVisitor visitor (nodep, false, true);
|
||||||
|
V3Global::dumpCheckGlobalTree("deadDType.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
void V3Dead::deadifyAll(AstNetlist* nodep) {
|
void V3Dead::deadifyAll(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
DeadVisitor visitor (nodep, true, true);
|
DeadVisitor visitor (nodep, true, true);
|
||||||
|
V3Global::dumpCheckGlobalTree("deadAll.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+2
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -471,4 +471,5 @@ public:
|
|||||||
void V3Delayed::delayedAll(AstNetlist* nodep) {
|
void V3Delayed::delayedAll(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
DelayedVisitor visitor (nodep);
|
DelayedVisitor visitor (nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("delayed.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
+2
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
@@ -175,4 +175,5 @@ public:
|
|||||||
void V3Depth::depthAll(AstNetlist* nodep) {
|
void V3Depth::depthAll(AstNetlist* nodep) {
|
||||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||||
DepthVisitor visitor (nodep);
|
DepthVisitor visitor (nodep);
|
||||||
|
V3Global::dumpCheckGlobalTree("depth.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 6);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
//
|
//
|
||||||
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
|
// Copyright 2003-2015 by Wilson Snyder. This program is free software; you can
|
||||||
// redistribute it and/or modify it under the terms of either the GNU
|
// redistribute it and/or modify it under the terms of either the GNU
|
||||||
// Lesser General Public License Version 3 or the Perl Artistic License
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
// Version 2.0.
|
// Version 2.0.
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user