Commit Graph

4511 Commits

Author SHA1 Message Date
Geza Lore
38cab569ed
Add --reloop-limit argument (#2960)
Add --reloop-limit argument
2021-05-15 18:04:40 +01:00
Geza Lore
828f78ece4
Don't emit empty files with low split limits (#2961)
Attempt to split output files when we know a function will actually be
emitted, otherwise we might end up with empty files.
2021-05-15 16:05:24 +01:00
Geza Lore
5e95cc9280
Internals: Make AstAlwaysPost an AstNodeProcedure. (#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.
2021-05-15 10:56:28 -04:00
Wilson Snyder
88fed4bc2f Commentary on traces (#2925) 2021-05-13 18:57:39 -04:00
Wilson Snyder
3718fe1ca1 Commentary (trigger rebuild) 2021-05-13 18:34:20 -04:00
Ameya Vikram Singh
a4ab3e12f6
Update latest C++ Standard Compilation flag (#2951)
For SystemC Project sets the CXX_STANDARD flag from SystemC CMake build config.
2021-05-13 14:26:53 -04:00
Yutetsu TAKATSUKASA
9c85426e77
Internals: Fix build failure on older gcc such as 4.8.5 on CentOS7. No functional change is intended. (#2954) 2021-05-13 06:45:56 +09:00
Yutetsu TAKATSUKASA
e3b20a3ea2
Internals: Mark VerilatedContextImp::timeFormatSuffix() const (#2947) 2021-05-11 11:45:43 -04:00
Yutetsu TAKATSUKASA
f7c23c4ade
Internals: Set missing timescale though it is not referred yet. (#2946) 2021-05-11 22:38:13 +09:00
Yutetsu TAKATSUKASA
00cedf3797
Tests: Add a test to check if there is overflow or rounding (#2945) 2021-05-11 22:27:31 +09:00
Geza Lore
1422c23434
Split procedures to better respect --output-split-cfuncs (#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.
2021-05-11 07:44:07 -04:00
Geza Lore
1a6378291a
Emit 'else if' without nesting. No functional change intended. (#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;
}
2021-05-10 22:15:12 +01:00
Geza Lore
267c6f6dce
Improve Reloop to accept constant index offsets. (#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];
2021-05-10 18:01:11 +01:00
Yutetsu TAKATSUKASA
45fbd98ff1
Use V3OptionParser in verilator_coverage (#2935)
* Internals: Mark unused to avoid compilation failure. No functional change is intended.

* Use V3OptionParser in VlcMain.cpp
2021-05-09 07:04:22 +09:00
Geza Lore
f6c0108c86
Optimize large lookup tables to static data (#2926)
Implements #2925
2021-05-08 20:04:56 +01:00
Jonathan Drolet
37d68d39c8
Support --trace-fst for SystemC with CMake (#2927) 2021-05-08 08:42:00 -04:00
Yutetsu TAKATSUKASA
5e56f4d11b
Tests: Enable undefined behavior sanitizor when --sanitize is set. (#2923) 2021-05-08 08:20:26 -04:00
Jonathan Drolet
2bf248bf60
Add TRACE_THREADS to CMake (#2934) 2021-05-08 08:18:08 -04:00
Yutetsu TAKATSUKASA
39ce2f77f4
Internals: Remove VerilatedVcd::m_suffixesp. No functional change is intended. (#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
2021-05-07 20:45:58 -04:00
Yutetsu TAKATSUKASA
9797af0ad4
Introduce a macro VL_ATTR_NO_SANITIZE_ALIGN to suppress unaligned access check in ubsan (#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>
2021-05-08 07:16:40 +09:00
Yutetsu TAKATSUKASA
1e4839e5d1
Fix casting to integer not to cause integer overflow. (#2930) 2021-05-07 12:00:36 -04:00
Todd Strader
b2139f65d8
VPI memory access for packed arrays (#2922) 2021-05-07 07:17:54 -04:00
Philipp Wagner
44fd205e12
Fix make support for gmake 3.x (#2920) (#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 #2920
2021-05-06 12:07:15 -04:00
Yutetsu TAKATSUKASA
8624ce6a84
Stop checking dtype for better optimization chance in BitOpTree (#2909)
* Tests: Add more case that does not match native C++ width (8, 16, 32 or 64).

* Use AstVarRef::same() instead of AstNode::sameGateTree() because the latter checks dtype in addition to scope.

AstVarRef may have different minWidth in some cases,
but the difference should be ignored in the context of bitOpTree optimization.
2021-05-04 10:40:16 +09:00
Wilson Snyder
e68788d914 Fix initialization of assoc in assoc array (#2914). 2021-05-03 19:37:04 -04:00
Wilson Snyder
490f9f757d devel release 2021-05-03 19:37:04 -04:00
Krzysztof Bieganski
5290062549
Fix bounds check in VL_SEL_IWII (#2910) 2021-05-03 17:59:41 -04:00
Yutetsu TAKATSUKASA
53d9c30277
Internals: Factor out V3OptionParser from V3Options.cpp. No functional change is intended. (#2919) 2021-05-04 06:30:18 +09:00
Geza Lore
76494891cf Speed up V3Width by pulling skip condition before node iteration. 2021-05-02 16:58:30 +01:00
Geza Lore
008b8d5b56 Speed up sparse V3Number multiplication 2021-05-02 12:34:12 +01:00
Yutetsu TAKATSUKASA
d77c9da983
Tests: Add a case to cover the line using m_frozenNodes. (#2915) 2021-05-02 06:12:38 +09:00
Udi Finkelstein
422c076fec
Support ignoring "`pragma protect ..." (#2886)
This support code merely adds the capability to skip over the encrypted
parts. Many models have unencrypted module interfaces with ports, and
only encrypt the critical parts.
2021-04-26 18:16:24 -04:00
Todd Strader
12416bc0a3
Scope module fix (#2893) 2021-04-26 09:50:25 -04:00
Yutetsu TAKATSUKASA
4351abfe71
Fix assertion failure in bitOpTree opt (#2899)
* Tests: Add another testcase that triggers assertion failure in bitOpTree opt.

* Fix assertion failure in bitOpTree opt reported in #2891. Consider the follwoing case.
CCast -> WordSel -> VarRef(leaf)

* Make sure that m_bitPolarity is expanded enough.
2021-04-25 11:46:05 +09:00
Wilson Snyder
2022ec43cf Update gtkwave from upstream. 2021-04-24 11:00:35 -04:00
Wilson Snyder
15f7741eaf Version bump 2021-04-24 10:34:05 -04:00
Wilson Snyder
aedd16225a Tests: Don't expose version numbers 2021-04-24 10:33:49 -04:00
Wilson Snyder
8749f545b6 Partial fix to avoid init error on lint-only (#2895) 2021-04-24 09:49:23 -04:00
Wilson Snyder
82b878ce42 Internal coverage: locally download codecov script for security (#2904) 2021-04-24 09:39:54 -04:00
Wilson Snyder
15802dadf1 Commentary 2021-04-24 09:23:53 -04:00
Todd Strader
f446295274
Public interface params (#2901) 2021-04-21 13:46:13 -04:00
Todd Strader
f450d51de1
expose packed vectors via the VPI (#2900) 2021-04-21 12:35:18 -04:00
Wilson Snyder
dd0c2cac9b Fix V3Premit infinite loop on always read-and-write (#2898). 2021-04-21 09:21:06 -04:00
Todd Strader
a1cd55225c
more vpi_get_str() (#2894) 2021-04-21 08:09:19 -04:00
github action
47e7e21706 Apply clang-format 2021-04-20 13:09:24 +00:00
Graham Rushton
6660627558
Fix concat of long hashed names in traces etc (#2854) 2021-04-20 09:08:29 -04:00
Wilson Snyder
c443e229ee Fix URL references. 2021-04-18 11:52:29 -04:00
Wilson Snyder
2e9e4ae110 Add an URL on warnings to point to the manual's description. 2021-04-18 10:17:05 -04:00
Yutetsu TAKATSUKASA
56dd58d259
Fix assertion failure in bitOpTree (#2892)
* Tests: Add a test to reproduce #2891

* Fix assertion failure in binary op tree opt.
2021-04-17 05:50:30 +09:00
Todd Strader
53a6830f71
Fix cast from packed, typedef'ed interface signal (#2884) 2021-04-16 15:25:47 -04:00