Skip to content

fix(sv): preserve inherited constants in parameter alias evaluation - #1682

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/taxi-compatibility/preserve-inherited-constants-param-alias--d0a3d57a
Oct 21, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/taxi-compatibility/preserve-inherited-constants-param-alias--d0a3d57a

Conversation

@tignear

@tignear tignear commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Taxi DMA address masks lost their initializers when their replication counts used local aliases of interface parameters. Prefix evaluation only saw locally collected numbers, so it could not resolve an alias of an inherited constant even though that constant was available for declaration lowering.

Seed a separate incremental evaluation environment with inherited values and types, masking names owned by the current scope before rebinding the local prefix. Preserve imported X/Z literals and use the existing initializer shape context for constant binding. Retain the separate range projection and update only each declaration's binding keys.

Add shared coverage for package aliases, wide replication masks, generate scopes, signedness and X/Z. Extend the existing interface specialization case with the same mask pattern. Structural checks at 16, 64 and 256 declarations verify one binding per declaration and no per-declaration range-environment copies.

Validation:

  • Shared SV suite: 3297 passed, 90 existing ignores across backend variants.
  • SV analyzer: 772 passed, 3 existing ignores; project CLI: 17 passed.
  • Verilator passes the numeric package case and extended interface case; its adapter does not support the four-state case. Icarus passes both package cases; its existing interface-port exclusion is retained.
  • Affected-crate all-target Clippy, formatting and diff checks pass.
  • Original Taxi cc70b270b910d369ab1ad7b3855e76399fd461f1 at O1, cocotb 2.0.1, seed 12345: AXI CDMA [8-0] passes all 4 tests and AXI DMA [0-8] passes all 8 tests. Sources and upstream parameters are unchanged; this does not cover every DMA configuration.

Depends-On: #1678

Taxi DMA address masks lost their initializers when their replication counts used local aliases of interface parameters. Prefix evaluation only saw locally collected numbers, so it could not resolve an alias of an inherited constant even though that constant was available for declaration lowering.

Seed a separate incremental evaluation environment with inherited values and types, masking names owned by the current scope before rebinding the local prefix. Preserve imported X/Z literals and use the existing initializer shape context for constant binding. Retain the separate range projection and update only each declaration's binding keys.

Add shared coverage for package aliases, wide replication masks, generate scopes, signedness and X/Z. Extend the existing interface specialization case with the same mask pattern. Structural checks at 16, 64 and 256 declarations verify one binding per declaration and no per-declaration range-environment copies.

Validation:
- Shared SV suite: 3297 passed, 90 existing ignores across backend variants.
- SV analyzer: 772 passed, 3 existing ignores; project CLI: 17 passed.
- Verilator passes the numeric package case and extended interface case; its adapter does not support the four-state case. Icarus passes both package cases; its existing interface-port exclusion is retained.
- Affected-crate all-target Clippy, formatting and diff checks pass.
- Original Taxi cc70b270b910d369ab1ad7b3855e76399fd461f1 at O1, cocotb 2.0.1, seed 12345: AXI CDMA [8-0] passes all 4 tests and AXI DMA [0-8] passes all 8 tests. Sources and upstream parameters are unchanged; this does not cover every DMA configuration.

Change-Id: Id0a3d57a401cd41a228a26cd9a256b9b12e8884f
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@tignear

tignear commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 feat(cli): configure SV simulation timescales #1672
2 fix(sv): fill unbased parameter overrides to their declared width #1677
3 fix(sv): defer indexed part-select base binding until types are available #1678
4 fix(sv): preserve inherited constants in parameter alias evaluation #1682 👈

@mergify

mergify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

Base automatically changed from stack/tignear/fix/taxi-compatibility/defer-indexed-part-select-base-binding-until--57adbbd3 to master October 21, 2026 05:33
@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 21, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 21, 2026
@mergify

mergify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 2 hours 50 minutes 18 seconds in the queue, including 1 hour 38 minutes 21 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • depends-on = celox-sim/celox#1678 [⛓️ fix(sv): defer indexed part-select base binding until types are available #1678]
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of [🛡 GitHub repository ruleset rule master]:
    • 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)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Windows)
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Windows)
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

@mergify
mergify Bot merged commit b8f48ae into master Oct 21, 2026
31 checks passed
@mergify
mergify Bot deleted the stack/tignear/fix/taxi-compatibility/preserve-inherited-constants-param-alias--d0a3d57a branch October 21, 2026 15:16
@mergify mergify Bot removed the queued Mergify queue entry label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant