Commit Graph

4547 Commits

Author SHA1 Message Date
Wilson Snyder
6fd48da7cf Untabify cmakefiles. No functional change. 2021-06-07 07:47:15 -04:00
Wilson Snyder
b976b8dac9 Fix slowdown in elaboration (#2911). 2021-06-06 22:09:30 -04:00
github action
c238d3da76 Apply clang-format 2021-06-06 23:57:41 +00:00
Geza Lore
0edf1f0c94
Add ccache-report target to standard Makefile (#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.
2021-06-07 00:56:30 +01:00
Wilson Snyder
31bb73e3de Fix MCD close also closing stdout (#2931). 2021-06-06 19:32:48 -04:00
Wilson Snyder
8f2e4f6bb0 Fix clang warning. 2021-06-06 10:32:50 -04:00
Wilson Snyder
2158a4573e Tests: Reenable 18.04 MT (#2963). 2021-06-06 10:27:44 -04:00
Wilson Snyder
1e89392e76 Add --expand-limit argument (#3005). 2021-06-06 10:27:01 -04:00
Martin Schmidt
b0c1ac7ea2
Add support of --trace-structs parameter for CMake (#2986) 2021-06-06 09:27:44 -04:00
Wilson Snyder
1f19e8e206 Tests: Add test case for #2895. 2021-06-06 09:17:56 -04:00
Geza Lore
258d9adfea
Aid IDE code linking in V3AstNodes.h (#3009) 2021-06-05 17:40:56 +01:00
Miodrag Milanović
fa063574d0
Fix Makefiles to support Windows EXEEXT usage (#3008). 2021-06-04 12:04:55 -04:00
Geza Lore
eea7e1bd2a
Do not emit leading spaces on blank lines (#3007) 2021-06-04 15:00:13 +01:00
Wilson Snyder
fb561d925a Commentary (#2996) 2021-06-03 21:19:11 -04:00
Wilson Snyder
9f5eb8f66e Commentary 2021-06-03 21:15:42 -04:00
Julien Margetts
1f331bd94f
Fix part select issues in LATCH warning. (#2948) (#2938) 2021-06-01 09:01:18 -04:00
Wilson Snyder
2143bcfad5 Fix constant function calls with uninit value (#2995). 2021-05-31 22:46:41 -04:00
Geza Lore
e1f9fffb42
Fix --protect-ids when using SV classes (#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.
2021-05-31 13:40:22 +01:00
Pieter Kapsenberg
e4dcbb22e3
Fix unused variable warnings (#2991) 2021-05-30 20:19:35 -04:00
Geza Lore
f4c1a7efeb
Emit: Fix indent tracking when // inside string literal (#2990)
// was so far unconditionally treated as comment.
c443e229ee introduced a string literal in
the output that contained a http:// url, which broke the indent
tracking. No functional change intended
2021-05-29 23:46:15 +01:00
Geza Lore
ef9f477df2
Make _ctror_var_reset and _configure_coverage static. (#2977)
Another step towards #2958/#2140. Make the mentioned generated functions
static for modules (but not for classes).
2021-05-22 18:50:55 +01:00
Geza Lore
2dd5ef5e8b
Internals: Move --coverage and --savable check out of V3EmitC (#2976) 2021-05-22 12:27:32 +01:00
github action
a43eba7011 Apply clang-format 2021-05-22 10:14:07 +00:00
Geza Lore
61c9866a1e
Internals: Generate ASTGEN_SUPER_* macros instead of expanding. (#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.
2021-05-22 11:13:02 +01:00
Wilson Snyder
63782556ae Internals: Fix some pylint warnings 2021-05-21 20:47:53 -04:00
Geza Lore
8814111724
Rework Ast hashing to be stable (#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.
2021-05-21 14:34:27 +01:00
Geza Lore
fd35492226
Split V3Hashed to V3Hasher and V3DupFinder (#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 (#2964)
2021-05-21 01:41:46 +01:00
Geza Lore
a44d2b2570 Move unreleased changes in right place in Changelog 2021-05-20 11:30:44 +01:00
Wilson Snyder
aba3883092 Commentary on MULTIDRIVEN (#2972). 2021-05-19 08:14:14 -04:00
Geza Lore
9699192de8
Don't merge bit select assignments in C code (#2971) 2021-05-18 14:28:48 -04:00
Wilson Snyder
0f7ec6c9ba Fix missing array include (#2966) 2021-05-17 18:24:18 -04:00
Geza Lore
471f14d26a
Clean up V3Combine (#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).
2021-05-17 13:26:24 +01:00
Wilson Snyder
bdc162db87 Fix 16.04 gcc warning 2021-05-16 18:38:43 -04:00
Wilson Snyder
706842d093 CI: Disable Ubuntu-18.04 clang (#2963) 2021-05-16 15:11:39 -04:00
Yutetsu TAKATSUKASA
31779b8b8b
Format time string using integer (#2940)
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
2021-05-16 19:01:03 +09:00
Geza Lore
80d62adec7
Make all AstNode* base class constructors protected. (#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.
2021-05-15 21:10:16 +01:00
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