Commit Graph

3078 Commits

Author SHA1 Message Date
Geza Lore
d6237e55b2 Internals: Add AstUserNAllocator utility classes.
These utility classes can be used to hang advanced data structures off
AstNode user*u() pointers, and they take care of memory management for
the client. Use via the call operator().
2021-06-18 16:22:51 +01:00
Geza Lore
3ec1e9eb07 Localize variables from other modules when possible
V3Localize can now localize variable references that reference variables
located in scopes different from the referencing function. This also
means V3Descope has now moved after V3Localize.
2021-06-18 16:22:51 +01:00
Geza Lore
d5bdd07c01 Fix out of bounds index into VlWide under AstSel
When part selecting bits via an AstSel in a VlWide, V3Expand used to do
something akin to:

word_index = lsb / 32;
bit_index = lsb % 32;
result =
  wide[word_index + 1] << (32 - bit_index) | wide[word_index] >> bit_index;

The unconditional "+ 1" can cause an out of bounds access into the
VlWide, when the whole of the select is into the most significant word
(i.e.: when word_index is already the most significant word).  We now
emit roughly this instead:

lo_word_index = lsb / 32;
bit_index = lsb % 32;
hi_word_index = (lsb + width - 1) / 32;
result =
  wide[hi_word_index] << (32 - bit_index) | wide[lo_word_index] >> bit_index;

i.e.: we explicitly calculate which word the MSB of the select falls
into, and address that word, rather than the unconditional + 1. The
shifts ensure we still yield the right result, even if lo_word_index and
hi_word_index are the same.

