Commit Graph

8650 Commits

Author SHA1 Message Date
Wilson Snyder b237eec801 Add error on string addition 2025-09-20 13:47:17 -04:00
Geza Lore e0e8503151
Internals: Make all AstBegin constructor arguments explicit (#6464) 2025-09-20 13:16:03 -04:00
Wilson Snyder 19ca140165 Improve adding model error message 2025-09-20 11:32:15 -04:00
Wilson Snyder bfc438c455 Tests: Add t_param_default_override (#4920) 2025-09-20 11:32:15 -04:00
Wilson Snyder d3b085ab8a Fix t_sarif (#6463 partial) 2025-09-20 11:32:15 -04:00
Geza Lore d1eda66668
Deprecate clocker attribute and --clk option (#6463)
The only use for the clocker attribute and the AstVar::isUsedClock that
is actually necessary today for correctness is to mark top level inputs
of --lib-create blocks as being (or driving) a clock signal. Correctness
of --lib-create (and hence hierarchical blocks) actually used to depend
on having the right optimizations eliminate intermediate clocks (e.g.:
V3Gate), when the top level port was not used directly in a sensitivity
list, or marking top level signals manually via --clk or the clocker
attribute. However V3Sched::partition already needs to trace through the
logic to figure out what signals might drive a sensitivity list, so it
can very easily mark all top level inputs as such.

In this patch we remove the AstVar::attrClocker and AstVar::isUsedClock
attributes, and replace them with AstVar::isPrimaryClock, automatically
set by V3Sched::partition. This eliminates all need for manual
annotation so we are deprecating the --clk/--no-clk options and the
clocker/no_clocker attributes.

This also eliminates the opportunity for any further mis-optimization
similar to #6453.

Regarding the other uses of the removed AstVar attributes:
- As of 5.000, initial edges are triggered via a separate mechanism
  applied in V3Sched, so the use in V3EmitCFunc.cpp is redundant
- Also as of 5.000, we can handle arbitrary sensitivity expressions, so
  the restriction on eliminating clock signals in V3Gate is unnecessary
- Since the recent change when Dfg is applied after V3Scope, it does
  perform the equivalent of GateClkDecomp, so we can delete that pass.
2025-09-20 15:50:22 +01:00
Wilson Snyder 50dfdcb6cc Support digits in `$sscanf` field width formats (#6083). 2025-09-20 10:26:36 -04:00
Wilson Snyder 7f85d7f453 Add error on localparam value from hierarchical path (#6456). 2025-09-20 09:59:48 -04:00
Wilson Snyder f970485e19 Fix some missing E_UNSUPPORTED errors 2025-09-20 08:19:42 -04:00
Wilson Snyder e5e7e844c4 Tests: Fix assignment type mismatch (#6461) 2025-09-19 22:59:13 -04:00
Wilson Snyder 4e866fd710 Add error on module automatic variables. 2025-09-19 22:05:03 -04:00
Wilson Snyder 2a498cb670 Commentary: Changes update 2025-09-19 22:02:54 -04:00
Bartłomiej Chmiel bbcb9315f3
Fix loss of clock attribute in Dfg variable removal (#6453) 2025-09-19 14:44:34 +01:00
Artur Bieniek 08be65a7dd
Optimize dead functions in more cases (#6430)
Signed-off-by: Artur Bieniek <abieniek@internships.antmicro.com>
2025-09-19 09:36:57 -04:00
Geza Lore e24f84f713
Fix false assertion failure on failed Dfg driver tracing (#6459) 2025-09-19 13:31:07 +01:00
Artur Bieniek c1ac2a79db
Resolve data types of method calls without parenthesis (#6457)
Signed-off-by: Artur Bieniek <abieniek@internships.antmicro.com>
2025-09-19 07:43:22 -04:00
Krzysztof Bieganski 0391f113b0
Fix segfault on unsupported PLI calls (#6458) 2025-09-19 06:59:48 -04:00
Bartłomiej Chmiel d26fccaa44
Use C++14 decay_t (#6454)
Signed-off-by: Bartłomiej Chmiel <bchmiel@antmicro.com>
2025-09-18 16:57:13 +02:00
Wilson Snyder 46e56ca6fc Fix elaboration displays with some `%p` (#6451). 2025-09-18 08:35:07 -04:00
Geza Lore 92f30dd28f
CI: Exclude 'Example' and 'hello' cases from RTLMeter PR reports (#6452)
These are too small and noisy to be useful, remove to avoid false
conclusions.
2025-09-18 13:02:37 +01:00
Geza Lore b85a482db0 CI: fix typo 2025-09-18 11:34:59 +01:00
Wilson Snyder c15489b711 Fix associative array default type resolution 2025-09-17 23:39:47 -04:00
Wilson Snyder 7f871467bf Internals: Cleanup assertion 2025-09-17 23:38:00 -04:00
Wilson Snyder 3a039df351 Tests: Strictly test exit codes (no unexpected core dumps) 2025-09-17 21:01:11 -04:00
Wilson Snyder 542ffcca60 Prevent internal error on pattern mismatch 2025-09-17 21:01:11 -04:00
Geza Lore ed6687359b
Fix memory leak in V3Const::ifMergeAdjacent (#6449) 2025-09-18 00:45:28 +02:00
Wilson Snyder 57c82b9c34 Fix false unique assertions on `else ;` (#6450). 2025-09-17 17:43:36 -04:00
Geza Lore 0e2f0381d0
CI: Improve and cleanup (#6448)
Chores:
- Remove ci-ccache-maint. This has never been useful and is just cruft.
- Remove then unused CI_COMMIT
- Change job names so they come out nicer in the web views
- Make os-name input to reusable-build always explicit

Improvements:
- Have at most build-test job in progress per branch
- Cancel in-progress build-test jobs on PRs
- In forks (that is, not on 'verilator/verilator'), cancel any
  in-progress build-test jobs on push to the branch
2025-09-17 20:41:29 +01:00
Geza Lore 1432bb8889 Revert "CI: Make formatting dispatch workflows on verilator/verilator"
This reverts commit 64dbd4abcc.
2025-09-17 13:53:20 +01:00
Artur Bieniek 3c8b8b65d0
Fix relinking super functions to parametrized class (#6431) (#6438)
Signed-off-by: Artur Bieniek <abieniek@internships.antmicro.com>
2025-09-17 08:07:04 -04:00
Geza Lore 64dbd4abcc CI: Make formatting dispatch workflows on verilator/verilator
Use the CI GitHub APP for authentication in the format job. This should
correctly trigger workflows after the push of the formatting.
2025-09-17 12:57:26 +01:00
Artur Bieniek bee58510e7
Add cast in gdbinit.py (#6447)
Signed-off-by: Artur Bieniek <abieniek@internships.antmicro.com>
2025-09-17 07:23:47 -04:00
Wilson Snyder b10c6293d9 Fix elaboration displays with `%m` (#6445). 2025-09-16 20:50:15 -04:00
Geza Lore 4ab0690428
CI: Add -DVL_LEAK_CHECKS in asan builds (#6444) 2025-09-17 00:18:58 +01:00
github action 841254e9e8 Apply 'make format' 2025-09-16 23:02:39 +00:00
Wilson Snyder d7f4dbfd13 Fix class.randomize without parens. 2025-09-16 18:56:04 -04:00
Wilson Snyder 2dbf587118 Commentary: Changes update 2025-09-16 18:54:40 -04:00
Wilson Snyder 4d1eea35e1 Internals: Show only first warning suppression for low debug levels. 2025-09-16 18:51:35 -04:00
Geza Lore f39d6e6108
Deprecate sensitivity list on public_flat_rw attributes (#6443)
These are no longer required for correct scheduling. They are still
accepted for backward compatibility, but have no effect on simulation
and are dropped in the front-end. Also removed the then redundant
AstAlwaysPublic class.

Fixes #6442
2025-09-16 22:38:53 +01:00
Geza Lore ad530c4b08
Internals: Make V3Broken AllocTable thread safe (#6441)
Added a lock around the table used to detect memory leaks. Note the only
part that is multi-threaded at the moment is V3Emit where we create
AstCFiles and the like, so the lock should be almost always uncontested.
2025-09-16 20:40:38 +01:00
Geza Lore b60ad953c4
Disable multi-threading in V3FuncOpt (#6440)
This code is not thread safe. Specifically AstNode constructors are not
thread safe, as they may create entries in the shared Dtype table via
which can be racy.
2025-09-16 19:23:05 +01:00
Geza Lore a44907b700
Fix memory leaks - batch 4 (#6439) 2025-09-16 19:22:36 +01:00
Ryszard Rozak c856380fac
Support modports referencing clocking blocks (#4555) (#6436) 2025-09-16 13:25:40 -04:00
Geza Lore ef458be855
Fix memory leaks in assignment pattern processing (#6437). 2025-09-16 12:31:16 -04:00
Wilson Snyder 9187b4d552 Fix internal error on out-of-bounds real array access. 2025-09-16 08:18:51 -04:00
Wilson Snyder 2b3bf5f51d Fix false missing implementation warning. 2025-09-16 07:48:20 -04:00
dependabot[bot] a8d70c6edf
Bump actions/create-github-app-token from 2.1.1 to 2.1.4 (#6435) 2025-09-16 07:20:46 -04:00
Bartłomiej Chmiel dca555b6d7
Fix pre/post increments in assertions (#6434) 2025-09-15 10:50:31 -04:00
Wilson Snyder b11ec23891 Add waiver 2025-09-14 23:59:42 -04:00
Wilson Snyder 39a9a00299 Fix external function declarations with class typedef references (#6433 expanded). 2025-09-14 23:52:48 -04:00