Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@seldridge
Copy link
Member

This reverts a revert.

Add a number of new features to FIRRTL's InstanceInfo analysis. These changes were made after downstream efforts (uncommitted work) to use this in the AddSeqMemPorts pass. These new features include:

  • hasDut to check if a circuit has a design-under-test
  • getDut to get the design-under-test if it exists
  • getEffectiveDut to get the "effective" design-under-test
  • isEffectiveDut to check if a module is the "effective" design-under-test

The "effective" design-under-test (DUT) is a weird artifact of how some SFC-derived passes have historically worked. If a circuit has no DUT (indicated by a circuit which contains no module annotated with a MarkDUTAnnotation), then some passes will treat the top module as if it were the DUT. This "effective" DUT concept shows up in AddSeqMemPorts, GrandCentral, and other passes. For now, enshrine the computation of this in the InstanceInfo analysis to avoid having to scatter logic for computing this across serverl passes.

Widen the accepted type of parameters that can be passed to InstanceInfo member functions from FModuleOp to igraph::ModuleOpInterface. This already works without modifications and makes these member functions much more usable.

**This reverts a revert.**

Add a number of new features to FIRRTL's `InstanceInfo` analysis.  These
changes were made after downstream efforts (uncommitted work) to use this
in the `AddSeqMemPorts` pass.  These new features include:

  - `hasDut` to check if a circuit has a design-under-test
  - `getDut` to get the design-under-test if it exists
  - `getEffectiveDut` to get the "effective" design-under-test
  - `isEffectiveDut` to check if a module is the "effective"
     design-under-test

The "effective" design-under-test (DUT) is a weird artifact of how some
SFC-derived passes have historically worked.  If a circuit has no
DUT (indicated by a circuit which contains no module annotated with a
`MarkDUTAnnotation`), then some passes will treat the top module as if it
were the DUT.  This "effective" DUT concept shows up in `AddSeqMemPorts`,
`GrandCentral`, and other passes.  For now, enshrine the _computation_ of
this in the `InstanceInfo` analysis to avoid having to scatter logic for
computing this across serverl passes.

Widen the accepted type of parameters that can be passed to `InstanceInfo`
member functions from `FModuleOp` to `igraph::ModuleOpInterface`.  This
already works without modifications and makes these member functions much
more usable.

Signed-off-by: Schuyler Eldridge <[email protected]>
@seldridge seldridge merged commit bf7aad7 into main Sep 24, 2024
4 checks passed
@seldridge seldridge deleted the dev/seldridge/firrtl-instance-info-fixes branch September 24, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants