Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async2sync fails on check cells with async reset #4875

Open
georgerennie opened this issue Jan 29, 2025 · 0 comments
Open

async2sync fails on check cells with async reset #4875

georgerennie opened this issue Jan 29, 2025 · 0 comments
Labels
pending-verification This issue is pending verification and/or reproduction

Comments

@georgerennie
Copy link
Collaborator

Version

Yosys 0.49+3 (git sha1 9d46304, g++ 14.2.1 -fPIC -O3)

On which OS did this happen?

Linux

Reproduction Steps

The following SBY file declares an assertion that should only be triggered when rst_n is high within a block triggered asynchronously by posedge clk and negedge rst_n. This should be supported in multiclock off mode as async2sync should be able to handle a single async reset, converting it to a sync reset.

[options]
mode bmc

[engines]
smtbmc

[script]
read -sv test.sv
prep -top top

[file test.sv]
module top(input wire clk);
	always_ff @(posedge clk or negedge rst_n) begin
		if (rst_n) begin
			assert(1'b1);
		end
	end
endmodule

Expected Behavior

SBY/Yosys accept the design and the proof passes. This happens fine with 9f27923, a commit from just before $check cells were added. Although I haven't bisected to determine exactly when this issue was introduced, I assume its with $check cells as they are not able to be lowered correctly in this case.

Actual Behavior

SBY reports an error from async2sync:

ERROR: $check cell _witness_.check_assert_test_sv_4_2 with TRG_WIDTH > 1 is not support by async2sync, use clk2fflogic.

This is because the trigger input is {rst_n, clk}. It would be good to be able to support this case otherwise embedding assertions within async reset blocks is broken.

@georgerennie georgerennie added the pending-verification This issue is pending verification and/or reproduction label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-verification This issue is pending verification and/or reproduction
Projects
None yet
Development

No branches or pull requests

1 participant