Commit Graph

8615 Commits

Author SHA1 Message Date
Jonathan Schröter c9476cf4ca test: Updated regression test for instrumentation 2025-10-22 14:54:07 +02:00
Jonathan Schröter e44089774a fix: Enabled DPI-Calls when design is stale/constant 2025-10-22 14:54:07 +02:00
Jonathan Schröter 93d56d8dbf fix: Changed instrumentation directive from model to callback 2025-10-22 14:54:07 +02:00
github action 41a5aa96d9 Apply 'make format' 2025-10-22 14:54:07 +02:00
Jonathan Schröter 177dc2a4d7 Apply 'make format' 2025-10-22 14:54:07 +02:00
github action 86e2b1b547 Apply 'make format' 2025-10-22 14:54:07 +02:00
Jonathan Schröter 300001bcdd test: Add regression tests for instrumentation 2025-10-22 14:54:07 +02:00
Jonathan Schröter 5f2cb6545a feat: Add V3DumpSignals-Pass 2025-10-22 14:54:07 +02:00
Jonathan Schröter 8cd34bc05b feat: Add V3Instrumentation-Pass 2025-10-22 14:54:07 +02:00
Geza Lore cb3c2706a8 Internals: Remove funcLocal from 'fork' locals 2025-10-22 11:14:21 +01:00
Geza Lore d65ba037a8 Internals: Simplify parsing of 'fork' blocks 2025-10-22 08:48:28 +01:00
Ryszard Rozak e00403351c
Fix references to interfaces containing generate blocks (#6579) 2025-10-22 08:37:43 +02:00
Matt Stroud 6f055f84ce
Fix missing net type mappings in FST traces (#6582) (#6583) 2025-10-21 21:07:51 -04:00
Geza Lore cc77233902 Internals: AstExecGraph is an AstNodeStmt (#6280) 2025-10-21 17:35:22 +01:00
Geza Lore ec91158130
Internals: Refactor AstCFunc internals (#6280) (#6578)
- Delete 'finalsp'. It was used in one place, basically unnecessary and
  safe to remove.
- Make 'argsp' a 'List[AstVar]'. This held before. It holds the function
  argument and return variables.
- Replace 'intitsp' with 'varsp' and make it into 'List[AstVar]' to hold
  the function local variables. This was most of its use before. The few
  places we inserted statements here now moved into 'stmtsp' by
  inserting at the front of the list.
2025-10-21 16:37:32 +01:00
Geza Lore c471323601 Internals: Remove unused AstNode::swapWith 2025-10-21 12:41:50 +01:00
Geza Lore 8daae7336d Internals: Remove redundant AstNode::addNextStmt 2025-10-21 12:41:50 +01:00
Geza Lore cf275b6e58
Internals: Refactor text based Ast constructs (#6280) (#6571)
Remove the large variety of ways raw "text" is represented in the Ast.
Particularly, the only thing that represents a string to be emitted in
the output is AstText.

There are 5 AstNodes that can contain AstText, and V3Emit will throw an
error if an AstText is encountered anywhere else:
- AstCStmt: Internally generated procedural statements involving raw
  text.
- AstCStmtUser: This is the old AstUCStmt, renamed so it sorts next to
  AstCStmt, as it's largely equivalent. We should never create this
  internally unless used to represent user input. It is used for $c,
  statements in the input, and for some 'systemc_* blocks.
- AstCExpr: Internally generaged expression involving raw text.
- AstCExprUser: This is the old AstUCFunc, renamed so it sorts next to
  AstCExpr. It is largely equivalent, but also has more optimizations
  disabled. This should never be created internally, it is only used for
  $c expressions in the input.
- AstTextBlock: Use by V3ProtectLib only, to generate the hierarchical
  wrappers.

Text "tracking" for indentation is always on for AstCStmt, AstCExpr, and
AstTextBlock, as these are always generated by us, and should always be
well formed.

Tracking is always off for AstCStmtUser and AstCExprUser, as these
contain arbitrary user input that might not be safe to parse for
indentation.

Remove subsequently redundant AstNodeSimpleText and AstNodeText types.

This patch also fixes incorrect indentation in emitted waveform tracing
functions, and makes the output more readable for hier block SV stubs.

With that, all raw text nodes are handled as a proper AstNodeStmt or
AstNodeExpr as required for #6280.
2025-10-21 12:41:29 +01:00
Wilson Snyder 14e3448ba6 Fix `with` inside a `with` 2025-10-21 00:40:47 -04:00
Wilson Snyder 61de46cea2 Add `--aslr` and `--no-aslr` options. 2025-10-20 19:41:32 -04:00
Wilson Snyder 24e665f38f Commentary: Changes update 2025-10-20 19:32:19 -04:00
Geza Lore 8f13bc0477 Improve conditional merging to preserve branch prediction 2025-10-20 20:01:48 +01:00
Geza Lore f73dde6dd9 Fix hierarchical with parametrized instances under hier block (#6572) 2025-10-20 19:26:13 +01:00
Todd Strader ffd7ec1007
Fix DFG synthesis non-determinism (#6557) (#6568) 2025-10-20 16:16:36 +01:00
Bartłomiej Chmiel 9bd30baba4
Fix $finish inside fork blocks (#6555)
Signed-off-by: Bartłomiej Chmiel <bchmiel@antmicro.com>
2025-10-20 10:16:05 -04:00
Geza Lore 61c64e4a3b
Internals: Make AstCExpr always cleanOut (#6280) (#6570)
There was exactly one place in V3Task, handling DPI arguments when we
relied on cleanOut of AstCExpr being false for masking. Made that code
do the relevant masking via a few new run-time functions, which also
eliminates some special cases in the relevant V3Task functions.
2025-10-19 09:44:33 +01:00
Geza Lore 4ef6f00423 Fix single element unpacked array DPI parameters 2025-10-18 17:21:21 +01:00
Igor Zaworski 5c412e5e81
Support impure expressions in `inside` (#6562) 2025-10-17 09:08:57 -04:00
Ryszard Rozak af2327aaf4
Fix hierarchical references with parameterized modules and interfaces (#5649) (#6566) 2025-10-17 09:06:46 -04:00
Igor Zaworski 96ed725278
Support `case` impure expressions (#6563) 2025-10-17 09:00:32 -04:00
Geza Lore 3d5d2db64b Tests: Remove unused JSON dumps
These seem to have been accidentally comitted
2025-10-17 09:03:12 +01:00
Aleksander Kiryk 94525cae5d
Fix std::process::get_randstate to not affect random stability (#6550) (#6565) 2025-10-16 21:11:07 -04:00
Geza Lore 982c7fb058
Remove obsolete DepSet from output file names (#6564) 2025-10-16 20:34:09 -04:00
Geza Lore 794247450f Internals: Simplify AstScopeName (#6280)
Reduce reliance on AstText where not necessary.
2025-10-15 09:14:51 +01:00
Geza Lore 0c712d7c60 Internals: Refactor `systemc_* section handling (#6280) 2025-10-15 09:14:51 +01:00
Artur Bieniek cefcf836fd
Fix signal code reporting (#6554)
Signed-off-by: Artur Bieniek <abieniek@internships.antmicro.com>
2025-10-14 07:04:53 -04:00
Geza Lore eb53bca6fd
Internals: Make AstAssignW a procedural statement (#6280) (#6556)
Initial idea was to remodel AssignW as Assign under Alway. Trying that
uncovered some issues, the most difficult of them was that a delay
attached to a continuous assignment behaves differently from a delay
attached to a blocking assignment statement, so we need to keep the
knowledge of which flavour an assignment was until V3Timing.

So instead of removing AstAssignW, we always wrap it in an AstAlways,
with a special `keyword()` type. This makes it into a proper procedural
statement, which is almost equivalent to AstAssign, except for the case
when they contain a delay. We still gain the benefits of #6280 and can
simplify some code. Every AstNodeStmt should now be under an
AstNodeProcedure - which we should rename to AstProcess, or an
AstNodeFTask). As a result, V3Table can now handle AssignW for free.
Also uncovered and fixed a bug in handling intra-assignment delays if
a function is present on the RHS of an AssignW.

There is more work to be done towards #6280, and potentially simplifying
AssignW handing, but this is the minimal change required to tick it off
the TODO list for #6280.
2025-10-14 09:05:19 +01:00
Wilson Snyder 958d096e7f Improve some error message formats 2025-10-13 20:30:47 -04:00
Wilson Snyder 9dfc050fb5 Fix '' with multiple format strings 2025-10-13 19:47:08 -04:00
Wilson Snyder b99b3d7b9c Tests: Reformat t_display 2025-10-13 19:44:57 -04:00
Artur Bieniek 16fdd0e93c
Fiix fault on operations on uninitialized strings (#6520)
Signed-off-by: Artur Bieniek <abieniek@internships.antmicro.com>
2025-10-13 07:29:23 -04:00
Wilson Snyder 01157d414b Optimize constant string arguments before Emit, and cleanup V3EmitV 2025-10-12 20:09:03 -04:00
Wilson Snyder eae1e5bdf2 Internals/Tests: Cleanup some missing dev coverage items 2025-10-11 20:58:03 -04:00
Wilson Snyder 71941cc673 Fix incorrect nested interface-class error (#6549). 2025-10-11 19:07:37 -04:00
Wilson Snyder fac4ed49af Commentary: Changes update 2025-10-11 19:05:44 -04:00
Wilson Snyder 8785086bc8 Internals/Tests: Add `--debug-preproc-passthru` to cleanup some missing dev coverage items 2025-10-11 14:15:04 -04:00
Wilson Snyder 6e8bd3da19 Internals/Tests: Cleanup some missing dev coverage items 2025-10-11 12:54:55 -04:00
Wilson Snyder 078275034d Internals: Parse randsequence but still unsupported (#6131 partial) 2025-10-11 10:47:46 -04:00
Bartłomiej Chmiel 31e73f1645
Support simple cycle delay sequence expressions inside assertion properties (#6508)
Signed-off-by: Bartłomiej Chmiel <bchmiel@antmicro.com>
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
2025-10-10 16:16:15 +02:00
Igor Zaworski 2ac7cf51a9
Optimization of typedef params (#6543) (#6547) 2025-10-10 10:05:47 -04:00