Skip to content

[FIRRTL][Inliner] Assertion failed: (!renames.count(module) && "Module already renamed") ; hierpath reuse #10674

@dtzSiFive

Description

@dtzSiFive

Consider:

  firrtl.circuit "Top" {
    hw.hierpath private @nla [@Parent::@inst, @Child::@w]
    firrtl.module @Child() attributes {annotations = [{class = "firrtl.passes.InlineAnnotation"}]} {
      // Single wire with two annotations referencing the same NLA!
      %w = firrtl.wire sym @w {annotations = [
        {circt.nonlocal = @nla, class = "anno1"},
        {circt.nonlocal = @nla, class = "anno2"}
      ]} : !firrtl.uint<1>
    }
    firrtl.module @Parent() {
      // This instance has a symbol conflict that will force renaming
      %existing = firrtl.wire sym @w : !firrtl.uint<1>
      firrtl.instance inst sym @inst @Child()
    }
    firrtl.module @Top() {
      firrtl.instance p @Parent()
    }
  }

Two different annotations on same wire run into assertion failure if they share the same hierpath and the operation needs a new symbol ("renaming").

I believe making setInnerSym idempotent is the way to resolve this, check for and ignore redundant requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FIRRTLInvolving the `firrtl` dialectbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions