Consider the following:
firrtl.circuit "Foo" {
firrtl.extmodule @Foo(
in a: !firrtl.uint<1>,
out a: !firrtl.uint<1>
)
}
This isn't tripping any verifier error:
# circt-opt Foo.reduced.0.mlir
module {
firrtl.circuit "Foo" {
firrtl.extmodule @Foo(in a: !firrtl.uint<1>, out a: !firrtl.uint<1>)
}
}
Apparently, this is only being checked in the parser:
# circt-translate -export-firrtl Foo.reduced.0.mlir | firtool -parse-only -format=fir
<stdin>:5:12: error: redefinition of name 'a'
output a : UInt<1> @[Foo.reduced.0.mlir 4:9]
^
<stdin>:4:11: note: previous definition here
input a : UInt<1> @[Foo.reduced.0.mlir 3:8]
^