Skip to content

fix(sim): keep clock copies sensed at the opposite edge apart - #1373

Merged
mergify[bot] merged 3 commits into
masterfrom
fix/opposite-edge-clock-copy
Oct 16, 2026
Merged

mergify[bot] merged 3 commits into
masterfrom
fix/opposite-edge-clock-copy

Conversation

@tignear

@tignear tignear commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

A whole-variable copy of a clock joined its source's clock domain even when it was sensed at the opposite edge. With assign c = clk; and always_ff @(negedge c), the block ran on clk's rising edge. A Veryl clock_negedge child port connected to a rising-edge clock behaved the same way.

unify_clock_domains now cuts a copy edge apart when its two ends are sensed at different edges, before it resolves canonical domains. A copy sensed at no edge takes the edge of its drivers, so chains such as assign c = clk; assign d = c; always_ff @(negedge d) are split, including chains through child ports. A root sensed at no edge, such as an SV input used only through copies, takes the edge of its first copy that is sensed at one. A copy that is cut off becomes a derived clock and fires on the source's falling edge, as IEEE 1800 requires.

Sensing one signal at both edges is still rejected with an explicit error (#443).

Tests: derived_register_clock.rs adds six cases: a Veryl internal copy, a Veryl falling-edge child port, SV @(negedge c), an SV chain of copies, an SV chain through a child port, and an unsensed SV input copied to both edges. All six fail on master. cargo nextest run --workspace --features celox/systemverilog: 13759 passed. clippy is clean.

A whole-variable copy of a clock joined its source's domain even when it
was sensed at the opposite edge, so always_ff @(negedge c) with
assign c = clk ran at clk's rising edge. Such a copy is now a clock
derived from its source.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-16T20:27:59.832968Z acbed0e PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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 added the merge-ready Request merging through Mergify after required checks label Oct 16, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 16, 2026
@mergify

mergify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-16 20:51 UTC · Rule: changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue — 2026-10-16 20:53 UTC · at acbed0e5d845ec6e84d7d85195229deb93d87c62

This pull request spent 1 minute 35 seconds in the queue, with no time running CI.

Reason

The pull request #1373 has been manually updated

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

@mergify mergify Bot removed the queued Mergify queue entry label Oct 16, 2026
@mergify

mergify Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 33 minutes 11 seconds in the queue, including 24 minutes 27 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • 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 added the queued Mergify queue entry label Oct 16, 2026
@mergify
mergify Bot merged commit 56911c7 into master Oct 16, 2026
27 checks passed
@mergify
mergify Bot deleted the fix/opposite-edge-clock-copy branch October 16, 2026 22:00
@mergify mergify Bot removed the queued Mergify queue entry label Oct 16, 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