circt
circt copied to clipboard
[FIRRTL] CheckCombLoops: does not find all comb loops
FIRRTL version 4.0.0
circuit Foo:
public module Foo:
public module Bar:
output o : UInt<8>
wire w : UInt<8>
connect w, w
connect o, w
./bin/firtool ./comb-loops.fir gives:
// Generated by CIRCT circtorg-0.0.0-4546-g7df593d08-dirty
module Foo();
endmodule
module Bar(
output [7:0] o
);
assign o = 8'bz;
endmodule
We should have detected the combinational loop of wire w, and we should never allow a port to be driven with z. This is related to the fact that CheckCombLoops was never updated to handle more than one top level module.