FIRRTL version 3.2.0
circuit Test:
module Test:
input i: { f: UInt<1>, b: UInt<1> }
output o: { f: UInt<1>, b: UInt<1> }
connect o, i
Then as expected I get:
% firtool --preserve-aggregate=all test.fir
// Generated by CIRCT firtool-1.57.1
module Test(
input struct packed {logic f; logic b; } i,
output struct packed {logic f; logic b; } o
);
assign o = i;
endmodule
However, if I add a type alias:
FIRRTL version 3.2.0
circuit Test:
type MyBundle = { f: UInt<1>, b: UInt<1> }
module Test:
input i: MyBundle
output o: MyBundle
connect o, i
Then firtool emits an error:
% firtool --preserve-aggregate=all --scalarize-top-module=false test.fir
test.fir:7:5: error: 'hw.struct_extract' op used as connect destination
connect o, i
^
test.fir:7:5: note: see current operation: %6 = "hw.struct_extract"(%2) {field = "f"} : (!hw.typealias<@Test__TYPESCOPE_::@MyBundle, !hw.struct<f: i1, b: i1>>) -> i1
test.fir:7:5: error: 'firrtl.strictconnect' op LowerToHW couldn't handle this operation
connect o, i
^
test.fir:7:5: note: see current operation: "firrtl.strictconnect"(%7, %5) : (!firrtl.uint<1>, !firrtl.uint<1>) -> ()
Given:
Then as expected I get:
However, if I add a type alias:
Then firtool emits an error:
The FIRParser output is: