Repository navigation
Conversation
|
This pull request is part of a Mergify stack:
|
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. |
54d947d to
7a7a029
Compare
70b9986 to
5b44073
Compare
Revision history
|
5b44073 to
90ee7b5
Compare
7a7a029 to
44f5ddd
Compare
90ee7b5 to
f078fc6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f078fc67f6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let offset = if let Some(selection) = &dst.selection { | ||
| SIROffset::Dynamic(self.expression(&selection.offset)?.register) |
There was a problem hiding this comment.
Settle hardware before evaluating assignment indices
When a selected assignment has a hardware-dependent index but a constant or TB-private RHS, only the RHS goes through settled_expression; the index is evaluated here without settling. In an ordinary combinational design without external observers, a sequence such as updating a DUT input and then assigning values[dut.index] = 1 therefore uses the previous index and writes the wrong element. The previous assignment runner explicitly called settle_testbench whenever dst.selection was present. Preserve that settlement before evaluating the selected target.
Useful? React with 👍 / 👎.
| let valid = self.kernel.builder().new_block(); | ||
| let invalid = self.kernel.builder().new_block(); | ||
| self.kernel.builder().seal_block(Term::Branch { | ||
| cond: fits, |
There was a problem hiding this comment.
Check for empty wide ranges before rejecting their bounds
For dynamic bounds wider than the induction variable, this validation rejects even ranges that require no iterations. For example, with a 128-bit variable bound = 128'd1 << 100, for _i in bound..bound { ... } now reports a non-progressing loop because the bounds do not fit, although the exclusive range is empty. The previous wide-bound runner returned successfully for start >= end before rejecting unrepresentable nonempty ranges. Determine whether the range is empty before applying the representability failure.
Useful? React with 👍 / 👎.
| } | ||
| self.kernel.builder().switch_to_block(advance); | ||
| let current = self.load(current_slot, width, signed); | ||
| let step = self.imm(width, step as u64); |
There was a problem hiding this comment.
Preserve the full shift count when lowering loop steps
For shift-stepped loops, allocating the step at the induction variable's width truncates the shift count before executing the shift. With a 32-bit induction variable, step <<<= 4294967297 becomes a shift by one, so a dynamic loop from 1 to 4 can complete successfully instead of producing zero and reporting non-progress as the previous runner did. Shift counts must retain their full value; only the resulting induction value should be truncated to the loop width.
Useful? React with 👍 / 👎.
44f5ddd to
a3c57be
Compare
f078fc6 to
3982ee7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3982ee734a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let last_fits = self.bound_fits(last, width, signed, !inclusive); | ||
| let fits = self.binary(BinaryOp::And, first_fits, last_fits, 1); |
There was a problem hiding this comment.
Allow early exits before rejecting an out-of-range endpoint
For a dynamic signed endpoint outside the induction variable's range, this check rejects the loop before its body can execute, even when the body safely exits immediately. For example, setting an i64 variable limit to 64'sd2147483649 and executing for i in 0..limit { $assert(i == 0); break; } previously succeeded but now reports a non-progressing loop. An unrepresentable endpoint does not imply non-progress when break or $finish prevents reaching it; preserve those early exits and diagnose overflow when advancement actually fails.
Useful? React with 👍 / 👎.
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
Lower Veryl testbench expressions and resumable processes into shared SIR before optimization and state layout. Use the SystemVerilog process builder and existing native, interpreter, Cranelift and Wasm backends, so tiered execution promotes DUT and TB kernels together. Remove the separate TB VM, Cranelift compiler, scalar assembler and runtime loop evaluator. Wide integer operations use normal backend instruction selection. Strings use the shared 32-bit heap handles and floating-point operations use the shared numeric ABI. Keep function-local state, conditional stores, indexed accesses, four-state component payloads, clock/reset ordering, VCD, snapshots and native-image loading. Advance the native-image schema for the compiled kernel metadata. Avoid redundant settlement requests between consecutive RTL reads, invalidate that fact at writes and control-flow boundaries, and fold constant clock-only loops using shared SIR constant evaluation. Keep output, assertions and component services at suspension boundaries. Validation: shared crate unit tests; native TB, string, component, completion, floating-point, checkpoint, image, tiered and SV process regressions across enabled backends; CLI tests; compiler-only, WASI and ARM64 code-generation checks; formatting, Clippy and the default-dependency guard. SHA-256, FFT and LZ77 pass both positive and deliberately broken oracle qualification. Rica completes all 16 replays with identical cycle and retirement counts. Whole-invocation Rica measurements still show a gap to Veryl simulator; this change does not claim that the overall performance target is met. The remaining runtime and DUT code-generation costs are being investigated separately. No large Heliodor workload was run. BREAKING CHANGE: CompiledExpr no longer evaluates expressions against a raw memory pointer. Compile testbenches with the simulator pipeline and invoke their bound backend kernels; existing native image containers must be rebuilt. Change-Id: I2711e90cfd86ec662d5078e674ae9718576eaf54
3982ee7 to
a26c0a4
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a26c0a41f6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self.kernel.builder().emit(Inst::Store( | ||
| stable(dst.signal.address), | ||
| offset, | ||
| dst.width, | ||
| value, |
There was a problem hiding this comment.
Bound selected assignments before emitting a memory store
When a testbench assignment uses an out-of-range runtime index, this unconditional store writes beyond the destination object instead of ignoring the assignment. The frontend's resolve_target_parts constructs an offset without a bounds check, and the native backend lowers dynamic stores to register-indexed memory accesses without adding one. For example, assigning bits[index] = 1 with an index beyond bits can corrupt another state object or crash the simulator. Previously, sim_set_target clipped the selected width to the remaining destination width and returned without writing when the offset was outside the object. Preserve that bounds handling, including clipping partially overlapping selections, before emitting this store.
Useful? React with 👍 / 👎.
| let one = self.imm(lw, 1u8); | ||
| self.binary(BinaryOp::Sub, last, one, lw) |
There was a problem hiding this comment.
Widen reverse-loop endpoints before subtracting one
When a dynamic endpoint is narrower than the induction variable, subtracting at lw bits wraps before the result is converted to the counter width. For example, an unsigned 8-bit endpoint containing zero makes for i in rev 0..end start at 255 instead of skipping the empty range: the subtraction produces 8'hff, and binary marks that result unsigned, so the subsequent cast zero-extends it to the 32-bit counter. The previous runner performed the subtraction in its host-width counter representation and started at -1 for this mixed static/dynamic range. Widen the endpoint into the counter's arithmetic representation before decrementing it.
Useful? React with 👍 / 👎.
Land the Veryl testbench execution stack as one queue entry; its members are not merged into master individually. Lower Veryl testbench expressions and resumable processes into shared SIR before optimization and state layout, and run them through the native, interpreter, Cranelift and Wasm backends, so tiered execution promotes DUT and TB kernels together. The separate TB VM, Cranelift compiler, scalar assembler and runtime loop evaluator are removed. Concurrent TB continuation dispatch, clock waits and multi-clock time progression are generated as ordinary SIR composed with the shared compiled clock-domain scheduler, so process arithmetic, settlement and eligible clock slots execute together between host services and tiering safe points. The shared scheduler no longer invalidates clean combinational state for unchanged clocks and internal clock-alias notifications. Native SIR/MIR traces now include process entries, including compiled testbench and scheduler code. Tiered circuit and Heliodor comparisons publish only total workload time; startup and execution intervals stay in diagnostic reports. The tree is identical to #2483 at the SHA below. The source PRs are held with release:hold while this rollup is active. Their changes are squashed here; they close automatically when this PR lands on master. If a source head changes, rebuild the rollup before queueing it. Removing this rollup requires releasing those holds before resuming individual stack merges. Source PRs and pinned heads: - #2445: a26c0a4 — perf(testbench)!: compile Veryl testbenches through the HDL backends - #2462: 544ca13 — fix(bench): compare tiered simulators by total completion time - #2482: 7a0ee19 — fix(trace): include native process kernels in codegen traces - #2483: 387fb86 — perf(testbench)!: compile concurrent Veryl scheduling through SIR Validation (from the source PRs, same tree as #2483): - 281 Celox library tests; 98 native TB tests (1 existing ignored); 9 native MIR tests including a native testbench process trace; 8 native image tests; 5 completion tests; 8 slot-observer tests; 6 tiered tests. - 81 runtime and 28 testbench library tests; affected-crate all-target Clippy with systemverilog, cranelift, veryl-reference and wasm-runtime; compiler-only, WASI and ARM64 code-generation checks; formatting and the default-dependency guard. - SHA-256, FFT and LZ77 pass both positive and deliberately broken oracle qualification. Rica completes all 16 replays with identical cycle and retirement counts. - Benchmark publication and runner tests, Heliodor conversion fixtures, and the VitePress production build. Performance status: no end-to-end speedup over Veryl simulator has been established; this rollup makes no performance claim. No large Heliodor workload was run. BREAKING CHANGE: CompiledExpr no longer evaluates expressions against a raw memory pointer; compile testbenches with the simulator pipeline and invoke their bound backend kernels. Serialized testbench metadata gains scheduler state, and appended native images use container version 55 and must be regenerated. Change-Id: If61ef7bfc9c47ddc0c3bf3e81cf6bdbce4d62a28
|
Landed on master as part of the rollup #2484. |
Lower Veryl testbench expressions and resumable processes into shared SIR before optimization and state layout. Use the SystemVerilog process builder and existing native, interpreter, Cranelift and Wasm backends, so tiered execution promotes DUT and TB kernels together. Remove the separate TB VM, Cranelift compiler, scalar assembler and runtime loop evaluator.
Wide integer operations use normal backend instruction selection. Strings use the shared 32-bit heap handles and floating-point operations use the shared numeric ABI. Keep function-local state, conditional stores, indexed accesses, four-state component payloads, clock/reset ordering, VCD, snapshots and native-image loading. Advance the native-image schema for the compiled kernel metadata.
Avoid redundant settlement requests between consecutive RTL reads, invalidate that fact at writes and control-flow boundaries, and fold constant clock-only loops using shared SIR constant evaluation. Keep output, assertions and component services at suspension boundaries.
Validation: shared crate unit tests; native TB, string, component, completion, floating-point, checkpoint, image, tiered and SV process regressions across enabled backends; CLI tests; compiler-only, WASI and ARM64 code-generation checks; formatting, Clippy and the default-dependency guard. SHA-256, FFT and LZ77 pass both positive and deliberately broken oracle qualification. Rica completes all 16 replays with identical cycle and retirement counts.
Whole-invocation Rica measurements still show a gap to Veryl simulator; this change does not claim that the overall performance target is met. The remaining runtime and DUT code-generation costs are being investigated separately. No large Heliodor workload was run.
BREAKING CHANGE: CompiledExpr no longer evaluates expressions against a raw memory pointer. Compile testbenches with the simulator pipeline and invoke their bound backend kernels; existing native image containers must be rebuilt.