Skip to content

Fix verification generation for event driven simulators #2455

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

Merged
merged 6 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion calyx/backend/src/verilog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ fn emit_component<F: io::Write>(
if let Some(check) =
emit_guard_disjoint_check(dst, asgns, &pool, true)
{
writeln!(f, "always_comb begin")?;
writeln!(f, "always_ff @(posedge clk) begin")?;
writeln!(f, " {check}")?;
writeln!(f, "end")?;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/backend/verilog/data-instance.expect
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ assign data_add_multi_left =
_guard1 ? 2'd2 :
_guard3 ? 2'd3 :
'x;
always_comb begin
always_ff @(posedge clk) begin
if(~$onehot0({_guard3, _guard1})) begin
$fatal(2, "Multiple assignment to port `data_add_multi.left'.");
end
Expand Down
2 changes: 1 addition & 1 deletion tests/errors/runtime/multiple-drivers.expect
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[70] %Error: Assertion failed in TOP.toplevel.main: Multiple assignment to port `r.in'.
[90] %Error: Assertion failed in TOP.toplevel.main: Multiple assignment to port `r.in'.
%Error: Verilog $stop