Open Schottkyc137 opened 2 years ago
On a side note: firtool seems to hang up on this simple example and other circular examples
Thanks, it seems PrettifyVerilog is hanging up at https://github.com/llvm/circt/blob/141eae7157eada07b3baf350935b984b50a715da/lib/Dialect/SV/Transforms/PrettifyVerilog.cpp#L140 because of the circular use.
I think circular logic is allowed by design to represent flip-flop etc but I agree that it would be nice to raise errors for this kind of obviously invalid circuits.
The following code:
is considered correct and produces the following Verilog output (using
circt-opt circular.mlir --export-verilog
):analyzing this with Verilator gives the following error:
in other words, this simple circular logic is not detected by the tools.
On a side note:
firtool
seems to hang up on this simple example and other circular examples