Skip to content

Commit

Permalink
[DesignTools.makeBlackBox()] Fixes an issue of removing CARRY blocks …
Browse files Browse the repository at this point in the history
…fed by routethrus (#1009)

* Fix null netlist pointer on expanded macro children

Signed-off-by: Chris Lavin <[email protected]>

* Fixes an issue of removing CARRY blocks fed by routethrus

Signed-off-by: Chris Lavin <[email protected]>

* Update src/com/xilinx/rapidwright/design/DesignTools.java

Signed-off-by: Chris Lavin <[email protected]>

* Update src/com/xilinx/rapidwright/design/DesignTools.java

Co-authored-by: eddieh-xlnx <[email protected]>
Signed-off-by: Chris Lavin <[email protected]>

---------

Signed-off-by: Chris Lavin <[email protected]>
Co-authored-by: eddieh-xlnx <[email protected]>
  • Loading branch information
clavin-xlnx and eddieh-xlnx authored Jun 27, 2024
1 parent fbf0997 commit b96fa42
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions src/com/xilinx/rapidwright/design/DesignTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,11 @@ public static List<SitePinInst> unrouteCellPinSiteRouting(Cell cell, String logi
String otherPinName = otherCell.getPinMappingsP2L().keySet().iterator().next();
otherPin = pin.getBEL().getPin(otherPinName);
} else {
otherPin = LUTTools.getLUTOutputPin(pin.getBEL());
// Make sure we are coming in on the routed-thru pin
String otherPinName = otherCell.getPinMappingsP2L().keySet().iterator().next();
if (pin.getName().equals(otherPinName)) {
otherPin = LUTTools.getLUTOutputPin(pin.getBEL());
}
}
if (otherPin != null) {
Net otherNet = siteInst.getNetFromSiteWire(otherPin.getSiteWireName());
Expand Down Expand Up @@ -1738,15 +1742,28 @@ public static void makeBlackBox(Design d, EDIFHierCellInst hierarchicalCell) {
t.stop().start("Remove p&r");

List<EDIFHierCellInst> allLeafs = d.getNetlist().getAllLeafDescendants(hierarchicalCell);

// Remove all placement and routing information related to the cell to be
// blackboxed
Set<Cell> cells = new HashSet<>();
for (EDIFHierCellInst i : allLeafs) {
// Get the physical cell, make sure we can unplace/unroute it first
Cell c = d.getCell(i.getFullHierarchicalInstName());
if (c == null) {
continue;
}
cells.add(c);
}
// Find encrypted cells that need to be removed
if (d.getNetlist().getEncryptedCells().size() > 0) {
String name = hierarchicalCell.getFullHierarchicalInstName();
for (Cell c : d.getCells()) {
if (c.getName().startsWith(name)) {
cells.add(c);
}
}
}

// Remove all placement and routing information related to the cell to be
// blackboxed
for (Cell c : cells) {
BEL bel = c.getBEL();
SiteInst si = c.getSiteInst();

Expand Down

0 comments on commit b96fa42

Please sign in to comment.