Repository navigation
perf(sv): follow transparent copies to sensitivity probes through an index - #2057
Merged
Merged
Conversation
…index Design assembly follows the transparent wire and port copies upstream from each sensitivity probe, so that a copy carries occurrences as well as its value. For each probe it scanned every combinational logic path of the design for a copy into the probe's variable, and it checked probe membership with a linear search, which on rtlmeter C906 took about a tenth of the run up to the first testbench output. The copies are now indexed by their target variable once, and a set holds the probes found so far. The probes, and their order, are the same. Closes #2052 Change-Id: I95e3ca3bb72b5ee15190faf623a7bcfa777f8c00
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. |
Contributor
Merge Queue Status
This pull request spent 33 minutes 50 seconds in the queue, including 31 minutes 38 seconds running CI. Required conditions to merge
|
40 of 71 tasks
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.
What
schedule_symbolic_rtl_reporting_loops(crates/celox-frontend-core/src/symbolic/assembly.rs) collects the sensitivity atoms whose occurrences it counts, then follows transparent wire/port copies upstream from each probe. For every probe it scanned all combinational logic paths of the design for a copy into the probe's variable (O(probes × paths)), and it deduplicated probes withVec::contains(O(probes²)).sensitivity_probes, and the copy propagation intoadd_copied_probes, which indexes the transparentVar-target paths by target variable once and visits only the copies into a probe's variable, in their original order.HashSetbeside the probe list replacesVec::contains.The probes and their order are unchanged, so the instrumented SIR is the same.
Why
rtlmeter C906 (45k combinational blocks):
schedule_symbolic_rtl_reporting_loopswas 8.7% self of the run up to the first testbench output, nearly all in this scan (perf annotate).Closes #2052
Validation
symbolic::assembly::tests::copied_probes_match_path_scan: 50 randomized designs of 60 logic paths (transparent and non-transparent copies, overlapping ranges, width mismatches, non-input expressions, mixed four-/two-state variables) compared against the previous scan of every path; probes and order must match. Removing the overlap check makes it fail.cargo fmt --all -- --check,cargo clippy -p celox-frontend-core --all-targets -- -D warnings: clean.cargo nextest run -p celox -p celox-frontend-core -p celox-frontend-sv -p celox-test-suite --features celox/systemverilog,celox/cranelift,celox/wasm-runtime,celox/wasm-component,celox/veryl-reference,celox-test-suite/runtime-cases: 14819 passed, 313 skipped.