Repository navigation
merge queue: checking #1475 on master (57c687b), stacked on #1414 - #1482
Closed
mergify[bot] wants to merge 13 commits into
Closed
mergify[bot] wants to merge 13 commits into
mergify[bot] wants to merge 13 commits into
Conversation
Change-Id: I813945293824eccb9a1ea9fa2b6228a5082b945b
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.
An `always` that is neither combinational (`always_comb`, `always @*`) nor edge-triggered RTL (`always_ff`, or a leading edge list over a body without timing controls) is a process that repeats its statement forever (IEEE 1800-2023 9.2.2.1): `always #5 clk = ~clk`, a level-sensitive `always @(a or b)`, an edge list followed by timing in the body, and an `always` without any timing control, which the slot budget stops at time zero. These processes run as kernels next to the initial ones, in declaration order, and are never folded into initial state. Classification of combinational and flip-flop `always` blocks is unchanged, so their lowering is too. A timing control in `always_comb` or `always_ff` is reported as the language error it is (9.2.2.2, 9.2.2.4), and `always_latch` stays unsupported (#431). BREAKING CHANGE: `AnalyzerError` has the new variant `TimingControlOutsideProcess`, and an `always_latch` is rejected as "always_latch process" instead of "always and always_latch processes". Change-Id: I98222238a619747ed3629fc6f1e499840e419cbc
Enable the five timing cases of `always` processes on every backend, give the timed-task cases their actual reason, test that an `always` without timing exhausts the slot budget, and expect sv-tests `9.2.2.1--always`, `9.4.2.1--event_comma_op` and `9.4.2.1--event_or_op` to pass: simulated, the first toggles `a` every 5 time units and the others wake only on a change of their wires. Change-Id: Ibc88a7a4ca4cb9fcbec7066aa0f7f9bb68e1b260
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 billowy-chouquette-n1qm5g of the
changesqueue, to test #1475 before it merges intomaster.What this draft tests
Mergify checks that #1475 still passes CI once combined with everything queued ahead of it. CI runs on this draft's code, built in this order:
masterat57c687bcc0cad4The check is speculative: it assumes the pull requests ahead will merge, so it starts without waiting for them.
✨ Where it stands: closed
The pull request #1475 has been manually updated.
Follow the
changesqueue in the dashboardWhat happens next
Tip
A red check is not necessarily caused by this batch. These checks run on a tip that also carries the commits of the pull request ahead, so a failure here can come from it as much as from #1475. See only this batch's changes.
Queued ahead of this batch
This pull request entered the queue before this batch and is not part of it.
Metadata for CI tooling, read by
mergify ci1 scope
coreRequired conditions of queue rule
changesfor mergecheck-success = Queue validationmaster]:check-neutral = @github-actions/Rust Test & NAPI Buildcheck-skipped = @github-actions/Rust Test & NAPI Buildcheck-success = @github-actions/Rust Test & NAPI Buildcheck-success = Conventional Commit titlemaster]: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/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 71750cfdb42245f69443538d4d972836["billowy-chouquette-n1qm5g<br/>#1475<br/>scopes: core"] 90da1d1bc47843e28551711911a6c17b["coming-foie-1rdg0m<br/>#1478<br/>scopes: core"] 71750cfdb42245f69443538d4d972836 --> 90da1d1bc47843e28551711911a6c17b style 71750cfdb42245f69443538d4d972836 fill:#6366f1,color:#fff