Skip to content

[FIRRTL] Missing Verifier that External Modules have Unique Names #9262

@seldridge

Description

@seldridge

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]
          ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    FIRRTLInvolving the `firrtl` dialectbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions