LLVM Discussion Forums

Wrong FIRRTL generation from Handshake using circt-opt -lower-handshake-to-firrtl

When using the command “circt-opt -lower-handshake-to-firrtl %s” on the test files in the folder HandshakeToFIRRTL, the generated FIRRTL files have functions that are not able to be converted to Verilog either using "circt-translate %s -emit-verilog " nor "firtool %s --format=mlir -verilog ".

The issues are with the .when and .bundle functions. For example, I get the errors:

simple_addiFIRRTL.mlir:36:5: error: value has an unsupported verilog type '!firrtl.bundle<valid: uint<1>, ready: flip<uint<1>>, data: uint<64>>'

simple_addiFIRRTL.mlir:12:7: error: ‘firrtl.when’ op cannot emit this operation to Verilog

Am I missing a lowering step or additional conversion from the output of “circt-opt -lower-handshake-to-firrtl %s” to be able to obtain Verilog or is there another way emit Verilog from the output?

Thanks beforehand,