Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DesignTools.makeBlackBox()] Fixes an issue of removing CARRY blocks fed by routethrus #1009

Merged
merged 4 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
String name = hierarchicalCell.getFullHierarchicalInstName();
if (d.getNetlist().getEncryptedCells().size() > 0) {
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
2 changes: 2 additions & 0 deletions src/com/xilinx/rapidwright/edif/EDIFNetlist.java
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,8 @@ public void expandMacroUnisims(Series series) {
if (child == null) {
EDIFCell childCopy = new EDIFCell(netlistPrims, inst.getCellType(), inst.getCellType().getName());
inst.setCellType(childCopy);
} else if (inst.getCellType() != child) {
inst.setCellType(child);
}
}
}
Expand Down
Loading