Skip to content

[FIRRTL] Add Domain Info to WireOp #9398

@seldridge

Description

@seldridge

Currently, there's no way to verify the legality of firrtl.domain.define when a WireOp is involved. E.g., the following is trivially an error after domain inference, but there is no way to actually enshrine the legality/illegality in the IR:

firrtl.circuit "Foo" {
  firrtl.domain @ClockDomain
  firrtl.domain @PowerDomain
  firrtl.module @Foo(
    in %in: !firrtl.domain of @ClockDomain,
    out %out: !firrtl.domain of @PowerDomain
  ) {
    %w = firrtl.wire : !firrtl.domain // We don't have syntax or storage to mark the domain that %w is in.
    firrtl.domain.define %w, %in
    firrtl.domain.define %out, %w
  }
}

Modify FIRRTL's WireOp to include optional domain information, i.e., a DominInfoAttr. Update passes to support this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FIRRTLInvolving the `firrtl` dialectenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions