Repository navigation
fix(sv): lower always @(list) like always @* when it lists every read - #1722
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
tignear
force-pushed
the
feature/fix/sv-level-sensitive-lists
branch
from
October 22, 2026 03:09
8df8717 to
e01f90d
Compare
An always whose edgeless event list names exactly the variables @* would compute for its statement (IEEE 1800-2023 9.4.2.2), and whose statement neither suspends nor makes a nonblocking assignment, is lowered like always @*, so an untimed Simulator runs it. When such a block closes a combinational loop, the scheduler reports the loop's members, and only the blocks that drive them run as processes. Change-Id: I72eb16b617333506ba2aaaf58a961b0cef5c0903
…processes Verilator runs edgeless event-list always blocks at time zero; the two affected cases are excluded with an adapter-free reproduction. Change-Id: I72c16f4b9aa69f06a7ea37bfa5635b972ffbb703
Change-Id: I7fb7b8ea84d8192a21b47b54d33b91574d8d8d7f
Change-Id: I7add15ad54316af2cffff68d1b3cb7fafd18d0be
tignear
force-pushed
the
feature/fix/sv-level-sensitive-lists
branch
from
October 22, 2026 04:34
2104287 to
32fa9c4
Compare
Contributor
|
Queued — the merge queue status continues in this comment ↓. |
Contributor
Merge Queue Status
This pull request spent 3 hours 11 minutes 31 seconds in the queue, including 1 hour 56 minutes 41 seconds running CI. Required conditions to merge
|
This was referenced Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1713.
Since #1475,
always @(a or b) y = a + b;is lowered as a process, so an untimedSimulatorbuilds it but never runs it (#1712). This lowers the common case the same wayalways @*is lowered today.Rule
A plain
alwaysis lowered likealways @*when:oror,;@*computes for the same statement (IEEE 1800-2023 9.4.2.2). The match reusesimplicit_reads, the frontend's existing@*read-set computation;always @*path rejects nonblocking assignments);break,continueorreturnoutside its own loops.Anything else stays a process: a missing read, an extra signal, a select item, an edge, or timing in the body. Event lists keep their time-0 behaviour: like
always @*, they wait for a change of a listed variable.Combinational loops
As
always @*, event-list blocks can close a combinational loop that converges when they run as processes (timing::finite_active_feedback_preserves_convergence). When the scheduler rejects a loop:(ModuleId, variable range)pairs, throughschedule_symbolic_rtl_reporting_loops.schedule_symbolic_rtlis unchanged;A demoted block runs as a process: correctly in
Simulation, and rejected inSimulatoronce #1712 lands.Cost: only designs that fail to schedule pay for the retry. Each round lowers and schedules the SV design again, so a design whose loop involves converted blocks compiles once per demotion round (two compiles in every test here). There is no runtime cost.
Mixed Veryl/SystemVerilog hierarchies (
prepare_external_hierarchy*) schedule through the Veryl frontend, which has no retry yet. There the event lists stay processes, as before (follow-up).Docs
docs/guide/systemverilog{,-reference}.mdand theirdocs/jacounterparts describe which event lists simulate likealways @*.pnpm docs:buildpasses.Validation
always_comb::explicit_list_of_every_read_settles_like_a_wildcard: untimedSimulator,always @(a or b)andalways @(b, a), gives 8.Simulationcases:always @(a) y = a + b;, which does not followb);always_comb;assign).alwaysblocks at time 0 (against IEEE 1800-2023 6.8 and 9.4.2). These are recorded as the reviewed exclusionsv_verilator_event_list_timezero, with an adapter-free repro, next to the existingalways @*time-zero exclusion.expected.tsv, with no changes.cargo test -p celox --features systemverilog --test systemverilog: 3566 passed;celoxSV test targets;celox-frontend-sv,celox-sv-analyzer,celox-frontend-coreandcelox-test-suite;