Skip to content

Commit

Permalink
DesignTools.createCeSrRstPinsToVCC() to detect gnd to invert
Browse files Browse the repository at this point in the history
Signed-off-by: Eddie Hung <[email protected]>
  • Loading branch information
eddieh-xlnx committed May 3, 2023
1 parent be53358 commit 73b3ef4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/com/xilinx/rapidwright/design/DesignTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
Expand Down Expand Up @@ -2844,16 +2845,24 @@ public static void createA1A6ToStaticNets(Design design) {
*/
public static void createCeSrRstPinsToVCC(Design design) {
Net vcc = design.getVccNet();
Net gndInvertibleToVcc = null;
Series series = design.getDevice().getSeries();
// On these series of devices, SR can be inverted from gnd to vcc
if (EnumSet.of(Series.UltraScale, Series.UltraScalePlus).contains(series)) {
gndInvertibleToVcc = design.getGndNet();
}
for (Cell cell : design.getCells()) {
if (isUnisimFlipFlopType(cell.getType())) {
SiteInst si = cell.getSiteInst();
if (si.getSiteName().equals("SLICE_X58Y149"))
System.err.print("");
BEL bel = cell.getBEL();
Pair<String, String> sitePinNames = belSitePinNameMapping.get(bel.getBELType());
String[] pins = new String[] {"CE", "SR"};
for (String pin : pins) {
BELPin belPin = cell.getBEL().getPin(pin);
Net net = si.getNetFromSiteWire(belPin.getSiteWireName());
if (net == null) {
if (net == null || (net == gndInvertibleToVcc && pin.equals("SR"))) {
String sitePinName;
if (pin.equals("CE")) { // CKEN
sitePinName = sitePinNames.getFirst();
Expand Down

0 comments on commit 73b3ef4

Please sign in to comment.