Commit Graph

4458 Commits

Author SHA1 Message Date
github action 54922c036a Apply 'make format' 2024-01-14 00:53:31 +00:00
Adrian Sampson 2e999a5441
Fix too null pointer dereference (#4810) (#4825) 2024-01-13 20:52:50 -04:00
Tim Hutt 5073f208af
Internals: Use more standard syntax for avoiding unused variable warnings (#4826) 2024-01-13 15:34:59 -05:00
Wilson Snyder 21bf2d62d2 Fix mis-splitting of dump control functions (#4821). 2024-01-12 08:19:30 -05:00
Wilson Snyder fcdd8e5da6 Fix missing includes with multiple inheritance (#3819 partial) 2024-01-11 20:19:48 -05:00
Andrew Nolte ab47fc6656
Fix localparam elaboration (#3858) (#4794) 2024-01-11 07:49:07 -05:00
Szymon Gizler 5f52c066e5
Internals: Add serializeOnly() and dumpTreeEitherLevel() (#4815) (#4715). No functional change intended. 2024-01-09 10:35:13 -05:00
Anthony Donlon 55d1b87b34
Support parsing anonymous primitive instantiations (#4809) 2024-01-07 10:59:56 -05:00
Wilson Snyder eec41fd039 Fix lint_off disables on preprocessor warnings (#4703). 2024-01-06 18:49:19 -05:00
Wilson Snyder 0ca90257a5 Add predicted stack overflow warning (#4799). 2024-01-06 16:14:58 -05:00
Wilson Snyder 5294140753 Fix delays using wrong timeunits when modules inlined (#4806). 2024-01-05 18:07:24 -05:00
Wilson Snyder a36a07c297 Internals: Favor UASSERT over v3fatalSrc. No functional change intended. 2024-01-05 18:00:06 -05:00
github action 4172c0f29e Apply 'make format' 2024-01-03 12:13:21 +00:00
Pengcheng Xu ec01008fe3
Change zero replication width error to ZEROREPL warning (#4753) (#4762) 2024-01-03 07:11:50 -05:00
Mariusz Glebocki 719954a24a
Internals: Make V3Const.cpp parseable by non-compilers (#4796) 2024-01-02 14:51:40 -05:00
Wilson Snyder e76f29e5ba Copyright year update 2024-01-01 03:19:59 -05:00
Wilson Snyder 54ad04b6e9 Fix 'for' loop with outside variable reference (#4660). 2023-12-24 10:17:44 -05:00
Fan Shupei 540cd772e4
Add user C/C++ code to final achieve, and make a libmodel.a (#4749) (#4754) 2023-12-23 09:31:10 -05:00
Krzysztof Bieganski 621de301c7
Run the `V3Fork` stage only if `--timing` is set (#4778)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2023-12-22 22:57:45 +01:00
Wilson Snyder 8769c1a92b Internals: Add -fno-dead-cells, -fno-dead-assigns for debug use 2023-12-22 16:26:51 -05:00
github action 8e1c0b0852 Apply 'make format' 2023-12-21 12:49:55 +00:00
Jordan McConnon 56d6791205
Support invoking interface methods on virtual interface variables (#4774) (#4775) 2023-12-21 07:49:07 -05:00
Krzysztof Bieganski 016e630ecf
Refine dynamic NBA condition (#4773)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2023-12-20 18:12:17 +01:00
Wilson Snyder 69b779b4a8 Internals: Cleanup cpp-check warnings. No functional change. 2023-12-20 07:49:03 -05:00
Wilson Snyder 55ad950609 Fix power operator with wide numbers and constants (#4721) (#4763) 2023-12-19 19:22:54 -05:00
Todd Strader 654ab117f2
Fix tracing FST enums (#4661) (#4756) 2023-12-19 11:07:06 -05:00
Geza Lore c5ba6e22fa Minor cleanup of trace internals 2023-12-12 20:27:16 +00:00
Geza Lore 6012ec8eb7 Put dynamic NBA commit in eval_phase__nba
Fixes #4634
2023-12-12 18:11:43 +00:00
Mariusz Glebocki 75a44e5aa9
Fix deadlocks in error handler (#4672) 2023-12-12 08:10:01 -05:00
Ryszard Rozak a811f2e17d
Support inside operator on unpacked arrays and queues (#4751) 2023-12-12 09:20:22 +01:00
Ryszard Rozak b60117c713
Fix typedefs pointing to parameterized classes (#4747)
* Skip handling of ClassOrPackageRef nodes that point to Typedefs
2023-12-08 07:13:38 -05:00
Ryszard Rozak 1ececf1127
Support multiple parameters in virtual interfaces (#4745) 2023-12-07 13:56:16 +01:00
Geza Lore f3bace10ae
Improve V3Premit performance etc. (#4736)
- Enable creating constant pool entries for RHS of simple
  var = const assignments
- Never extract ArraySel (it's just pointer arithmetic)
- Remove unnecessary AstTraceInc precond child tree
- Always fully recurse expressions (fix transplanted from #4617)
- General cleanup

Overall the patch is performance neutral to slightly positive, but saves
~10% peak Verialtor memory usage due to not creating temporaries (which
are later expanded) for any ArraySels.
2023-12-06 09:42:46 -05:00
Wilson Snyder 39d9bd4d47 Internals: V3LinkDot fix missing restorer. 2023-12-06 08:29:33 -05:00
Ryszard Rozak eb2cfe1d19
Support parameterized virtual interaces (#4047) (#4743) 2023-12-06 08:02:04 -05:00
Ryszard Rozak ca5a7d7656
Add class name in the error msg about calling 'new' on virtual class (#4739) 2023-12-05 16:31:59 +01:00
Krzysztof Bieganski ea2084392f
Support --timing triggers for virtual interfaces (#4673) 2023-12-04 22:11:07 -05:00
Wilson Snyder b4baa7ce02 Internals: Avoid extranious base class calls in recent commit. 2023-12-01 19:05:21 -05:00
Krzysztof Boroński bd38c8fe3c
Fix # 0 delays for process resumption, etc. (#4697) 2023-12-01 13:08:58 -05:00
Todd Strader 9a0748d8ed
vpi_iterate packages with vpiInstance (#4726) 2023-12-01 07:34:09 -05:00
Wilson Snyder feae9ca4aa
Internals: Use astgen for cross-node pointers. No functional change intended. (#4727) 2023-11-30 19:58:16 -05:00
Ryszard Rozak d1ee9827a0
Fix block names of nested do..while loops (#4728) 2023-11-30 14:32:12 +01:00
Krzysztof Bieganski b820e1b587
Support `iff` in sensitivity list (#1482) (#4626)
Adds a new field to `AstSenItem` that stores the `iff` condition which is then handled by `SenExprBuilder`.

Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2023-11-29 19:10:32 +01:00
Ryszard Rozak ebfc2a4942
Fix parameter passing to ports (#4723)
Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
2023-11-29 17:07:23 +00:00
Wilson Snyder 7167d4bdc0 Fix shift of > 32-bit number (#4719). 2023-11-27 21:41:32 -05:00
William D. Jones a7a48221d3
Fix Windows include gates in filesystemFlush implementation. (#4720) 2023-11-26 05:26:20 +01:00
Wilson Snyder e5118661a7 Commentary 2023-11-24 13:02:05 -05:00
Wilson Snyder 58d9a5ebac Use newline instead of endl, for fewer stream flushes 2023-11-24 11:45:52 -05:00
Wilson Snyder fae7f11222 Fix compilers seeing empty input due to file system races (#4708). Part 2. 2023-11-22 05:18:13 -05:00
Wilson Snyder 1986e62477 Internals: Remove unused append dumpTreeFile option 2023-11-21 22:32:13 -05:00
Wilson Snyder 0ee2a0e6d7 Don't remove DepSet as messes with skip-identical, part of last commit 2023-11-21 22:08:47 -05:00
Wilson Snyder 2b28ddd0c6 Fix MSWIN compile in last commit 2023-11-21 21:49:36 -05:00
Wilson Snyder b15ef49c57 Fix compilers seeing empty input due to file system races (#4708). 2023-11-21 21:22:35 -05:00
Wilson Snyder ed05caec93 Rename __hier*.f files to match other generated files 2023-11-21 20:31:54 -05:00
github action ead27db9f0 Apply 'make format' 2023-11-21 02:02:56 +00:00
Jinyan Xu 4650105d90
Fix conflicted namespace for coroutines (#4701) (#4707) 2023-11-20 21:02:10 -05:00
Krzysztof Bieganski b8417abee5
Fix dynamic NBAs with automatic vars (#4696)
This patch addresses two issues with NBAs in non-inlined functions/tasks:
- If the NBA writes to a local automatic var, the var could cease to exist before the NBA executes. This is normally addressed by fork dynscopes (#4356), but NBA-to-fork transformation happens way after `V3Fork` (in `V3Timing`). To solve this, we put NBAs that write to locals under forks in `V3Fork` already. This way, such locals will be put in dynscopes, and will still exist after the task containing the NBA exits.
- The above change means that any writes in forks other than `fork..join` should be handled by `V3Fork`. Thus, in `V3SchedTiming`, we only have to worry about read references, so we can simply copy all remaining locals. Because we copy, lifetimes are not an issue. This fixes a bug that allowed assignment intravals to be overwritten if they go out of scope in the containing function.
2023-11-16 11:21:23 +01:00
Krzysztof Boroński cc982ec7fe
Fix range access to fields under classes that depend on parameter resolution (#4681)
Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
2023-11-15 14:24:41 +01:00
Ryszard Rozak 2dba76a7c2
Fix access type of function arguments (#4692) (#4694) 2023-11-14 17:02:13 -05:00
Wilson Snyder 9fd5634778 Internals: Remove unneeded private's. No functional change 2023-11-13 21:37:45 -05:00
Wilson Snyder c8063e5732 Internals: Misc cleanups in V3Graph and V3Dead. No functional change. 2023-11-12 22:08:08 -05:00
Wilson Snyder ee3ba7c761 Internals: Use faster VNVisitorConst where able. No functional change intended. 2023-11-12 18:26:40 -05:00
Geza Lore 2882737bcd
V3Const: Fix select into And/Or/Xor pattern (#4689) 2023-11-12 19:41:18 +00:00
Geza Lore 47588f343b
astgen: Enforce the use of aliased operand accessors (#4688)
This patch enforces the use of the most specific accessors for operands
which have an '@astgen alias' declaration, by making the superclass
accessors of the same operands private. This ensures client code is
cleaner as you can't use multiple different methods to reference the
same operands (which we used to in some places). Also prep for some
refactoring.
2023-11-12 18:30:48 +00:00
Geza Lore 1c0af6c7bc
Reduce peak memory use of V3Subst (#4687)
V3Subst is currently the pass responsible for peak memory usage. This
patch saves ~16% of peak memory on OpenTitan.

2 changes:
- It is actually safe to delete the substituted expressions immediately,
  but this is the lesser contribution
- More importantly, we only ever substitute STMTTEMP variables, which
  are always defined within the same CFunc, so we can limit the scope of
  the optimization to CFunc. This allows us to reclaim the SubstVarEntry
  structures at the end of every CFunc, rather than at the end of the
  whole pass, which gives us most of the memory savings.

Generated output is identical
2023-11-12 16:01:07 +00:00
Geza Lore b07ffb3c78
Cleanup V3Gate (#4667) (#4685)
Lot of redundant/dead/obsolete code here. NFCI, but contains some minor
bug fixes.
2023-11-12 15:29:25 +00:00
Geza Lore bea82def10
Add node memory usage info to V3Stats (#4684) 2023-11-12 14:19:53 +00:00
Wilson Snyder 671a857560 Fix compiler warning on 'wait' with non-zero constant. 2023-11-12 08:44:55 -05:00
Wilson Snyder eff2d977c1 Fix mis-elimination of variables across randomize() 2023-11-12 07:32:08 -05:00
Wilson Snyder 9d7f5bdc26 Internals: Dump CFunc entry points. 2023-11-11 20:34:51 -05:00
Wilson Snyder 99dbd23f1b
Support passing constraints to --xml-only output (still otherwise unsupported) (#4683) 2023-11-11 20:20:37 -05:00
Wilson Snyder cad2780219 Fix display with no % printing assoc array (#4376). 2023-11-11 15:28:44 -05:00
Wilson Snyder 4636a7f14b Internals: Fix uninitalized variables (#4636) 2023-11-11 14:58:54 -05:00
Wilson Snyder 706534ffe1 Fix 'for' loop with outside variable reference (#4660). 2023-11-11 14:47:54 -05:00
Wilson Snyder f3ae4b8786 Fix spelling 2023-11-10 23:25:53 -05:00
David Ledger 9a65ed4ce2
Fix Mingw Compilation (#4675) 2023-11-08 06:27:56 -05:00
Marlon James 5ba7084815
Fix VPI TOP level variable iteration (#3919) (#4618) 2023-11-07 07:47:55 -05:00
Wilson Snyder dc10118d3b
Fix C++20 compilation errors (#4670) 2023-11-06 07:13:31 -05:00
Geza Lore c563175ff0
Fix scheduling of external force signals (#4668)
Used to set the wrong public flag on forceEn/forceVal, which means they
were not included in ICO as necessary, but V3Gate tended to inline them,
so this was hard to hit.

Fixes #4577
2023-11-05 16:58:22 +00:00
Krzysztof Boroński b110c55993
Fix a memory leak in V3Fork (#4628) 2023-11-05 11:39:06 -05:00
Geza Lore dc346b7ffa
Remove deprecated options (#4663) 2023-11-04 17:28:36 +00:00
Anthony Donlon 88fcbf5f1d
Fix interface parameters used in loop generate constructs (#4664) (#4665) 2023-11-04 13:19:35 -04:00
Wilson Snyder eace1d9c67 Internals: Use UINFO for preproc debug, to avoid stderr/cout output reordering confusion. 2023-11-04 10:51:14 -04:00
Anthony Donlon d0d39c13e7
Fix linking parameterized hierarchical blocks and recursive hierarchical blocks (#4654) 2023-11-03 07:55:53 -04:00
Anthony Donlon 2733d43ea7
Fix identifiers that end with '_' on Windows (#4655) 2023-11-02 17:53:52 -04:00
Geza Lore ae6ec411d0 Remove dead code from V3EmitV 2023-11-02 20:25:44 +00:00
Geza Lore 8a77af7a6d Remove redundant user*ClearTree calls 2023-11-02 19:16:48 +00:00
Ryszard Rozak a764c70b4a
Fix handling of static keyword in methods (#4649) 2023-10-31 08:15:54 -04:00
Wilson Snyder a27abab65f Fix PCH to recompile on version change 2023-10-31 08:10:41 -04:00
Krzysztof Bieganski f789d28277
Fix signals read via virtual iface optimized out (#4645)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2023-10-30 21:26:46 -04:00
Geza Lore 3c144ada53
Delete AstNode user5 (#4638)
This saves about 5% memory. V3AstUserAllocator is appropriate for most use
cases, performance is marginally up as we are mostly D-cache bound on
large designs.
2023-10-29 01:12:27 +01:00
Wilson Snyder 7ba6647c4f Internals: Cleanup some V3Graph constructors/funcs and docs. No functional change. 2023-10-28 20:11:28 -04:00
Geza Lore e708670f9a Minor memory optimizatoin of AstUser*Allocator 2023-10-28 20:31:57 +01:00
Geza Lore d60f180f43 Avoid double traversal of maps
The typical find/if-not-exists-insert pattern can be achieved with 1
lookup instead of 2 using emplace with a sentinel value. Also maps value
initialize their values when inserted with the [] operator, this is
defined and so there is no need to explicitly insert zeroes for integer
values.
2023-10-28 13:41:43 +01:00
Geza Lore 30318a6654 C++11 cleanup 2023-10-28 11:26:48 +01:00
Geza Lore 2cba167634 Make eval loop construction more unified and the output more readable 2023-10-28 08:48:04 +01:00
Krzysztof Boroński 89743aae5d
Fix stable name generation in V3Fork (#4615) (#4624) 2023-10-27 15:08:02 -04:00
Ryszard Rozak 64af83161a
Fix rand fields of reference types (#4627) 2023-10-26 17:17:23 -04:00
Chih-Mao Chen 98252634fc
Include systemc instead of systemc.h in model header files (#4622) (#4623)
This may require that SystemC programs add:
using namespace sc_core;
using namespace sc_dt;
2023-10-26 14:36:18 -04:00
Krzysztof Boroński a87fb57656
Allow assigning events (#4403)
Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
2023-10-26 16:38:47 +02:00