Repository navigation
merge queue: checking #1469 on master (83c76d5), stacked on #1440 - #1476
Closed
mergify[bot] wants to merge 4 commits into
Closed
mergify[bot] wants to merge 4 commits into
mergify[bot] wants to merge 4 commits into
Conversation
…t differ from the module's Closes #1206. A generate block that imports a type or subroutine under a name the module binds to another declaration was rejected, because types, constant functions and subroutine metadata were looked up module-wide by the plain name. This gives the generate scope its own view of those tables instead. - `Scope` and `Item` record the names the block's imports bind (`imports`, filled by `bind_import`). `BlockImports` keeps the ones an inner declaration has not hidden again, and derives from them: - the type aliases the block sees: a name the blocks declare or import hides the module's type of that name, and an imported `t` denotes `p::t`'s type; - the installed constant-function table, with `f` aliased to `p::f`, or hidden when the block's `f` is no constant function (a DPI-C import). Calls in the bodies of the functions it hides are renamed to the outer binding, so a module function still calls the `f` it was declared with. - The elaborator evaluates a block's declarations, conditions and nested blocks with that view, and resolves a generate condition's call to the qualified declaration ahead of a module function of the same name. - `Item::dimensions` carries the block's type aliases (casts, `$bits(t)`), next to the function, formal-name and shape aliases it already had. The signal, process, instance, function and subroutine collectors use the item's type aliases and install its constant functions. - The two "imports as another declaration than its module" rejections are removed. - `resolve_imports` also records a block import of the declaration the module sees when a block around it imports another declaration or declares the name, so the inner block no longer inherits the outer binding. This was already wrong for values since #1184. - As a result, a generate-local declaration such as `localparam T` now also hides a module typedef `T`, so `T n;` under it is rejected instead of taking the outer type (IEEE 1800-2023 23.9). Validation: - `cargo fmt --all -- --check` - `cargo clippy -p celox-sv-analyzer -p celox-frontend-sv -p celox --all-targets --features celox/systemverilog,celox/sv-dpi --no-deps` - `cargo test -p celox-sv-analyzer -p celox-frontend-sv` - `cargo test -p celox --features systemverilog,sv-dpi` (11465 passed, 0 failed) New regressions: `generate_block_imports_bind_their_own_subroutines`, `generate_block_imports_bind_their_own_types`, `nested_generate_block_imports_restore_the_module_binding` and `generate_block_declarations_hide_outer_types` in `sv_packages.rs`, and `generate_block_imports_bind_their_own_dpi_formals` and `generate_block_dpi_imports_hide_outer_constant_functions` in `sv_dpi.rs`. Every case also uses the name outside the block, so the block-local binding is taken rather than the module-wide alias for names only blocks use. Unrelated defects found while testing are filed as #1435, #1436, #1437, #1438 and #1461. Change-Id: Ic706ae8c0a61ae10d0a6e8afa53fc99b83d759d2
In a mixed design, SV referred to Veryl modules and interfaces by their Veryl source names, while the Veryl emitter names them `<project>_<Name>` (or `<Name>` with `omit_project_prefix`). SV written against the emitted code did not link, and SV written for Celox did not build with other tools. SV now sees Veryl declarations only by their emitted names: declaration contracts, interface bindings and foreign roots use them, and the hierarchy linker maps each emitted name back to its Veryl body instead of matching names, so an SV module and an emitted Veryl name no longer shadow each other. An SV module named like an emitted Veryl module is reported as a duplicate. A Veryl top is still selected by its Veryl name, and instances keep Veryl module names. Validation: - cargo test -p celox -p celox-frontend-veryl --features celox/systemverilog --lib --test systemverilog - cargo clippy -p celox -p celox-frontend-veryl --all-targets --features celox/systemverilog --no-deps - cargo fmt --all -- --check - New mixed tests cover a custom project prefix, omit_project_prefix, rejection of source names, and emitted-name collisions BREAKING CHANGE: SV sources in a mixed design must instantiate Veryl modules and interfaces by their emitted names, such as `prj_Child`, instead of `Child`. parse_ir_with_external_hierarchy_and_native_modules takes a map from external module names to Veryl module names instead of a name set. Change-Id: Ib464695577c60ea747f010607b3bebf6671b2805
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 true-pate-mgvyou of the
changesqueue, to test #1469 before it merges intomaster. Pushing to this branch or closing this pull request removes #1469 from the queue.What this draft tests
Mergify checks that #1469 still passes CI once combined with everything queued ahead of it. CI runs on this draft's code, built in this order:
masterat83c76d539ebbd5The 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 pull request ahead, so a failure here can come from it as much as from #1469. 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 = 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 2da9286590224cfa9d932768cf4f8055["true-pate-mgvyou<br/>#1469<br/>scopes: core"] a119cb9ef28c4c1cbd47d79a55153864["automatic-pave-0ld8e9<br/>#1471 + #1459<br/>scopes: core"] 2da9286590224cfa9d932768cf4f8055 --> a119cb9ef28c4c1cbd47d79a55153864 style 2da9286590224cfa9d932768cf4f8055 fill:#6366f1,color:#fff