Skip to content

[FIRRTL] Expose an option to disable RAUW/replaceUsesWithIf in LowerLayers/LowerXMR to preserve RTL readability #9817

@unlsycn

Description

@unlsycn

Recent PRs #9654 and #9657 introduced a fallback mechanism to support XMRs/Probes on targets like module ports (BlockArgument) by creating a NodeOp (_probe) and replacing subsequent uses via replaceUsesWithIf or replaceAllUsesExcept.

While this correctly addresses the "uncovered dead wire" issue in certain vendor formal tools, it significantly degrades RTL readability for users who do not rely on those tools. For example, a simple passthrough assign output_0 = input_0; now becomes assign output_0 = input_0_probe;.

Could we expose a compiler option (e.g., --preserve-values-with-probes or --disable-probe-rauw in firtool) to toggle this RAUW behavior?

Ideally:

  • Default: Keep the current RAUW behavior for formal tool compatibility.
  • Opt-out: Generate the NodeOp for the XMR but skip the replaceUsesWithIf step, preserving the original signal as the driver for the rest of the circuit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions