CIRCT 24.0.0git
Loading...
Searching...
No Matches
InjectDUTHierarchy.cpp File Reference
Include dependency graph for InjectDUTHierarchy.cpp:

Go to the source code of this file.

Namespaces

namespace  circt
 The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
namespace  circt::firrtl

Macros

#define DEBUG_TYPE   "firrtl-inject-dut-hier"
#define GEN_PASS_DEF_INJECTDUTHIERARCHY

Functions

static void addHierarchy (hw::HierPathOp path, FModuleOp dut, InstanceOp wrapperInst, StringAttr oldDutNameAttr)
 Add an extra level of hierarchy to a hierarchical path that places the wrapper instance after the DUT.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "firrtl-inject-dut-hier"

Definition at line 70 of file InjectDUTHierarchy.cpp.

◆ GEN_PASS_DEF_INJECTDUTHIERARCHY

#define GEN_PASS_DEF_INJECTDUTHIERARCHY

Definition at line 74 of file InjectDUTHierarchy.cpp.

Function Documentation

◆ addHierarchy()

void addHierarchy ( hw::HierPathOp path,
FModuleOp dut,
InstanceOp wrapperInst,
StringAttr oldDutNameAttr )
static

Add an extra level of hierarchy to a hierarchical path that places the wrapper instance after the DUT.

This appends to the existing path immediately after the dut.

E.g., this is converting:

firrtl.hierpath [@Top::@dut, @DUT]

Into:

firrtl.hierpath [@Top::@dut, @DUT::@wrapper, @Wrapper]

The oldDutNameAttr parameter controls the insertion point. I.e., this is the location of a module wehre an insertion will happen. By separating this from the dut paramter, this allows this function to work for both the moveDut=false and moveDut=true cases. In the moveDut=false case the dut and oldDutNameAttr refer to the same module.

Definition at line 106 of file InjectDUTHierarchy.cpp.

References circt::firrtl::getInnerSymName().