Skip to content

[ImportVerilog] Use Slang's LRM clock inference for assertion calls#10370

Merged
TaoBi22 merged 2 commits into
mainfrom
TaoBi22/slang-lrm-clock
May 5, 2026
Merged

[ImportVerilog] Use Slang's LRM clock inference for assertion calls#10370
TaoBi22 merged 2 commits into
mainfrom
TaoBi22/slang-lrm-clock

Conversation

@TaoBi22
Copy link
Copy Markdown
Contributor

@TaoBi22 TaoBi22 commented May 1, 2026

This allows us to connect explicit clocks to sampled value functions by using the LRM clock inference that Slang can do automatically. There are a few cases this doesn't handle yet that I've left for follow-ups - negedge should be quite easy, though supporting an event list might be a bit trickier (since we can't just use the OR of the triggers in case one of them goes low as another goes high). Note that this shouldn't cause a change in sv-tests since LTLToCore doesn't try to legalize certain LTL ops.

Once this is merged, we can think about also making the clock operand of ltl.past non-optional - I believe this is the only existing place where PastOps are created without a clock operand.

AI-assisted-by: Claude Code: claude-sonnet-4.6

AI-assisted-by: Claude Code: claude-sonnet-4.6
@TaoBi22 TaoBi22 requested a review from fabianschuiki May 1, 2026 14:33
@fabianschuiki
Copy link
Copy Markdown
Contributor

Results of circt-tests run for 9f43179 compared to results for 926f5ea: no change to test results.

Copy link
Copy Markdown
Contributor

@fabianschuiki fabianschuiki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread lib/Conversion/ImportVerilog/AssertionExpr.cpp Outdated
Comment thread lib/Conversion/ImportVerilog/AssertionExpr.cpp Outdated
@TaoBi22 TaoBi22 merged commit 1202f72 into main May 5, 2026
5 checks passed
@TaoBi22 TaoBi22 deleted the TaoBi22/slang-lrm-clock branch May 5, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants