From 8fedcf3f623d303ee433aeea9b321a6d382f33b8 Mon Sep 17 00:00:00 2001 From: Chris Lavin Date: Tue, 12 Mar 2024 10:39:01 -0600 Subject: [PATCH] [DesignTools.makeBlackBox()] Fix for #967 Signed-off-by: Chris Lavin --- src/com/xilinx/rapidwright/design/DesignTools.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/com/xilinx/rapidwright/design/DesignTools.java b/src/com/xilinx/rapidwright/design/DesignTools.java index 3a4d89cdf..44a2f9d95 100644 --- a/src/com/xilinx/rapidwright/design/DesignTools.java +++ b/src/com/xilinx/rapidwright/design/DesignTools.java @@ -4014,6 +4014,10 @@ public static void prepareShellBlackBoxForRouting(Design design) { if (net != null) { SitePinInst spi = si.getSitePinInst(sitePinName); if (spi == null || (spi != null && !spi.getNet().equals(net))) { + // Check for rare instance of FF driven by GND post inside SLICE + if (letter == 'A' && net.isGNDNet() && isUsingSLICEGND(input, si)) { + continue; + } BELPin lutInput = si.getBEL(letter + "6LUT").getPin("A6"); EDIFHierPortInst ffInput = c.getEDIFHierCellInst().getPortInst("D"); Cell lut1 = ECOTools.createAndPlaceInlineCellOnInputPin(design, ffInput, @@ -4077,6 +4081,12 @@ public static void prepareShellBlackBoxForRouting(Design design) { addProhibitConstraint(design, bels); } + private static boolean isUsingSLICEGND(BELPin input, SiteInst si) { + BEL bel = input != null ? input.getSourcePin().getBEL() : null; + SitePIP usedSitePIP = bel == null ? null : si.getUsedSitePIP(bel.getName()); + return usedSitePIP != null && usedSitePIP.getInputPinName().equals("F7F8"); + } + private static boolean isFFQOutputBlocked(Site site, BEL bel, Set used) { String sitePinName = bel.getPin("Q").getConnectedSitePinName(); Node n = site.getConnectedNode(sitePinName);