Repository navigation
merge queue: checking #1414 on master (e8791e5), stacked on #1471, #1459 and #1467 - #1481
Closed
mergify[bot] wants to merge 19 commits into
Closed
mergify[bot] wants to merge 19 commits into
mergify[bot] wants to merge 19 commits into
Conversation
The analyzer keeps `#delay`, `@(event list)` and `wait (condition)` in `initial` bodies as statements (`Delay`, `WaitEvent`, `Wait`) instead of rejecting every procedural timing control. Event items keep their edge (posedge, negedge, `edge`, any change); a `min:typ:max` delay uses its typical value. Fork-join, `wait fork`/`wait order`, named events and `->`, `iff`, cycle delays, intra-assignment timing, `disable` and real delays stay rejected under their own names; timing in `always` bodies and in subroutines is rejected until those are lowered. BREAKING CHANGE: `StmtBase` has the new variants `Delay`, `WaitEvent` and `Wait`. Change-Id: I030365a80c056b46e5768a1aa59b131031e5a970
An `initial` block with timing controls runs as a process kernel on the timed runtime: - `#d` suspends with an inactive delay: the amount is read as an unsigned 64-bit time, and as zero when it has an unknown bit. - `@(...)` on whole variables declares a wait site whose terms are the variables with their edge kind; the runtime resumes the process at the first occurrence. - `wait (condition)` checks the condition and waits on the variables it reads, including those read by the functions it calls. - A kernel loop that may not suspend yields every 2^16 iterations, so a process that never suspends ends the step with the slot budget error. - A `repeat` count that is negative or unknown runs a kernel loop zero times. Event expressions other than whole variables are rejected for now. Change-Id: Ic219e74bf093953bd4ded797946f343bc5e57dd3
Enable the 28 timing cases that initial processes now pass, give each remaining exclusion its actual reason, and add cases for `edge` waits, `min:typ:max` delays and long process loops, checked against Icarus and Verilator. The timed suite backend settles the current time before a read, an eval and output collection, as the reference simulators' script adapters do. Change-Id: Idabc095b34aefc665610c336d5a2f26632c8df5f
`11.11--min_max_avg_delay`, `9.4.1--delay_control` and `9.4.3--event_sequence_controls` now elaborate. Simulated, they print "Done" at time 200, set `a` to 1..4 at 10..40, and copy `b` into `a` at 20 after `enable` rises at 10. Change-Id: I606c4785f3ea31ac2c640184e48ff43e50f48233
Change-Id: Ie8a00910036fd1305b3aea0c4e5b8aa2c0b1a14f
VCD headers labeled every timestamp as 1ns and VPI reported 1ps regardless of the design. Carry the analyzer's global precision through symbolic modules and assembly into the runtime design, and retain it in native images. Use it for VCD headers and null-handle VPI queries, including restarted waveforms and NAPI compiled-code cache hits. Retain local module units and precisions in reflected scopes so module and signal VPI queries report their own scales (IEEE 1800-2023 37.10 and 38.6), including after native-image reload. Default Veryl and scale-free frontend ticks to 1ps, matching SV's default. Update Playground VCD downloads and document the waveform compatibility change. Bump the native image container to version 14 for the added metadata. Validation: - Precision regressions on native, Cranelift, Wasm, interpreter, tiered, and native/Cranelift parallel configurations; mixed-language designs, package precision, image roundtrips, and VCD restarts. - Existing VCD and time-query regressions, Celox and affected frontend/runtime unit tests, VPI tests, Rust doctests, and the portable compiler configuration. - Live cocotb attached-image integration. - Rebuilt NAPI; simulator, simulation, checkpoint, e2e and timing-addon JS tests; cached-waveform precision regression. - Playground waveform export test and TypeScript checks; formatting, Clippy, and Biome. BREAKING CHANGE: Default VCD headers now use 1ps instead of 1ns. Recompile native images for container version 14. SimModule and ElaboratedDesign struct literals must provide the added timing metadata fields; ReflectionScope literals must provide time_scale. Fixes #1463 Change-Id: Ia5ff9cd5337ce608ea2f6fdd56fda0711d1a21bb
Edges of clocks and asynchronous resets driven inside a four-state design were judged on the value bit alone, so 1 -> x, z -> 0, 0 -> z and x -> 1 did not fire, while x -> 0, 0 -> x and z -> 1 did only by the accident of the x and z encodings. IEEE 1800-2023 9.4.2, Table 9-2 makes a posedge any change that leaves 0 or reaches 1 and a negedge any change that leaves 1 or reaches 0, with no edge between x and z. The edge rules of celox_design::edges now take edge levels (0, 1, x, z) and follow the table; the VPI layer's write edges use the same rule. The timed scheduler keeps an unknown bit next to each event's high bit and judges scheduled, process-driven, published, cascaded and gated edges from both. Derived tick plans keep the same level in their round flags, and the settled gate path moves an x or z lever to its inactive level before the edge. Explicit edges read the moved signal's level with its mask, so a gated clock is judged from the lever's real level, x or z included, rather than from the level opposite to the edge's. Checkpoints and state files carry the unknown baselines; a state file records them under a new flag only when there are any, so other files keep their encoding. The edge loops are instantiated per state mode and the four-state paths stay out of line: two-state designs read only value bits, with the code and inlining they had before, and four-state designs read the mask only of edge-sensed signals.
Shared Veryl and SystemVerilog cases walk a register clock, a clock computed from a register and register-driven asynchronous resets through all twelve changes between 0, 1, x and z, and tick a gated clock from x and z levels. Icarus agrees with every case; Verilator runs the two-state variant only. Veryl's simulator misses edges through x and z, so its reference runs are ignored.
A four-state clock that starts at x now counts its first rise to 1, and rises from 0 to x or z count too (IEEE 1800-2023 Table 9-2). Two-state clocks read only their value bit as before.
Add four-state variants of the derived-clock tick benchmarks and of Simulation::step, and a Simulation::step benchmark with a register-driven divider, so the cost of four-state edge detection is tracked. Existing benchmark names and designs are unchanged.
In four-state simulation a reset that rises from its initial unknown level gives a posedge but no negedge, so a register on its negedge keeps its initial value until the first clock edge.
Posedges and negedges of plain events, gated clocks and register clocks that start at x or z follow IEEE 1800-2023 Table 9-2 on every backend and through the native addon: a gated clock is judged from the clock's real level, so `x & x` rising to `1 & x` is no edge.
The WASM edge runner read event levels from the value bit and moved a lever from x or z as if from the opposite level, so a gated clock rising from `x & x` to `1 & x` fired. Levels are now 0, 1, x and z, with the edge rules of IEEE 1800-2023 Table 9-2, and a lever is moved to its real level before the edge. Edge plans say per signal whether it keeps an unknown mask.
Parameter assignment patterns now travel as structured bindings from the caller into the receiving declaration. This preserves declaration defaults, independent instance bindings, caller-resolved types and constants, and the receiver's sizing context without serializing expressions into replacement SystemVerilog. Remove pattern text substitution and reparsing from specialization. Add shared regressions for isolated instance bindings and enclosing arithmetic, with retained Icarus unsupported-syntax evidence. Validation: analyzer/frontend unit tests; full SV backend suite; DPI and unpacked-array suites; formatting; clippy on analyzer, frontend and test suite. Verilator passes both new shared regressions; Icarus rejects their unsupported parameter-pattern syntax, recorded under the existing limitations. BREAKING CHANGE: ParameterOverride::pattern_text becomes bound_pattern, ParsedSource::analyze_module accepts structured pattern bindings, and with_pattern_parameter_overrides is removed. Change-Id: I6d1a921182f71c4e4bcebfc945366be9d27c872d
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.
Note
This is a merge queue draft opened by Mergify. Nobody needs to act on it.
Mergify opened it for batch adroit-quiche-kl7h9l of the
changesqueue, to test #1414 before it merges intomaster. Pushing to this branch or closing this pull request removes #1414 from the queue.What this draft tests
Mergify checks that #1414 still passes CI once combined with everything queued ahead of it. CI runs on this draft's code, built in this order:
masterate8791e5b45fc81The check is speculative: it assumes the pull requests ahead will merge, so it starts without waiting for them.
🎉 Where it stands: checks passed
CI passed on this draft.
Follow the
changesqueue in the dashboardWhat happens next
masterand closes this draft.Tip
A red check is not necessarily caused by this batch. These checks run on a tip that also carries the commits of the 3 pull requests ahead, so a failure here can come from them as much as from #1414. See only this batch's changes.
Queued ahead of this batch
These pull requests entered the queue before this batch and are not part of it.
Metadata for CI tooling, read by
mergify ci1 scope
coreRequired conditions of queue rule
changesfor mergecheck-success = Conventional Commit titlecheck-success = Queue validationmaster]:check-success = @github-actions/Lint & Formatcheck-neutral = @github-actions/Lint & Formatcheck-skipped = @github-actions/Lint & Formatmaster]:check-success = @github-actions/NAPI Build (Linux ARM64 GNU)check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)master]:check-success = @github-actions/NAPI Build (Windows)check-neutral = @github-actions/NAPI Build (Windows)check-skipped = @github-actions/NAPI Build (Windows)master]:check-success = @github-actions/Rust Test & NAPI Buildcheck-neutral = @github-actions/Rust Test & NAPI Buildcheck-skipped = @github-actions/Rust Test & NAPI Buildmaster]:check-success = @github-actions/JS Test (Ubuntu)check-neutral = @github-actions/JS Test (Ubuntu)check-skipped = @github-actions/JS Test (Ubuntu)master]:check-success = @github-actions/JS Test (Windows)check-neutral = @github-actions/JS Test (Windows)check-skipped = @github-actions/JS Test (Windows)master]:check-success = @github-actions/Conventional Commit titlecheck-neutral = @github-actions/Conventional Commit titlecheck-skipped = @github-actions/Conventional Commit titleRequired conditions to stay in the queue
-conflict-draft-head ~= ^(integration/|renovate/veryl-crates$|upgrade/veryl-|release-please--branches--master--components--celox$|master$)-head ~= ^renovate/-label = release:holdbase ~= ^(master|develop)$base ~= ^stack/body ~= (?m)^Depends-On:head != release-please--branches--master--components--celoxlabel = merge-readymaster]:check-success = @github-actions/Lint & Formatcheck-neutral = @github-actions/Lint & Formatcheck-skipped = @github-actions/Lint & Formatmaster]:check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)check-success = @github-actions/NAPI Build (Linux ARM64 GNU)master]:check-skipped = @github-actions/NAPI Build (Windows)check-neutral = @github-actions/NAPI Build (Windows)check-success = @github-actions/NAPI Build (Windows)master]:check-success = @github-actions/Rust Test & NAPI Buildcheck-neutral = @github-actions/Rust Test & NAPI Buildcheck-skipped = @github-actions/Rust Test & NAPI Buildmaster]:check-success = @github-actions/JS Test (Ubuntu)check-neutral = @github-actions/JS Test (Ubuntu)check-skipped = @github-actions/JS Test (Ubuntu)master]:check-skipped = @github-actions/JS Test (Windows)check-neutral = @github-actions/JS Test (Windows)check-success = @github-actions/JS Test (Windows)master]:check-success = @github-actions/Conventional Commit titlecheck-neutral = @github-actions/Conventional Commit titlecheck-skipped = @github-actions/Conventional Commit titleQueue graph
The diagram is not laid out in queue order, so a node's position says nothing about when it merges.
graph LR 8577b0c52446461683c1456693f3fcb6["adroit-quiche-kl7h9l<br/>#1414<br/>scopes: core"] 71750cfdb42245f69443538d4d972836["billowy-chouquette-n1qm5g<br/>#1475<br/>scopes: core"] 8577b0c52446461683c1456693f3fcb6 --> 71750cfdb42245f69443538d4d972836 style 8577b0c52446461683c1456693f3fcb6 fill:#6366f1,color:#fff