Consider:
firrtl.circuit "Top" {
hw.hierpath private @nla [@Bar::@baz_inst, @Baz]
firrtl.module @Top() {
firrtl.instance foo @Foo()
}
firrtl.module private @Foo() {
firrtl.instance bar @Bar()
}
firrtl.module private @Bar() attributes {annotations = [
{class = "firrtl.passes.InlineAnnotation"},
{class = "firrtl.transforms.FlattenAnnotation"}
]} {
%baz_port = firrtl.instance baz sym @baz_inst @Baz(in port: !firrtl.uint<1>)
}
// Annotation on this port should be preserved on /something/!
firrtl.module private @Baz(in %port: !firrtl.uint<1> [{circt.nonlocal = @nla, class = "test"}]) { }
}
With circt-opt --firrtl-inliner (1.149.0, 1.144.0, and likely earlier) we produce the following:
module {
firrtl.circuit "Top" {
firrtl.module @Top() {
firrtl.instance foo @Foo()
}
firrtl.module private @Foo() {
%bar_baz_port = firrtl.wire : !firrtl.uint<1>
}
}
}
Note that we've dropped the annotation on the wire created for the port.
Expected:
firrtl.module private @Foo() {
%bar_baz_port = firrtl.wire {annotations = [{class = "test"}]} : !firrtl.uint<1>
}
This affects any module that has both InlineAnnotation and FlattenAnnotation with NLAs rooted at that module.
Consider:
With
circt-opt --firrtl-inliner(1.149.0, 1.144.0, and likely earlier) we produce the following:Note that we've dropped the annotation on the wire created for the port.
Expected:
This affects any module that has both InlineAnnotation and FlattenAnnotation with NLAs rooted at that module.