Skip to content

[reduce] Improve handling of NLA's, especially "new" format + sharing. #4922

Open
@dtzSiFive

Description

HierPathOp's (previously firrtl.nla) no longer are referenced via circt.nonlocal breadcrumbs along the instance path, so identifying which hierpath's an instance participates in cannot be determined by checking for that. For example, this causes ModuleExternalizer to no longer be able to externalize instances if an NLA targets the ports/ops of the module (or its children, but not sure that would work previously (?)). Similarly InstanceStubber, so on.

In addition to dropping the breadcrumbs, to reduce the quantity of HierPathOp's and cost of their maintenance, they now end in the module now (instead of InnerRef / (Symbol::InnerSymbol pair)), identifying the path only not the targets specifically, so they're often shared across operations/ports using them. If this can be handled reasonably would help avoid invalid IR but may require more expensive walks to be done reliably.

FIRRTL's NLATable may be useful for querying the HierPath's an instance participates in, but finding other users may require walking the final module and/or looking through cached SymbolUsers (or so). Or extending NLATable.

This may not be worth addressing if we change how these work, but recording this issue since ran into it trying to use circt-reduce on NLA-heavy designs.

Metadata

Assignees

No one assigned

    Labels

    ReducerRelated to `circt-reduce`enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions