Repository navigation
merge queue: checking #2024 on master (b689f60), stacked on #1995, #2000 and #2014 - #2031
Closed
mergify[bot] wants to merge 8 commits into
Closed
mergify[bot] wants to merge 8 commits into
mergify[bot] wants to merge 8 commits into
Conversation
…ep comparison The native backend found an existing task for each trigger by comparing its unit list with every task so far, unit by unit and block by block. An unfused comb-apply task starts with all of `eval_comb`, so each comparison walked the whole combinational program: O(triggers^2 x program size). On C906 the backend sat in compile_program for 19+ minutes, mostly in memcmp and HashMap<BlockId, BasicBlock>::eq. Each distinct execution unit is now hashed once and assigned a class of structurally equal units, and tasks are looked up by their list of classes. Two unit lists have the same classes exactly when they compare equal, and tasks are visited in the same order, so the tasks, their order and their bindings are the same as before and the generated code does not change. Closes #1982 Change-Id: I03837ef8fa9804562d781436411449be6cb1c9b8
Closes #1991 Change-Id: Ied3fc477003f360c2ea17b71e19b6fd1a4559abb
An `initial` block is first folded into initial state by symbolic execution, and runs as a process only when that fails. A loop whose trip count the folding could not determine beforehand was unrolled one iteration at a time until `MAX_UNROLLED_ITERATIONS` (10000) failed the fold, so the block cost up to 10000 iterations of its body before running as the process it becomes anyway. The C906 testbench loads its program with two such loops (`for (j = 0; i < 32'h4000; i = j/4)` with 64 hierarchical memory writes per iteration), about 450 s each.
While folding an `initial` block, a loop now proceeds only when its trip count is known before it runs; otherwise the fold fails at once and the block runs as a process:
- `repeat` loops, and canonical `for` loops whose body does not write the loop variable (their trip count was already checked by `loop_needs_fold`);
- `while` and `do`-`while` loops shaped like one (`counted_while_loop`): the condition compares a variable with a bound, the last statement steps that variable as a canonical `for` step would, and no other statement writes the variable or the bound. They start from the variable's current value and keep folding when their trip count fits the unroll limit.
Other loops, such as a condition on a variable that another one derives, `forever`, or a `while` whose counter is stepped elsewhere, are not folded. The check costs one pass over the body, not iterations of it. The SystemVerilog reference lists the loops that fold.
BREAKING CHANGE: an `initial` block with such a loop is no longer folded even when it would finish within the unroll limit. It runs as a process, which a `Simulator` rejects ("`initial` ... is a process, which Simulator does not run"); build a `Simulation` instead.
Closes #1992.
- Shared cases `procedural::initial_loops_without_a_static_trip_count_run_as_a_process` (the testbench's load-loop shape with hierarchical memory writes, plus `while` and `do`-`while`, matching Icarus and Verilator) and `procedural::initial_while_loops_define_the_state` (a counted `while` loop still defines the state a `Simulator` sees).
- A reduction of the C906 memory load (the C906 `f_spsram_524288x128` and `ram` modules with the testbench's wipe and load loops) now takes 3.3 s instead of 223 s, with identical output; the load loop alone (`memC2.v`) takes 1.9 s instead of not finishing in 300 s.
Change-Id: I596c31f5ce2d71957b3e39e8c7afa7ac159dccee
…ss writes A process's nonblocking writes to an unpacked array that another process also writes, such as a testbench loading a RAM through hierarchical references, are staged in a value and a mask plane so that the other process's writes in between survive (IEEE 1800-2023 10.4.2). Their merge looped over every element on every edge, and every evaluation reset the whole mask plane. On rtlmeter C906 that is 16 x 524288 element merges per clock edge, 4.6 s per edge on the interpreter. When each nonblocking write of such an array is a select that runs at most once an evaluation (none is in a loop, a concatenation, a whole-array or a slice write), each write now also records the bit range it wrote and that it ran. The merge publishes only the elements those ranges cover and clears their mask bits, so an edge costs its writes. Elements another write already merged find their mask clear, and an out-of-range write marked no mask bits. Other arrays merge every element as before. Closes #2020 Change-Id: Iaa55fbe4ea0ab9588872ac23384812d151dba56a
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 grateful-cantadou-3a6htg of the
changesqueue, to test #2024 before it merges intomaster.What this draft tests
Mergify checks that #2024 still passes CI once combined with everything queued ahead of it. CI runs on this draft's code, built in this order:
masteratb689f60bdeef46The 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 #2024 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 3 pull requests ahead, so a failure here can come from them as much as from #2024. 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.
coreMetadata for CI tooling, read by
mergify ci1 scope
coreRequired conditions of queue rule
changesfor mergecheck-success = Queue validationmaster]:check-neutral = @github-actions/Lint & Formatcheck-skipped = @github-actions/Lint & Formatcheck-success = @github-actions/Lint & Formatmaster]:check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)check-success = @github-actions/NAPI Build (Linux ARM64 GNU)master]:check-neutral = @github-actions/NAPI Build (Windows)check-skipped = @github-actions/NAPI Build (Windows)check-success = @github-actions/NAPI Build (Windows)master]:check-neutral = @github-actions/Rust Test & NAPI Buildcheck-skipped = @github-actions/Rust Test & NAPI Buildcheck-success = @github-actions/Rust Test & NAPI Buildmaster]:check-neutral = @github-actions/JS Test (Ubuntu)check-skipped = @github-actions/JS Test (Ubuntu)check-success = @github-actions/JS Test (Ubuntu)master]:check-neutral = @github-actions/JS Test (Windows)check-skipped = @github-actions/JS Test (Windows)check-success = @github-actions/JS Test (Windows)check-success = Conventional Commit titlemaster]: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 877a9908f2254abf8026d43b74fc0e42["identical-saladenicoise-rznlzk<br/>#1995 + #2000 + #2014<br/>scopes: core"] d710663952e944f7ba3a7f947f2171bf["grateful-cantadou-3a6htg<br/>#2024<br/>scopes: core"] 877a9908f2254abf8026d43b74fc0e42 --> d710663952e944f7ba3a7f947f2171bf style d710663952e944f7ba3a7f947f2171bf fill:#6366f1,color:#fff