Check loops through barriers.

This commit is contained in:
nella
2026-09-30 13:36:08 +02:00
parent 0dc61d9f56
commit 9724afae7f
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -342,7 +342,7 @@ struct CheckPass : public Pass {
}
}
if (yosys_celltypes.cell_evaluable(cell->type) || cell->type.in(ID($mem_v2), ID($memrd), ID($memrd_v2)) \
if (yosys_celltypes.cell_evaluable(cell->type) || cell->type.in(ID($mem_v2), ID($memrd), ID($memrd_v2), ID($barrier)) \
|| cell->is_builtin_ff()) {
if (!edges_db.add_edges_from_cell(cell))
coarsened_cells.insert(cell);
+11
View File
@@ -145,3 +145,14 @@ select -assert-count 1 t:$mux
select -assert-count 0 w:d %co1:+[A] t:$mux %i
design -reset
# check loop
read_verilog -icells <<EOT
module top(output w);
wire n;
\$barrier #(.WIDTH(1)) bar (.A(n), .Y(w));
assign n = ~w;
endmodule
EOT
logger -expect warning "found logic loop" 1
check
logger -check-expected