mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-10-06 01:53:53 +02:00
Check loops through barriers.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user