Commit Graph

4424 Commits

Author SHA1 Message Date
Christian Hecken c267a67f68
Tests: Fix make_main traceEverOn after eval (#6727) 2025-11-24 07:37:49 -05:00
Wilson Snyder 201416a0c7 Tests: Misc cleanups 2025-11-23 17:14:44 -05:00
Geza Lore 6ab8d56993
Optimize combinational loops through sign extension (#6724) 2025-11-23 19:26:51 +00:00
Wilson Snyder 07056b11f5
Tests: add driver.py test.priority settings (#6725) 2025-11-23 11:57:08 -05:00
Geza Lore 6a83112380 Internals: Fix minor macOS issues 2025-11-23 11:04:51 +00:00
Dan Ruelas-Petrisko 9346b98cb6
Support `config` cell clauses (#6717) 2025-11-22 20:17:17 -05:00
Michael Bikovitsky 9632c614be
Fix X handling in UDPs (#6723) 2025-11-22 20:09:49 -05:00
Wilson Snyder 087ca15138 Support clocking output delay `1step` (#6681). 2025-11-22 17:40:40 -05:00
Wilson Snyder 44102de362 Tests: Rename control files to .vc. No test function change. 2025-11-22 12:09:22 -05:00
Geza Lore 7c09985695 Tests: Fix t_dpi_arg_inout_unpack 2025-11-22 14:44:20 +00:00
Wilson Snyder 6bba9f6c40 Internals: Defer interface typedefs, and add more tests (#3441 tests) 2025-11-21 19:42:22 -05:00
Igor Zaworski 98d0eac149
Fix of deleting linked node in V3Randomize (#6718)
Signed-off-by: Igor Zaworski <izaworski@internships.antmicro.com>
2025-11-21 07:07:50 -05:00
Jakub Wasilewski 0b8c369740
Add `sc_biguint` pragma (#6712) 2025-11-20 17:08:59 -05:00
github action 0703159dbc Apply 'make format' 2025-11-20 11:39:49 +00:00
Dan Ruelas-Petrisko a4e901135b
Support `config` default liblist (#6714) 2025-11-20 06:38:46 -05:00
Dan Ruelas-Petrisko 7edf6d4749
Support `--top` specifying `config` name (#6710) 2025-11-19 20:23:02 -05:00
Yilou Wang 00988aed70
Support General Global Constraints (#6709) (#6711) 2025-11-19 11:08:42 -05:00
Christian Hecken edb84f3776
Tests: Add --gdbsim to iverilog with use_libvpi (#6701)
Co-authored-by: Christian Hecken <christian.hecken@ibm.com>
2025-11-17 07:29:45 -05:00
Christian Hecken 5ef235b5ef
Tests: Add v_flags, XRUN define to xrun run flags (#6703) 2025-11-17 05:50:02 -05:00
Wilson Snyder e61012e30d Improve class extends error format 2025-11-16 21:00:13 -05:00
Wilson Snyder eb6ce0799c Tests (#6698 testcase only) 2025-11-16 17:16:21 -05:00
Wilson Snyder 03e5c3b2ff Tests: Reindent some tests. No functional change. 2025-11-16 17:13:01 -05:00
Jean-Nicolas Strauss 6454a8802e
Fix stream operator widening (#6693) (#6697) 2025-11-15 22:52:52 -05:00
Yilou Wang 048c97f0ae
Support `std::randomize(){...}` (#4706) (#6573) 2025-11-14 14:32:01 -05:00
Ryszard Rozak f32095dd17
Support constexpr cycle delay in sequences (#6691) 2025-11-14 13:48:46 +01:00
Pawel Kojma 0dce8feead
Support parsing of dotted bins_expression (#6683) 2025-11-14 06:41:46 -05:00
Geza Lore 43975bcbdd
Optimize $past delayed variable reuse (#6689)
As the TODO in the original code suggested, we can re-use delayed values
of expressions if they appear in multiple $past calls.
2025-11-13 17:04:50 +00:00
Geza Lore a1056c6ae9
Add `-param`/`-port` options to `public_flat*` control directives (#6685) 2025-11-13 06:59:02 -05:00
Wilson Snyder 67094f6a88 Tests: Disable t_udp_sequential until fix (#6056 workaround) 2025-11-12 18:52:17 -05:00
Wilson Snyder 7db8bc84aa Tests: Add more 'config' unsupported tests (#5891 partial) 2025-11-12 18:37:09 -05:00
Geza Lore 158f51fb54
Optimize functions reading external parameters as pure (#6684) 2025-11-12 08:27:42 -05:00
Geza Lore 0dc9f779f8
Add `-fno-inline-funcs-eager` option to disable excessive inlining (#6682) 2025-11-11 21:46:19 +00:00
Geza Lore c5f8656aa0
Fix bounds checking in non-inlined function (#6677) 2025-11-11 06:47:49 -05:00
Wilson Snyder eb40c24b78 Tests: Rename tests to proper categories 2025-11-10 20:56:38 -05:00
Todd Strader 34f63396cb
Fix `free` collision (#6675) 2025-11-10 16:44:41 -05:00
Geza Lore 8e35c81399
Fix --expand-limit not respected for expressions (#6670) 2025-11-10 17:18:33 +00:00
Pawel Kojma 0062a422a4
Support `#1step` delay as statement (#6671) 2025-11-10 09:39:33 -05:00
Artur Bieniek 19bbeb24a6
Fix large array initialization (#6669) 2025-11-10 09:19:08 -05:00
Geza Lore 6e05361318 Tests: Add case for `bind` into parametrised hier_block
Using `bind` into a parametrized hier_block used to be broken due to name
mangling, but was 'unintentionally' fixed by
916a89761e. Adding test to avoid
regressions.
2025-11-10 12:32:10 +00:00
Wilson Snyder fbb195e054 Tests: Add UVM 2020-3.1 hello world 2025-11-09 15:02:22 -05:00
Geza Lore c7ff73a083
Add --unroll-limit option (#6654) (#6668) 2025-11-09 12:46:25 -05:00
Geza Lore f4086496cb
Internals: Refactor file handling in EmitC* (#6667)
Combined the 3 various APIs used in EmitC* passes to handle file
opening/splitting into a single one. This removes a lot of copy paste
and makes everything consistent.

All C++ file handling goes through `EmitCBaseVisitor` using the
`openNewOutputHeaderFile`, `openNewOutputSourceFile` and
`closOutputFile` methods.

To emit a new kind of file, always derive a new class from
`EmitCBaseVisitor`, and use the above APIs, they will take care of
everything else in a consistent matter.

Subsequently also removed V3OutSCFile, and instead included
verilated_sc.h (which included the systemc header itself) in the two
files that need it (the primary model header, and the root module
header).

Functional changes:
- The PCH header did not use to have a corresponding AstCFile. Now it
  does, though this makes no difference in the output
- All 'slow' sources now have '__Slow' in the name automatically (the
  only one missing was for the ConstPool files)

Rest of the output is identical except for the header line now being
present in all generated C++ files.
2025-11-09 17:41:13 +00:00
Paul Swirhun aaafa6e8df
Fix local interface parameter hierarchical access (#6661) (#6666)
Co-authored-by: Paul Swirhun <paulswirhun@gmail.com>
2025-11-09 10:48:55 -05:00
Wilson Snyder c493982511 Spelling fixes 2025-11-08 16:09:45 -05:00
Geza Lore 8ad8d4f807
Fix long C++ compilation due to VerilatedScope constructors (#6664)
The Syms class can contain a very large number of VeriltedScope
instances if `--vpi` is used, all of which need a call to the default
constructor in the constructor of the Syms class. This can lead to very
long compilation times, even without optimization on some compilers.

To avoid the constructor calls, hold VeriltedScope via pointers in the
Syms class, and explicitly new and delete them in the Syms
constructor/destructor. These explicit new/delte can then be
automatically split up into sub functions when the Syms
constructor/destructor become large.

Regarding run-time performance, this should have no significant effect,
most interactions are either during construction/destruction of the Syms
object, or are via pointers already. The one place where we used to
refer to VerilatedScope instances is when emitting an AstScopeName for
things like $display %m. For those there will be an extra load
instruction at run-time, which should not make a big difference.

Patch 3 of 3 to fix long compile times of the Syms module in some
scenarios.
2025-11-08 15:56:15 +00:00
Geza Lore ec3c9832de Fix crash on Dfg driver lookup
Fixes #6649
2025-11-08 13:55:56 +00:00
Geza Lore 3b7ddce207
Optimize run-time symbol table construction of public variables (#6663)
Follow up from #6662 `VerilatedScope::varInsert` can do its work in one
pass, no need to emit it twice.
2025-11-08 13:29:44 +00:00
Geza Lore 0f96bd0f4d
Fix splitting of Syms constructor/destructor bodies (#6662)
Splitting of the Syms constructor/destructor were a bit arbitrarily
enforced with some parts splitable, while others not. There was also an
issue that even if the constructor and destructor bodies were split, we
would still end up with both in the same file that was double the size of
the intended split limit.

To fix, first all statements required in the Syms constructor and
destructor are gathered into a vector, then if the total number of
statements required for both is bigger than the split limit, the
implementations are split into sub-functions, one per file, as before,
ensuring that none of the functions are bigger than the split limit.

Also add __Slow suffix to the names of the files.

Patch 2 of 3 to fix long compile times of the Syms module in some
scenarios.
2025-11-08 10:36:12 +00:00
Geza Lore 2fabf50801
Use explicit ctor/dtor functions for VerilatedModules (#6660)
In order to avoid long compile times of the Syms constructor due to
having a very large number of member constructor sto call, move to using
explicit ctor/dtor functions for all but the root VerilatedModule. The
root module needs a constructor as it has non-default-constructible
members. The other modules don't.

This is only part of the fix, as in order to avoid having a default
constructor call the VerilatedModule needs to be default constructible.
I think this is now true for modules that do not contain strings or
other non trivially constructible/destructible variables.

Patch 1 of 3 to fix long compile times of the Syms module in some
scenarios.
2025-11-07 19:57:10 +00:00
github action eafad9742a Apply 'make format' 2025-11-07 13:14:00 +00:00