Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 6fd48da
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Mon Jun 7 07:47:15 2021 -0400

    Untabify cmakefiles. No functional change.

commit b976b8d
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Sun Jun 6 22:09:30 2021 -0400

    Fix slowdown in elaboration (verilator#2911).

commit c238d3d
Author: github action <action@example.com>
Date:   Sun Jun 6 23:57:41 2021 +0000

    Apply clang-format

commit 0edf1f0
Author: Geza Lore <gezalore@gmail.com>
Date:   Mon Jun 7 00:56:30 2021 +0100

    Add ccache-report target to standard Makefile (verilator#3011)

    Using the standard model Makefile, when in addition to an explicit
    target, the target 'ccache-report' is also given, a summary of ccache
    hits/misses during this invocation of 'make' will be prited at the end
    of the build.

commit 31bb73e
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Sun Jun 6 19:32:48 2021 -0400

    Fix MCD close also closing stdout (verilator#2931).

commit 8f2e4f6
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Sun Jun 6 10:32:50 2021 -0400

    Fix clang warning.

commit 2158a45
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Sun Jun 6 10:27:44 2021 -0400

    Tests: Reenable 18.04 MT (verilator#2963).

commit 1e89392
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Sun Jun 6 10:27:01 2021 -0400

    Add --expand-limit argument (verilator#3005).

commit b0c1ac7
Author: Martin Schmidt <martin.schmidt@epita.fr>
Date:   Sun Jun 6 15:27:44 2021 +0200

    Add support of --trace-structs parameter for CMake (verilator#2986)

commit 1f19e8e
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Sun Jun 6 09:17:56 2021 -0400

    Tests: Add test case for verilator#2895.

commit 258d9ad
Author: Geza Lore <gezalore@gmail.com>
Date:   Sat Jun 5 17:40:56 2021 +0100

    Aid IDE code linking in V3AstNodes.h (verilator#3009)

commit fa06357
Author: Miodrag Milanović <mmicko@gmail.com>
Date:   Fri Jun 4 18:04:55 2021 +0200

    Fix Makefiles to support Windows EXEEXT usage (verilator#3008).

commit eea7e1b
Author: Geza Lore <gezalore@gmail.com>
Date:   Fri Jun 4 15:00:13 2021 +0100

    Do not emit leading spaces on blank lines (verilator#3007)

commit fb561d9
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Thu Jun 3 21:19:11 2021 -0400

    Commentary (verilator#2996)

commit 9f5eb8f
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Thu Jun 3 21:15:42 2021 -0400

    Commentary

commit 1f331bd
Author: Julien Margetts <56540603+margej@users.noreply.github.com>
Date:   Tue Jun 1 14:01:18 2021 +0100

    Fix part select issues in LATCH warning. (verilator#2948) (verilator#2938)

commit 2143bcf
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Mon May 31 22:46:41 2021 -0400

    Fix constant function calls with uninit value (verilator#2995).

commit e1f9fff
Author: Geza Lore <gezalore@gmail.com>
Date:   Mon May 31 13:40:22 2021 +0100

    Fix --protect-ids when using SV classes (verilator#2994)

    A few names were incorrectly mangled, which made --protect-ids produce
    invalid output when certain SV class constructs were uses. Now fixed and
    added a few extra tests to catch this.

commit e4dcbb2
Author: Pieter Kapsenberg <pieter.kapsenberg@gmail.com>
Date:   Sun May 30 17:19:35 2021 -0700

    Fix unused variable warnings (verilator#2991)

commit f4c1a7e
Author: Geza Lore <gezalore@gmail.com>
Date:   Sat May 29 23:46:15 2021 +0100

    Emit: Fix indent tracking when // inside string literal (verilator#2990)

    // was so far unconditionally treated as comment.
    c443e22 introduced a string literal in
    the output that contained a http:// url, which broke the indent
    tracking. No functional change intended

commit ef9f477
Author: Geza Lore <gezalore@gmail.com>
Date:   Sat May 22 18:50:55 2021 +0100

    Make _ctror_var_reset and _configure_coverage static. (verilator#2977)

    Another step towards verilator#2958/verilator#2140. Make the mentioned generated functions
    static for modules (but not for classes).

commit 2dd5ef5
Author: Geza Lore <gezalore@gmail.com>
Date:   Sat May 22 12:27:32 2021 +0100

    Internals: Move --coverage and --savable check out of V3EmitC (verilator#2976)

commit a43eba7
Author: github action <action@example.com>
Date:   Sat May 22 10:14:07 2021 +0000

    Apply clang-format

commit 61c9866
Author: Geza Lore <gezalore@gmail.com>
Date:   Sat May 22 11:13:02 2021 +0100

    Internals: Generate ASTGEN_SUPER_* macros instead of expanding. (verilator#2975)

    astgen now generates ASTGEN_SUPER_* macros, instead of expanding the
    ASTGEN_SUPER itself. This means that V3AstNodes.h itself can be included
    in V3Ast.h, which helps IDEs (namely CLion) find definitions in
    V3AstNodes.h a lot better. Albeit this is a little bit more boilerplate,
    writing constructors of Ast nodes should be a lot rarer than trying to
    find their definitions, so hopefully this is an improvement overall.
    astgen will error if the developer calls the wrong superclass
    constructor.

commit 6378255
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Fri May 21 20:47:53 2021 -0400

    Internals: Fix some pylint warnings

commit 8814111
Author: Geza Lore <gezalore@gmail.com>
Date:   Fri May 21 14:34:27 2021 +0100

    Rework Ast hashing to be stable (verilator#2974)

    Rework Ast hashing to be stable

    Eliminated reliance on pointer values in AstNode hashes in order to make
    them stable. This requires moving the sameHash functions into a visitor,
    as nodes pointed to via members (and not child nodes) need to be hashed
    themselves.

    The hashes are now stable (as far as I could test them), and the impact
    on verilation time is small enough not to be reliably measurable.

commit fd35492
Author: Geza Lore <gezalore@gmail.com>
Date:   Fri May 21 01:41:46 2021 +0100

    Split V3Hashed to V3Hasher and V3DupFinder (verilator#2967)

    V3Hasher is responsible for computing AstNode hashes, while V3DupFinder
    can be used to find duplicate trees based on hashes. Interface of
    V3DupFinder simplified somewhat. No functional change intended at this
    point, but hash computation might differ in minor details, this however
    should have no perceivable effect on output/runtime.

    Implements (verilator#2964)

commit a44d2b2
Author: Geza Lore <gezalore@gmail.com>
Date:   Thu May 20 11:30:36 2021 +0100

    Move unreleased changes in right place in Changelog

commit aba3883
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Wed May 19 08:14:14 2021 -0400

    Commentary on MULTIDRIVEN (verilator#2972).

commit 9699192
Author: Geza Lore <gezalore@gmail.com>
Date:   Tue May 18 19:28:48 2021 +0100

    Don't merge bit select assignments in C code (verilator#2971)

commit 0f7ec6c
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Mon May 17 18:24:18 2021 -0400

    Fix missing array include (verilator#2966)

commit 471f14d
Author: Geza Lore <gezalore@gmail.com>
Date:   Mon May 17 13:26:24 2021 +0100

    Clean up V3Combine (verilator#2965)

    - Remove dead code
    - Simplify what is left
    - Minor improvements using C++11
    - Remove special case AstNode constructors used only in one place in
      V3Combine (inlined instead).

commit bdc162d
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Sun May 16 18:38:43 2021 -0400

    Fix 16.04 gcc warning

commit 706842d
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Sun May 16 15:11:25 2021 -0400

    CI: Disable Ubuntu-18.04 clang (verilator#2963)

commit 31779b8
Author: Yutetsu TAKATSUKASA <y.takatsukasa@gmail.com>
Date:   Sun May 16 19:01:03 2021 +0900

    Format time string using integer (verilator#2940)

    Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>

commit 80d62ad
Author: Geza Lore <gezalore@gmail.com>
Date:   Sat May 15 21:10:16 2021 +0100

    Make all AstNode* base class constructors protected. (verilator#2962)

    No functional changes intended. Boring patch in the hope of being
    helpful to new contributors. Although AstNode* base classes needing to
    be abstract is described in the internals manual, this might provide a
    bit of extra safety.

commit 38cab56
Author: Geza Lore <gezalore@gmail.com>
Date:   Sat May 15 18:04:40 2021 +0100

    Add --reloop-limit argument (verilator#2960)

    Add --reloop-limit argument

commit 828f78e
Author: Geza Lore <gezalore@gmail.com>
Date:   Sat May 15 16:05:24 2021 +0100

    Don't emit empty files with low split limits (verilator#2961)

    Attempt to split output files when we know a function will actually be
    emitted, otherwise we might end up with empty files.

commit 5e95cc9
Author: Geza Lore <gezalore@gmail.com>
Date:   Sat May 15 15:56:28 2021 +0100

    Internals: Make AstAlwaysPost an AstNodeProcedure. (verilator#2959)

    This seems to belong there, eliminates some code duplication in V3Clock,
    and also enables splitting AstAlwaysPost statements into different
    functions in V3Order, but should otherwise have little effect.

commit 88fed4b
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Thu May 13 18:56:07 2021 -0400

    Commentary on traces (verilator#2925)

commit 3718fe1
Author: Wilson Snyder <wsnyder@wsnyder.org>
Date:   Thu May 13 18:34:20 2021 -0400

    Commentary (trigger rebuild)

commit a4ab3e1
Author: Ameya Vikram Singh <ameya.v.singh@gmail.com>
Date:   Thu May 13 23:56:53 2021 +0530

    Update latest C++ Standard Compilation flag (verilator#2951)

    For SystemC Project sets the CXX_STANDARD flag from SystemC CMake build config.

commit 9c85426
Author: Yutetsu TAKATSUKASA <y.takatsukasa@gmail.com>
Date:   Thu May 13 06:45:56 2021 +0900

    Internals: Fix build failure on older gcc such as 4.8.5 on CentOS7. No functional change is intended. (verilator#2954)

commit e3b20a3
Author: Yutetsu TAKATSUKASA <y.takatsukasa@gmail.com>
Date:   Wed May 12 00:45:43 2021 +0900

    Internals: Mark VerilatedContextImp::timeFormatSuffix() const (verilator#2947)

commit f7c23c4
Author: Yutetsu TAKATSUKASA <y.takatsukasa@gmail.com>
Date:   Tue May 11 22:38:13 2021 +0900

    Internals: Set missing timescale though it is not referred yet. (verilator#2946)

commit 00cedf3
Author: Yutetsu TAKATSUKASA <y.takatsukasa@gmail.com>
Date:   Tue May 11 22:27:31 2021 +0900

    Tests: Add a test to check if there is overflow or rounding (verilator#2945)

commit 1422c23
Author: Geza Lore <gezalore@gmail.com>
Date:   Tue May 11 12:44:07 2021 +0100

    Split procedures to better respect --output-split-cfuncs (verilator#2942)

    CFuncs only used to be split at procedure (always/initial/final block),
    which on occasion can still yield huge output files if they have large
    procedures. This patch make CFuncs split at statement boundaries within
    procedures. This has the potential to help a lot, but still does not
    help if there are huge statements within procedures.

commit 1a63782
Author: Geza Lore <gezalore@gmail.com>
Date:   Mon May 10 22:15:12 2021 +0100

    Emit 'else if' without nesting. No functional change intended. (verilator#2944)

    Instead of:

    if (a) {
      x;
    } else {
      if (b) {
        y;
      } else {
        if (c) {
          z;
        } else {
          w;
        }
      }
    }

    Emit:

    if (a) {
      x;
    } else if (b) {
      y;
    } else if (c) {
      z;
    } else {
      w;
    }

commit 267c6f6
Author: Geza Lore <gezalore@gmail.com>
Date:   Mon May 10 18:01:11 2021 +0100

    Improve Reloop to accept constant index offsets. (verilator#2939)

    V3Reloop now can roll up indexed assignments between arrays if there is a
    constant offset between indices on the left and right hand sides, e.g.:

    a[0] = b[2];
    a[1] = b[3];
    ...
    a[x] = b[x + 2];

commit 45fbd98
Author: Yutetsu TAKATSUKASA <y.takatsukasa@gmail.com>
Date:   Sun May 9 07:04:22 2021 +0900

    Use V3OptionParser in verilator_coverage (verilator#2935)

    * Internals: Mark unused to avoid compilation failure. No functional change is intended.

    * Use V3OptionParser in VlcMain.cpp

commit f6c0108
Author: Geza Lore <gezalore@gmail.com>
Date:   Sat May 8 20:04:56 2021 +0100

    Optimize large lookup tables to static data (verilator#2926)

    Implements verilator#2925

commit 37d68d3
Author: Jonathan Drolet <jonathan.drolet@riedel.net>
Date:   Sat May 8 08:42:00 2021 -0400

    Support --trace-fst for SystemC with CMake (verilator#2927)

commit 5e56f4d
Author: Yutetsu TAKATSUKASA <y.takatsukasa@gmail.com>
Date:   Sat May 8 21:20:26 2021 +0900

    Tests: Enable undefined behavior sanitizor when --sanitize is set. (verilator#2923)

commit 2bf248b
Author: Jonathan Drolet <jonathan.drolet@gmail.com>
Date:   Sat May 8 08:18:08 2021 -0400

    Add TRACE_THREADS to CMake (verilator#2934)

commit 39ce2f7
Author: Yutetsu TAKATSUKASA <y.takatsukasa@gmail.com>
Date:   Sat May 8 09:45:58 2021 +0900

    Internals: Remove VerilatedVcd::m_suffixesp. No functional change is intended. (verilator#2933)

    Reasons are:
    - it's error prone to keep updating whennever m_suffixes is resized
    - invalid pointer may be set when there is not signal to trace as in t_trace_dumporder_bad

commit 9797af0
Author: Yutetsu TAKATSUKASA <y.takatsukasa@gmail.com>
Date:   Sat May 8 07:16:40 2021 +0900

    Introduce a macro VL_ATTR_NO_SANITIZE_ALIGN to suppress unaligned access check in ubsan (verilator#2929)

    * Add VL_ATTR_NO_SANITIZE_ALIGN macro to disable alignment check of ubsan

    * Mark a function VL_ATTR_NO_SANITIZE_ALIGN because the function is intentionally using unaligned access for the sake of performance.

    Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>

commit 1e4839e
Author: Yutetsu TAKATSUKASA <y.takatsukasa@gmail.com>
Date:   Sat May 8 01:00:36 2021 +0900

    Fix casting to integer not to cause integer overflow. (verilator#2930)

commit b2139f6
Author: Todd Strader <todd.strader@gmail.com>
Date:   Fri May 7 07:17:54 2021 -0400

    VPI memory access for packed arrays (verilator#2922)

commit 44fd205
Author: Philipp Wagner <mail@philipp-wagner.com>
Date:   Thu May 6 17:07:15 2021 +0100

    Fix make support for gmake 3.x (verilator#2920) (verilator#2921)

    The "file" make function is only available in gmake 4.x, which isn't
    available on RHEL/CentOS 7. Use alternative syntax to support older
    gmake versions.

    Fixes verilator#2920
  • Loading branch information
Tak-Kei Lam committed Jun 8, 2021
1 parent e44ac78 commit 0f554db
Show file tree
Hide file tree
Showing 143 changed files with 6,753 additions and 2,123 deletions.
24 changes: 24 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,31 @@ Verilator 4.203 devel

**Minor:**

* Add --reloop-limit argument (#2943) (#2960). [Geza Lore]
* Add --expand-limit argument (#3005). [Julien Margetts]
* Add TRACE_THREADS to CMake (#2934). [Jonathan Drolet]
* Optimize large lookup tables to static data (#2925). [Geza Lore]
* Optimize reloop to accept constant index offsets (#2939). [Geza Lore]
* Split always blocks to better respect --output-split-cfuncs. [Geza Lore]
* Support ignoring "`pragma protect ..." (#2886). [Udi Finkelstein]
* Support --trace-fst for SystemC with CMake (#2927). [Jonathan Drolet]
* Update cmake latest C++ Standard Compilation flag (#2951). [Ameya Vikram Singh]
* Fix assertion failure in bitOpTree optimization (#2891) (#2899). [Raynard Qiao]
* Fix DPI functions not seen as vpiModule (#2893). [Todd Strader]
* Fix bounds check in VL_SEL_IWII (#2910). [Krzysztof Bieganski]
* Fix slowdown in elaboration (#2911). [Nathan Graybeal]
* Fix initialization of assoc in assoc array (#2914). [myftptoyman]
* Fix make support for gmake 3.x (#2920) (#2921). [Philipp Wagner]
* Fix VPI memory access for packed arrays (#2922). [Todd Strader]
* Fix MCD close also closing stdout (#2931). [Alexander Grobman]
* Fix split procedures to better respect --output-split-cfuncs (#2942). [Geza Lore]
* Fix to emit 'else if' without nesting (#2944). [Geza Lore]
* Fix part select issues in LATCH warning (#2948) (#2938). [Julien Margetts]
* Fix to not emit empty files with low split limits (#2961). [Geza Lore]
* Fix merging of assignments in C++ code (#2970). [Ruper Swarbrick]
* Fix unused variable warnings (#2991). [Pieter Kapsenberg]
* Fix --protect-ids when using SV classes (#2994). [Geza Lore]
* Fix constant function calls with uninit value (#2995). [yanx21]


Verilator 4.202 2021-04-24
Expand Down
36 changes: 20 additions & 16 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
srcdir = @srcdir@
VPATH = @srcdir@
HOST = @HOST@
EXEEXT = @EXEEXT@

DOXYGEN = doxygen
INSTALL = @INSTALL@
Expand Down Expand Up @@ -130,6 +131,7 @@ DISTFILES1 = $(INFOS) .gitignore \
verilator-config.cmake.in \
verilator-config-version.cmake.in \
bin/verilator \
bin/verilator_ccache_report \
bin/verilator_coverage \
bin/verilator_difftree \
bin/verilator_gantt \
Expand Down Expand Up @@ -193,6 +195,7 @@ DISTFILES2 = \

INST_PROJ_FILES = \
bin/verilator \
bin/verilator_ccache_report \
bin/verilator_coverage \
bin/verilator_gantt \
bin/verilator_includer \
Expand All @@ -203,9 +206,9 @@ INST_PROJ_FILES = \
include/vltstd/*.[chv]* \

INST_PROJ_BIN_FILES = \
bin/verilator_bin \
bin/verilator_bin_dbg \
bin/verilator_coverage_bin_dbg \
bin/verilator_bin$(EXEEXT) \
bin/verilator_bin_dbg$(EXEEXT) \
bin/verilator_coverage_bin_dbg$(EXEEXT) \

EXAMPLES_FIRST = \
examples/make_hello_c \
Expand All @@ -221,10 +224,10 @@ all: all_nomsg msg_test
all_nomsg: verilator_exe $(VL_INST_MAN_FILES)

.PHONY:verilator_exe
.PHONY:verilator_bin
.PHONY:verilator_bin_dbg
.PHONY:verilator_coverage_bin_dbg
verilator_exe verilator_bin verilator_bin_dbg verilator_coverage_bin_dbg:
.PHONY:verilator_bin$(EXEEXT)
.PHONY:verilator_bin_dbg$(EXEEXT)
.PHONY:verilator_coverage_bin_dbg$(EXEEXT)
verilator_exe verilator_bin$(EXEEXT) verilator_bin_dbg$(EXEEXT) verilator_coverage_bin_dbg$(EXEEXT):
@echo ------------------------------------------------------------
@echo "making verilator in src"
$(MAKE) -C src $(OBJCACHE_JOBS) $(CI_MAKE_SRC_TARGET)
Expand Down Expand Up @@ -280,8 +283,8 @@ verilator.pdf: Makefile
$(MAKE) -C docs verilator.pdf

# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
VL_INST_BIN_FILES = verilator verilator_bin verilator_bin_dbg verilator_coverage_bin_dbg \
verilator_coverage verilator_gantt verilator_includer verilator_profcfunc
VL_INST_BIN_FILES = verilator verilator_bin$(EXEEXT) verilator_bin_dbg$(EXEEXT) verilator_coverage_bin_dbg$(EXEEXT) \
verilator_ccache_report verilator_coverage verilator_gantt verilator_includer verilator_profcfunc
# Some scripts go into both the search path and pkgdatadir,
# so they can be found by the user, and under $VERILATOR_ROOT.

Expand All @@ -305,11 +308,12 @@ installbin:
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_coverage $(DESTDIR)$(bindir)/verilator_coverage )
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_gantt $(DESTDIR)$(bindir)/verilator_gantt )
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_profcfunc $(DESTDIR)$(bindir)/verilator_profcfunc )
( cd bin ; $(INSTALL_PROGRAM) verilator_bin $(DESTDIR)$(bindir)/verilator_bin )
( cd bin ; $(INSTALL_PROGRAM) verilator_bin_dbg $(DESTDIR)$(bindir)/verilator_bin_dbg )
( cd bin ; $(INSTALL_PROGRAM) verilator_coverage_bin_dbg $(DESTDIR)$(bindir)/verilator_coverage_bin_dbg )
( cd bin ; $(INSTALL_PROGRAM) verilator_bin$(EXEEXT) $(DESTDIR)$(bindir)/verilator_bin$(EXEEXT) )
( cd bin ; $(INSTALL_PROGRAM) verilator_bin_dbg$(EXEEXT) $(DESTDIR)$(bindir)/verilator_bin_dbg$(EXEEXT) )
( cd bin ; $(INSTALL_PROGRAM) verilator_coverage_bin_dbg$(EXEEXT) $(DESTDIR)$(bindir)/verilator_coverage_bin_dbg$(EXEEXT) )
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/bin
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_includer $(DESTDIR)$(pkgdatadir)/bin/verilator_includer )
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_ccache_report $(DESTDIR)$(pkgdatadir)/bin/verilator_ccache_report )

# Man files can either be part of the original kit, or built in current directory
# So important we use $^ so VPATH is searched
Expand Down Expand Up @@ -458,7 +462,7 @@ clang-tidy: $(CLANGTIDY_DEP)

analyzer-src:
-rm -rf src/obj_dbg
scan-build $(MAKE) -k verilator_coverage_bin_dbg verilator_bin_dbg
scan-build $(MAKE) -k verilator_coverage_bin_dbg$(EXEEXT) verilator_bin_dbg$(EXEEXT)

analyzer-include:
-rm -rf examples/*/obj*
Expand All @@ -476,12 +480,12 @@ clang-format:
$(CLANGFORMAT) $(CLANGFORMAT_FLAGS) $(CLANGFORMAT_FILES)

PY_PROGRAMS = \
bin/verilator_ccache_report \
examples/xml_py/vl_file_copy \
examples/xml_py/vl_hier_graph \
docs/guide/conf.py \
docs/guide/vl_sphinx_extract \
docs/guide/vl_sphinx_extract \
docs/guide/vl_doxygen_filter \
docs/bin/vl_sphinx_extract \
docs/bin/vl_sphinx_fix \
src/astgen \
src/bisonpre \
src/config_rev \
Expand Down
2 changes: 2 additions & 0 deletions bin/verilator
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ detailed descriptions of these arguments.
-E Preprocess, but do not compile
--error-limit <value> Abort after this number of errors
--exe Link to create executable
--expand-limit <value> Set expand optimization limit
-F <file> Parse arguments from a file, relatively
-f <file> Parse arguments from a file
-FI <file> Force include of a file
Expand Down Expand Up @@ -378,6 +379,7 @@ detailed descriptions of these arguments.
--quiet-exit Don't print the command on failure
--relative-includes Resolve includes relative to current file
--no-relative-cfuncs Disallow 'this->' in generated functions
--reloop-limit Minimum iterations for forming loops
--report-unoptflat Extra diagnostics for UNOPTFLAT
--rr Run Verilator and record with rr
--savable Enable model save-restore
Expand Down
65 changes: 65 additions & 0 deletions bin/verilator_ccache_report
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env python3
# pylint: disable=C0103,C0114,C0115,C0116,C0123,C0301,R0902,R0913,R0914,R0912,R0915,W0621
######################################################################

import argparse
import collections
import re

parser = argparse.ArgumentParser(
allow_abbrev=False,
formatter_class=argparse.RawDescriptionHelpFormatter,
description="""Report ccache behavior of a Verilated model build.""",
epilog=
"""Copyright 2002-2021 by Wilson Snyder. This program is free software; 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.
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")

parser.add_argument('-o',
type=argparse.FileType('w'),
metavar="OUTFILE",
required=True,
help='output file')
parser.add_argument('logfile',
type=argparse.FileType('r'),
help='ccache log file')

args = parser.parse_args()

results = {}

for line in args.logfile:
line = line.strip()
match = re.match(r'.*Object file: (.*)$', line)
if match:
obj = match.group(1)
match = re.match(r'.*Result: (.*)$', line)
if match:
results[obj] = match.group(1)

args.o.write("#" * 80 + "\n")
args.o.write("ccache report (from verilator_ccache_report) :\n")

if not results:
args.o.write("\nAll object files up to date\n")
else:
args.o.write("\nCompiled object files:\n")
width = max(len(_) for _ in results) + 1
for k in sorted(results.keys()):
args.o.write("{:{width}} : {}\n".format(k, results[k], width=width))

args.o.write("\nSummary:\n")
counts = collections.Counter(_ for _ in results.values())
total = sum(counts.values())
width = max(len(_) for _ in results.values()) + 1
for k in sorted(counts.keys()):
c = counts[k]
args.o.write("{:{width}}| {} ({:.2%})\n".format(k,
c,
c / total,
width=width))

args.o.write("#" * 80 + "\n")
10 changes: 7 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,15 @@ AC_DEFUN([_MY_LDLIBS_CHECK_OPT],

# Flag to select newest language standard supported
# Macros work such that first option that passes is the one we take
# gnu++17 code is clean, but SystemC in 2018 doesn't link with it (bug1339)
# gnu++14 is the newest that Verilator supports
# Currently enabled gnu++14/c++14 due to packaged SystemC dependency
# gnu++17 is the newest that Verilator supports
# std++03 is the oldest that Verilator supports
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++20)
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++17)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++14)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++11)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++03)
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++20)
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++17)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++14)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++11)
Expand All @@ -289,11 +291,13 @@ AC_SUBST(CFG_CXXFLAGS_STD_NEWEST)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++03)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++11)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++14)
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=std++17)
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++17)
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++20)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++03)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++11)
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++14)
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++17)
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++20)
AC_SUBST(CFG_CXXFLAGS_STD_OLDEST)

# Flags for compiling Verilator internals including parser, and Verilated files
Expand Down
4 changes: 4 additions & 0 deletions docs/CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Please see the Verilator manual for 200+ additional contributors. Thanks to all.
Ahmed El-Mahmoudy
Alex Chadwick
Àlex Torregrosa
Ameya Vikram Singh
Andreas Kuster
Chris Randall
Conor McCullough
Expand Down Expand Up @@ -38,6 +39,7 @@ Jean Berniolles
Jeremy Bennett
John Coiner
John Demme
Jonathan Drolet
Josh Redford
Julien Margetts
Kaleb Barrett
Expand All @@ -53,9 +55,11 @@ Marco Widmer
Markus Krause
Marlon James
Marshal Qiao
Martin Schmidt
Matthew Ballance
Michael Killough
Mike Popoloski
Miodrag Milanović
Morten Borup Petersen
Nandu Raj
Nathan Kohagen
Expand Down
3 changes: 2 additions & 1 deletion docs/bin/vl_sphinx_extract
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# pylint: disable=C0112,C0114,C0116,C0301,R0903
# pylint: disable=C0112,C0114,C0115,C0116,C0301,R0201,R0903
# -*- Python -*- See copyright, etc below
######################################################################

Expand All @@ -8,6 +8,7 @@ import re

#######################################################################


class VlSphinxExtract:
debug = 0
SkipBasenames = {}
Expand Down
2 changes: 1 addition & 1 deletion docs/bin/vl_sphinx_fix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# pylint: disable=C0112,C0114,C0116,C0301,R0903
# pylint: disable=C0112,C0114,C0115,C0116,C0301,R0903
# -*- Python -*- See copyright, etc below
######################################################################

Expand Down
11 changes: 11 additions & 0 deletions docs/gen/ex_MULTIDRIVEN_faulty.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. comment: generated by t_lint_multidriven_bad
.. code-block:: sv
:linenos:
:emphasize-lines: 2,5
always @(posedge clk) begin
out2[7:0] <= d0; // <--- Warning
end
always @(negedge clk) begin
out2[15:8] <= d0; // <--- Warning
end
6 changes: 6 additions & 0 deletions docs/gen/ex_MULTIDRIVEN_msg.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. comment: generated by t_lint_multidriven_bad
.. code-block::
%Warning-MULTIDRIVEN: example.v:1:22 Signal has multiple driving blocks with different clocking: 'out2'
example.v:1:7 ... Location of first driving block
example.v:1:7 ... Location of other driving block
9 changes: 4 additions & 5 deletions docs/guide/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pylint: disable=E402
# pylint: disable=C0103,C0114,C0116,E0402,W0622
#
# Configuration file for Verilator's Sphinx documentation builder.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
Expand All @@ -12,11 +12,10 @@
from datetime import datetime
import os
import re
import shutil
import sys
sys.path.insert(0, os.path.abspath('./_ext'))

import sphinx_rtd_theme
import sphinx_rtd_theme # pylint: disable=wrong-import-position,


def get_vlt_version():
Expand Down Expand Up @@ -94,7 +93,7 @@ def setup(app):
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

# TODO could use this for internals<->guide references
# Could use this for internals<->guide references
# intersphinx_mapping = { 'sphinx': ('https://sphinx-doc.org/', None), }

# ----------------------------------------------------------------------
Expand Down Expand Up @@ -208,7 +207,7 @@ def setup(app):
# ----------------------------------------------------------------------
# -- Options for doxygen

#if shutil.which("doxygen"):
# if shutil.which("doxygen"):
# breathe_projects = {
# "verilated": "../_build/doxygen/verilated/xml",
# }
Expand Down
22 changes: 20 additions & 2 deletions docs/guide/exe_verilator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,12 @@ Summary:
files on the command line that implement the main loop for your
simulation.

.. option:: --expand-limit <value>

Rarely needed. Fine-tune optimizations to set the maximum size of an
expression in 32-bit words to expand into separate word-based
statements.

.. option:: -F <file>

Read the specified file, and act as if all text inside it was specified
Expand All @@ -418,8 +424,11 @@ Summary:
fairly standard across Verilog tools.

The file may contain :code:`//` comments which are ignored to the end of
the line. Any :code:`$VAR`, :code:`$(VAR)`, or :code:`${VAR}` will be
replaced with the specified environment variable.
the line. It may also contain :code:`/* .. */` comments which are
ignored, be cautious that wildcards are not handled in -f files, and
that :code:`directory/*` is the beginning of a comment, not a wildcard.
Any :code:`$VAR`, :code:`$(VAR)`, or :code:`${VAR}` will be replaced
with the specified environment variable.

.. option:: -FI <file>

Expand Down Expand Up @@ -915,6 +924,15 @@ Summary:
the path of the referencing file, instead of relative to the current
directory.

.. option:: --reloop-limit

Rarely needed. Verilator attempts to turn some common sequences of
statements into loops in the output. This argument specifies the minimum
number of iterations the resulting loop needs to have in order to perform
this transformation. Default limit is 40. A smaller number may slightly
improve C++ compilation time on designs where these sequences are common,
however effect on model performance requires benchmarking.

.. option:: --report-unoptflat

Extra diagnostics for UNOPTFLAT warnings. This includes for each loop,
Expand Down
Loading

0 comments on commit 0f554db

Please sign in to comment.