mirror of https://github.com/llvm/circt.git
[FIRRTL] Update GCT Taps to handle HierPathOp ending in Module (#3303)
This commit updates the GrandCentralTaps to handle HierPathOp ending in modules.
This commit is contained in:
parent
1cab6f2f0d
commit
c6cc346550
|
@ -844,8 +844,17 @@ void GrandCentralTapsPass::runOnOperation() {
|
|||
for (auto inst : shortestPrefix.getValue())
|
||||
addSymbol(getInnerRefTo(inst));
|
||||
if (port.nla) {
|
||||
for (auto sym : port.nla.namepath())
|
||||
auto namepath = port.nla.namepath();
|
||||
Attribute leaf = namepath.getValue().back();
|
||||
if (!leaf.isa<InnerRefAttr>()) {
|
||||
if (port.target.hasPort())
|
||||
leaf = getInnerRefTo(port.target.getOp(), port.target.getPort());
|
||||
else
|
||||
leaf = getInnerRefTo(port.target.getOp());
|
||||
}
|
||||
for (auto sym : namepath.getValue().drop_back())
|
||||
addSymbol(sym);
|
||||
addSymbol(leaf);
|
||||
} else if (port.target.getOp()) {
|
||||
if (port.target.hasPort())
|
||||
addSymbol(
|
||||
|
|
|
@ -554,3 +554,12 @@ firrtl.circuit "Top" {
|
|||
firrtl.instance dut @DUT()
|
||||
}
|
||||
}
|
||||
// ---
|
||||
// The HierpathOps that should be updated to end on a module:
|
||||
// firrtl.hierpath @nla_1 [@NLAGarbageCollection::@dut, @DUT::@submodule, @Submodule]
|
||||
// firrtl.hierpath @nla_2 [@NLAGarbageCollection::@dut, @DUT::@submodule, @Submodule]
|
||||
// firrtl.hierpath @nla_3 [@NLAGarbageCollection::@dut, @DUT::@submodule, @Submodule]
|
||||
// firrtl.hierpath @nla_1 [@NLAUsedInWiring::@foo, @Foo]
|
||||
// firrtl.hierpath @nla_2 [@NLAUsedInWiring::@foo, @Foo]
|
||||
// firrtl.hierpath @nla_0 [@DUT::@submodule_1, @Submodule]
|
||||
// firrtl.hierpath @nla [@DUT::@submodule_2, @Submodule]
|
||||
|
|
Loading…
Reference in New Issue