Note: The actual expression created by V3Expand can be a bit more
complicated as we might need to access 3 words when the result is a
QData, all 3 word indices are calculated explicitly.
2021-06-18 14:31:01 +01:00
Geza Lore
0a28fc8c63 Internals: minor cleanup to V3Descope 2021-06-17 14:30:15 +01:00
Geza Lore
9eafca5e28
Remove deprecated --no-relative-cfuncs (#3024) 2021-06-16 23:17:43 -04:00
Geza Lore
729bd268de Internals: make AstCFunc::m_isStatic a bool.
All functions are now known to be static or not static when they are
created, so turn the isStatic flag into a bool (from VBoolOrUnknown).
2021-06-16 14:24:28 +01:00
Geza Lore
6c332a2f8e Emit: Remove emitVarCmtChg
emitVarCmtChg used to emit MTask affinity of variables in comments in
the generated header. This causes unnecessary changes in the output when
scheduling changes slightly between compilation, hindering ccache reuse.
If needing this info for debugging Verilator, add a separate dump file
instead of emitting it in the generated code.
2021-06-16 14:24:25 +01:00
Geza Lore
a8f83d5758
Construct AstExecGraph implementation outside of V3EmitC. (#3022)
The goal of this patch is to move functionality related to constructing
the thread entry points and then invoking them out of V3EmitC (and into
V3Partition). The long term goal being enabling V3EmitC to emit
functions partitioned based on header dependencies. V3EmitC having to
deal with only AstCFunc instances and no other magic will facilitate
this.

In this patch:
- We construct AstCFuncs for each thread entry point in
V3Partition::finalize and move AstMTaskBody nodes under these functions.
- Add the invocation of the threads as text statements within the
AstExecGraph, so they are still invoked where the exec graph is located.
(the entry point functions are still referenced via AstCCall or
AstAddOrCFunc, so lazy declarations of referenced functions are created
automatically).
- Explicitly handle MTask state variables (VlMTaskVertex in
verilated_threads.h) within Verilator, so no need to text bash a lot of
these any more (some text refs still remain but they are all created
next to each other within V3Partition.cpp).

The effect of all this on the emitted code should be nothing but some
identifier/ordering changes. No functional change intended.
2021-06-16 12:18:56 +01:00
Geza Lore
c75a686081
Internals: Update to clang-format-11 (#3021) 2021-06-14 14:50:40 -04:00
Geza Lore
0c4d88bacc Fix V3Hash when building -m32 2021-06-13 23:19:25 +01:00
Wilson Snyder
13ddd0bc1c Fix error on unsupported recursive functions (#2957). 2021-06-13 12:38:31 -04:00
Wilson Snyder
9d3e800311 Commentary 2021-06-13 12:03:53 -04:00
Geza Lore
7280307a39 Implement DPI import/export as loose functions 2021-06-13 15:06:28 +01:00
Geza Lore
c207e98306
Implement a distinct constant pool (#3013)
What previously used to be per module static constants created in
V3Table and V3Prelim are now merged globally within the whole model and
emitted as part of a separate constant pool. Members of the constant
pool are global variables which are declared lazily when used (similar to
loose methods).
2021-06-13 15:05:55 +01:00
Geza Lore
60d5f0e86b
Emit model implementation as loose methods. (#3006)
This patch introduces the concept of 'loose' methods, which semantically
are methods, but are declared as global functions, and are passed an
explicit 'self' pointer. This enables these methods to be declared
outside the class, only when they are needed, therefore removing the
header dependency. The bulk of the emitted model implementation now uses
loose methods.
2021-06-13 14:33:11 +01:00
Geza Lore
e6e7bd8d83 Compile the debug build with -Og -ggdb -gz if supported.
Check the C++ compiler for -Og via configure and use it if available.

Per the GCC manual:
-Og should be the optimization level of choice for the standard
edit-compile-debug cycle, offering a reasonable level of optimization
while maintaining fast compilation and a good debugging experience. It
is a better choice than -O0 for producing debuggable code because some
compiler passes that collect debug information are disabled at -O0.

The debug exe is painfully slow on large designs, hopefully this is an
improvement.

Similarly, check for and use -gz to compress the debug info as it is
huge otherwise. This should help with distribution and caching on CI.

Also checks for -ggdb via configure for compatibility.
2021-06-12 23:25:58 +01:00
Geza Lore
b1c7de4ad5 Minor compiler compatibility fixes
- Initialize variable to avoid 'may be uninitialized' warning
- More reliable segfault (the previous version was compiled into an
undefined instruction by clang sometimes, thew new one is always a store
to zero).
2021-06-12 23:25:58 +01:00
Geza Lore
24b3816f5e Improve distribution of V3Hash/V3Hasher
- Better combining, without multiplication, which means a 0 hash value
is now allowed.
- Do not OR in bottom bits (this was used to avoid a 0 hash but had the
side effect of hashing 0 and 1 to the same value, which are actually
common inputs.
- Hash whole content of V3Number. This does not seem to be noticeable in
runtime, but quite often the bottom word can be a special value like
zero while the rest of the content varies.
2021-06-09 21:17:02 +01:00
Wilson Snyder
b976b8dac9 Fix slowdown in elaboration (#2911). 2021-06-06 22:09:30 -04:00
Wilson Snyder
8f2e4f6bb0 Fix clang warning. 2021-06-06 10:32:50 -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
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
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
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
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
9699192de8
Don't merge bit select assignments in C code (#2971) 2021-05-18 14:28:48 -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
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
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
f7c23c4ade
Internals: Set missing timescale though it is not referred yet. (#2946) 2021-05-11 22:38:13 +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
Jonathan Drolet
2bf248bf60
Add TRACE_THREADS to CMake (#2934) 2021-05-08 08:18:08 -04:00
Todd Strader
b2139f65d8
VPI memory access for packed arrays (#2922) 2021-05-07 07:17:54 -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
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
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
8749f545b6 Partial fix to avoid init error on lint-only (#2895) 2021-04-24 09:49:23 -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
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
Todd Strader
70c1eda174
Fix package reported as vpiModule (#2885) 2021-04-12 15:00:36 -04:00
Wilson Snyder
adce7ecf4b Documentation has been rewritten into a book format. 2021-04-11 18:55:06 -04:00
Udi Finkelstein
23c243bb82
Add support for null ports (#2875) 2021-04-09 10:39:46 -04:00
Wilson Snyder
e2c11cceb8 Fix select of with index variable (#2880). 2021-04-08 19:35:03 -04:00
github action
52fc134272 Apply clang-format 2021-04-07 13:56:12 +00:00
Àlex Torregrosa
2b2680770b
Improve scope types in FST and VCD traces (#2805). 2021-04-07 09:55:11 -04:00
Wilson Snyder
cb95a7294f Fix backtrace on bisonpre error 2021-04-06 18:07:28 -04:00
Àlex Torregrosa
a29ac44af9
Add FST SystemC tracing (#2806) 2021-04-06 16:18:58 -04:00
Wilson Snyder
961a2fef61 Some minor preliminary docs reorg 2021-04-04 22:05:44 -04:00
Geza Lore
4f36e3e6c9
Fix incorrect condition in varNotReferenced (#2873)
The intention was to not merge impure assignments, but the actual
predicate failed if the assignment was indeed pure.

This fix gains 1.5% speed on SweRV EH1.
2021-04-03 12:57:06 -04:00
Wilson Snyder
273fcce095 Fix test error in last commit 2021-04-01 19:51:22 -04:00
Udi Finkelstein
0ea5af40c5
Add PINNOTFOUND warning in place of "Pin not found" error (#2868) 2021-04-01 18:17:42 -04:00
Wilson Snyder
c62546c761 Add --coverage-max-width (#2853). 2021-03-29 18:54:51 -04:00
Wilson Snyder
f26a7c2a5d Fix --comp-limit-parens with real data types 2021-03-28 20:18:18 -04:00
Wilson Snyder
2ca21c01d2 Internal coverage improvements 2021-03-28 20:03:08 -04:00
Rupert Swarbrick
d6c2e2faf6
Allow overlaps in priority case statements (#2864)
This will still warn if a case item is completely covered by previous
items, but will no longer complain about overlaps like this:

    priority casez (foo_i)
      2'b ?1: bar_o = 3'd0;
      2'b 1?: bar_o = 3'd1;

Before, there was a warning for the second statement because the first
two patterns match 2'b11.
2021-03-28 19:57:36 -04:00
Wilson Snyder
05db4e41cd Add better suggestions on some bad options. 2021-03-27 13:14:43 -04:00
Wilson Snyder
5b4448de23 Internals: Add some std::'s. No functional change intended. 2021-03-26 23:22:52 -04:00
Wilson Snyder
ca01d6f18d Internals: Add some std::'s. No functional change intended. 2021-03-26 21:23:18 -04:00
Todd Strader
ee25114a00
interface localparam access (#2859) 2021-03-26 18:27:38 -04:00
Todd Strader
87728a9ee3
Fix --public-flat-rw / DPI issue (#2858) 2021-03-26 18:24:31 -04:00
Yutetsu TAKATSUKASA
4e41c13501
Structurize option parser (#2809)
Add V3OptionsParser that can suggest correct option.


Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
Co-authored-by: github action <action@example.com>
2021-03-26 22:48:24 +09:00
Wilson Snyder
7ea014dab5 Fix false WIDTHCONCAT on casted constant (#2849). 2021-03-23 19:49:57 -04:00
Wilson Snyder
93eabb83b2 Cleanup some python warnings. No functional change. 2021-03-20 17:37:24 -04:00
Wilson Snyder
29505ef013 Support arrayed parameter functions partial (#2846) 2021-03-19 18:44:26 -04:00
Wilson Snyder
a159c41219 Fix USERINFO etc to show message with no arguments 2021-03-18 18:46:07 -04:00
Wilson Snyder
334e42b38e Cleanup REDEFMACRO to not show two separate warnings 2021-03-17 20:33:31 -04:00
Wilson Snyder
96f9f8558b Mark --no-relative-cfuncs as scheduled for deprecation. 2021-03-17 18:59:45 -04:00
Wilson Snyder
c20bced485 Fix --output-split with class extends (#2839). 2021-03-17 18:25:54 -04:00
Wilson Snyder
dfab80fab1 Fix false TIMESCALEMOD on generate-ignored instances (#2838). 2021-03-16 22:52:29 -04:00
Wilson Snyder
26c0fa0a6a Fix --timescale-override not suppressing TIMESCALEMOD (#2838). 2021-03-16 22:42:28 -04:00
Wilson Snyder
12eb4e85ac Changed TIMESCALEMOD from error into a warning. (#2838) 2021-03-16 21:58:15 -04:00
Wilson Snyder
8350c381c2 Add EOFNEWLINE warning when missing a newline at EOF. 2021-03-14 21:23:48 -04:00
Wilson Snyder
ba1f53a070 Improve DEFPARAM warning text. 2021-03-14 20:37:50 -04:00
Wilson Snyder
e6b19d557e Fix false $dumpfile warning on model save (#2834). 2021-03-14 09:08:17 -04:00
Wilson Snyder
9dcda6947d Fix unpacked-in-class pattern assignment 2021-03-13 13:39:29 -05:00
Wilson Snyder
e3788e871e Fix unpacked-in-class array reference assignments 2021-03-13 13:04:13 -05:00
Wilson Snyder
1b4a82acde Verilated signals now use VlUnpacked in place of C arrays. (#2774) partial. 2021-03-13 12:37:19 -05:00
Wilson Snyder
689d5b5090 Internals: Add std:: to make_pair. No functional change. 2021-03-12 18:17:49 -05:00
Wilson Snyder
3a55600913 Internals: Restyle with C++11 using replacing typedef 2021-03-12 18:10:45 -05:00
Wilson Snyder
404b323f8c Internals: Remove some unnecessary typedefs. No functional change. 2021-03-12 17:26:53 -05:00
Wilson Snyder
29ed866061 Fix range inheritance on port without data type (#2753). 2021-03-11 19:22:19 -05:00
Wilson Snyder
7469166c38 Fix or-reduction on different scopes broken in 4.110 (#2828). 2021-03-10 18:08:11 -05:00
Wilson Snyder
5a4e4b2dcd Add -Oo to disable const bit tree (#2830). 2021-03-10 17:47:31 -05:00
Wilson Snyder
9483ebefae Internal code coverage cleanups. 2021-03-07 21:05:15 -05:00
Wilson Snyder
6ff1911110 Tests: Cover some internal code coverage issues 2021-03-07 13:52:37 -05:00
Wilson Snyder
2cad22a22a
Add simulation context (VerilatedContext) (#2660). (#2813)
**   Add simulation context (VerilatedContext) to allow multiple fully independent
      models to be in the same process.  Please see the updated examples.
**   Add context->time() and context->timeInc() API calls, to set simulation time.
      These now are recommended in place of the legacy sc_time_stamp().
2021-03-07 11:01:54 -05:00
Wilson Snyder
47dcbd4b8a Internal: Remove deprecated/insecure functions. No functional change intended. 2021-03-06 10:34:03 -05:00
Yutetsu TAKATSUKASA
cf9ac8270b
Internals: Remove duplicated entry of -quiet-exit. No functional change is intended. (#2821) 2021-03-05 23:11:54 -05:00
Wilson Snyder
de774ac4d8 Cleanup python code style issues. No functional change intended. 2021-03-05 22:52:39 -05:00
Wilson Snyder
81ef8fb201 Cleanup python code style issues. No functional change intended. 2021-03-05 21:59:00 -05:00
Yutetsu TAKATSUKASA
97b869e5d8
Internals: Mark some functions of VSpellCheck 'const'. No functional change is intended. (#2817) 2021-03-04 22:08:44 +09:00
Wilson Snyder
ed2f8dc097 Internals: Rename some internal functions etc to avoid _V 2021-03-03 22:53:50 -05:00
Wilson Snyder
be31fdcfe4 Use Google-style-guide header guard naming, to avoid __ prefix. 2021-03-03 21:57:07 -05:00
David Turner
e81abdb616
Fix slice-assign overflow bug (#2803) (#2811) 2021-03-01 18:20:56 -05:00
Wilson Snyder
fec5e69ec5 --inhibit-sim is planned for deprecation, file a bug if this is still being used. 2021-02-28 09:26:06 -05:00
Wilson Snyder
05e5fb04ed Fix formatting vars in protect-lib wrapper 2021-02-27 20:06:48 -05:00
Wilson Snyder
ce78d6e438 Fix flexfix to directly run with python. 2021-02-25 21:19:37 -05:00
Wilson Snyder
dad86b9a84 Tests: Fix leak found by previous commit 2021-02-25 20:38:38 -05:00
Wilson Snyder
e1a48dcb07 Fix spacing 2021-02-25 20:13:13 -05:00
Wilson Snyder
c95e606c0a Fix range inheritance on port without data type (#2753). 2021-02-24 18:21:13 -05:00
Wilson Snyder
9650aefa42 Internals: Cleanup unneeded {}. No functional change 2021-02-21 21:25:21 -05:00
Wilson Snyder
3ae75926e4 Inline old VL_CTOR macros. 2021-02-21 12:12:11 -05:00
Wilson Snyder
18f3df438e For generated --main, use unique_ptr. No functional change intended. 2021-02-21 11:02:02 -05:00
Yutetsu TAKATSUKASA
bb5384bc50
Optimize bit op tree #2186, #2632, and #2633 (#2751)
* Tests:Add some more signals to t_const_opt_red.v

* Optimize bit op trees such as ~a[2] & a[1] & ~a[0] to 3'b010 == (3'111 & a)

* Update src/V3Const.cpp

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

* Update src/V3Const.cpp

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

* Update src/V3Const.cpp

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

* Apply clang-format

* Don't edit and-or tree.

* Call matchBitOpTree() after V3Expand does its job.

* Internals: Rename newNodep -> newp. No functional change is intended.

* Internals: Remove m_sels. No functional change is intended.

* Internals: Remove stringstream. No functional change is intended.

* Internals: Use V3Number::bitIs1(). No functional change is intended.

* Internals: Use V3Number instead of std::map. Resolved laek. Result should be same.

* Internals: Resolve overload of setPolarity. No functional change is intended.

* Internals: Pass failure reason. No functional change is intended.

* Internals: Add VNUser::toPtr(). No functional change is intended.

* Internals: Use user4 instead of std::map. No functional change is intended.

* Catch up with the AST style aftre V3Expand

* Internals: Rename Context to VarInfo. No functional change is intended.

* Add some more test case

* tests:Add stats to tests
Update stats in t_merge_cond.pl as matchBitopTree does some of them.

* insert CCast if necessary

* small optimization to remove redundant bit mask

* No quick exit even when unoptimizable node is found.

* Simplify removing redundant And

* simplify

* Revert "Internals: Add VNUser::toPtr(). No functional change is intended."

This reverts commit f98dce10db.

* Consider AstWordSel and cleanup

* Update test

* Update src/V3Const.cpp

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

* Update src/V3Const.cpp

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

* Update src/V3Const.cpp

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

* Update src/V3Const.cpp

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

* Update src/V3Const.cpp

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

* Update src/V3Const.cpp

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

* Apply clang-format

* Internals: rename variables. No functional change is intended.

Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
Co-authored-by: github action <action@example.com>
2021-02-21 18:11:33 +09:00
Wilson Snyder
fd6edd90bc Fix little endian interface pin swizzling (#2475). 2021-02-20 22:11:20 -05:00
Wilson Snyder
191f76dd90 Increase LINE_TOKEN_MAX (#2752). 2021-02-20 20:55:38 -05:00
Wilson Snyder
975c1b39a9 Fix little endian packed array pattern assignment (#2795). 2021-02-20 20:29:28 -05:00
Yutetsu TAKATSUKASA
62e877ebf0
Add transformation of '^(const ^ a)' -> '(^const) ^ (^a)' (#2800)
* Add transformation of '^(const ^ a)' -> '(^const) ^ (^a)'

* Use TREEOP instead of TREEOPC
2021-02-20 23:16:55 +09:00
Yutetsu TAKATSUKASA
120322df3e
Remove redundant AND with 1 (#2791) 2021-02-18 19:28:49 +09:00
Wilson Snyder
22e299e78e Support concat selection (#2721). 2021-02-17 23:03:47 -05:00
Wilson Snyder
2b2fe13e79 Tests: Add unsupported test for interface typedef (#2783) 2021-02-16 22:31:30 -05:00
Wilson Snyder
64887bd92d Commentary 2021-02-16 20:40:16 -05:00
Wilson Snyder
43cf5693d1 Fix shifts by > 32 bit values (#2785). 2021-02-14 11:15:12 -05:00
Wilson Snyder
20b3f0efa0 Fix class extends with VM_PARALLEL_BUILDS (#2775). 2021-02-13 17:29:34 -05:00
Àlex Torregrosa
e77e4e1fe6
Improve struct scopes when dumping structs to VCD (#2776) 2021-02-03 14:40:21 -05:00
Samuel Riedel
483516ce4e
Fix build to execute vlcovgen with python3. (#2773) 2021-01-28 15:01:33 -05:00
Wilson Snyder
05bb24df6c Fix $fread extra semicolon inside statements. 2021-01-26 22:20:16 -05:00
Wilson Snyder
31223d4058 Fix $ in filenames (#2768). 2021-01-26 20:10:38 -05:00
Paul Wright
d891e5ac3a
Fix to exclude strings from toggle coverage (#2766) (#2767) 2021-01-25 07:33:38 -05:00