Skip to content

Commit

Permalink
Merge pull request #908 from Xilinx/2023.2.1
Browse files Browse the repository at this point in the history
2023.2.1
  • Loading branch information
clavin-xlnx authored Jan 10, 2024
2 parents 28bc6c8 + 56c6b7f commit 90312fd
Show file tree
Hide file tree
Showing 18 changed files with 308 additions and 148 deletions.
4 changes: 2 additions & 2 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
<classpathentry kind="lib" path="jars/kryo-5.2.1.jar"/>
<classpathentry kind="lib" path="jars/minlog-1.3.1.jar"/>
<classpathentry kind="lib" path="jars/jython-standalone-2.7.2.jar"/>
<classpathentry kind="lib" path="jars/rapidwright-api-lib-2023.2.0.jar">
<classpathentry kind="lib" path="jars/rapidwright-api-lib-2023.2.1.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/RapidWright/jars/rapidwright-api-lib-2023.2.0-javadoc.jar!/"/>
<attribute name="javadoc_location" value="jar:platform:/resource/RapidWright/jars/rapidwright-api-lib-2023.2.1-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="jars/jgrapht-core-1.3.0.jar"/>
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:

env:
RAPIDWRIGHT_VERSION: v2023.2.0-beta
RAPIDWRIGHT_VERSION: v2023.2.1-beta

jobs:
build:
Expand Down
39 changes: 39 additions & 0 deletions RELEASE_NOTES.TXT
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
============= RapidWright 2023.2.1-beta released on 2023-01-10 ================
Notes:
- Add EDIFHierCellInst.isUniquified() (#918)
- [RWRoute] RouteNode to extend Node (#916)
- [DesignComparator] Fix whitespace (#937)
- RouteThruHelper.isRouteThruPIPAvailable(Design, WireInterface, WireIn (#915)
- Create a common interface for Node and Wire Objects (#892)
- DesignComparator - compares place and route data (#931)
- DesignTools.createMissingSitePinInsts() to infer SitePinInsts more smartly (#936)
- LUTTools.swapLutPinsFromPIPs() to warn when site pin not found (#934)
- [PhysNetlistReader] Warn and omit if PIP not found (#933)
- [PhysNetlistWriter] Handle PORT cells in GTY tiles (#930)
- [PhysNetlistWriter] Assume static net output BELPins to be sources too (#929)
- [PhysNetlistWriter] Fix stubs on static nets (#928)
- Get a Boolean from EDIFPropertyValue (#926)
- [PhysNetlistWriter] Infer direction of IOB's PAD.PAD BEL pin (#927)
- [RouteThruHelper] Move assertions, improve tests (#925)
- [RWRoute] Don't swap dist RAMs on 'H' BELs since A and WA are shared (#924)
- [PhysNetlistWriter] Recognize static source BELPins (e.g. LUT outputs) (#923)
- [RWRoute] Analyze a tile below the topmost arbitrary one (#921)
- Adding test for IOB placement (#903)
- [DesignTools.makeBlackBox()] Fixes routing issues in makeBlackBox() (#919)
- [ECOTools] Inline cell insertion (#917)
- RouterHelper.invertPossibleGndPinsToVccPins() to work on all invertible pins (#911)
- [RWRoute] GlobalSignalRouting static net router to use [A-H]MUX outputs (#914)
- [RWRoute] Fix exception for unrouteable connections (#913)
- Declare gradle dependency explicitly (#909)
- Fixes [Versal BELAttr] Parsing issue #912
- Add site pins when site routing through inverter BELs
- Fix UltraScale+ IBUF site routing
- Fix DSP pin mapping removals during site routing
- Adds support for special clock Node flag present in Versal designs

API Additions:
- com.xilinx.rapidwright.device.Node "public Node(Node node)"
- com.xilinx.rapidwright.device.Package "public synchronized PackagePin getPackagePin(Site site)"
- com.xilinx.rapidwright.device.Package "public String getPackagePinName(Site site)"


============= RapidWright 2023.2.0-beta released on 2023-11-20 ================
Notes:
- SLR Corner updates in device models and handling (#886)
Expand Down
104 changes: 104 additions & 0 deletions src/com/xilinx/rapidwright/device/WireInterface.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/*
* Copyright (c) 2023, Advanced Micro Devices, Inc.
* All rights reserved.
*
* Author: Chris Lavin, AMD Research and Advanced Development.
*
* This file is part of RapidWright.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.xilinx.rapidwright.device;

/**
* An interface to enable methods to operate on the common methods of a Wire
* object as well as a Node object. At their heart, they both specify a Tile and
* a wire (in the case of a Node it is the base wire).
*
* @since 2023.2.1
*/
public interface WireInterface {

/**
* Gets the tile corresponding to this wire/base wire.
*
* @return The tile of this wire/base wire.
* @since 2023.2.1
*/
Tile getTile();

/**
* Gets the tile name corresponding to this wire/base wire.
*
* @return The tile name of this wire/base wire.
* @since 2023.2.1
*/
default String getTileName() {
return getTile().getName();
}

/**
* Gets the wire index corresponding to this wire/base wire.
*
* @return The wire index of this wire/base wire.
* @since 2023.2.1
*/
int getWireIndex();

/**
* Gets the wire name corresponding to this wire/base wire.
*
* @return The wire name of this wire/base wire.
* @since 2023.2.1
*/
default String getWireName() {
return getTile().getWireName(getWireIndex());
}

/**
* Gets the intent code corresponding to this wire/base wire.
*
* @return The intent code of this wire/base wire.
* @since 2023.2.1
*/
IntentCode getIntentCode();

/**
* Gets the corresponding site pin (if any) to this wire/base wire.
*
* @return The site pin connected to this wire/base wire, or null if not
* present.
* @since 2023.2.1
*/
SitePin getSitePin();

/**
* Produces a hash code based on the tile and wire of the object.
*
* @return A hash code derived from the tile and wire.
* @since 2023.2.1
*/
int hashCode();

/**
* Checks equality (based on tile and wire values) between this and another
* WireInterface
*
* @param w The other object to check against for equality.
* @return True if the two objects have the same tile and wire index, false
* otherwise.
* @since 2023.2.1
*/
boolean equals(WireInterface w);
}
2 changes: 1 addition & 1 deletion src/com/xilinx/rapidwright/router/RouteNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public RouteNode(Tile tile, int wire, RouteNode parent, int level) {

public RouteNode(SitePinInst p) {
setTile(p.getTile());
setWire(p.getConnectedTileWire());
setWire(p.getConnectedWireIndex());
}

public RouteNode(Node n) {
Expand Down
44 changes: 3 additions & 41 deletions src/com/xilinx/rapidwright/router/RouteThruHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import com.xilinx.rapidwright.device.Tile;
import com.xilinx.rapidwright.device.TileTypeEnum;
import com.xilinx.rapidwright.device.Wire;
import com.xilinx.rapidwright.device.WireInterface;
import com.xilinx.rapidwright.util.FileTools;

/**
Expand Down Expand Up @@ -182,50 +183,11 @@ public static boolean isRouteThruSitePinAvailable(Design design, SitePin sitePin
}

/**
* Given two Wire objects (assumed to make up a routethru PIP) check that this
* Given two WireInterface objects (assumed to make up a routethru PIP) check that this
* PIP is available for use by checking for net and cell collisions within the site
* it is routing through.
* Note that this method is identical to the {@link #isRouteThruPIPAvailable(Design, Node, Node)}
* overload, kept separate to minimize unnecessary calling Node.getSitePin().
*/
public static boolean isRouteThruPIPAvailable(Design design, Wire start, Wire end) {
SitePin outPin = end.getSitePin();
if (!isRouteThruSitePinAvailable(design, outPin)) {
return false;
}
SitePin inPin = start.getSitePin();
if (!isRouteThruSitePinAvailable(design, inPin)) {
return false;
}
assert(inPin.getSite() == outPin.getSite());

SiteInst siteInst = design.getSiteInstFromSite(inPin.getSite());
if (siteInst != null) {
for (BELPin sink : inPin.getBELPin().getSiteConns()) {
BEL sinkBEL = sink.getBEL();
if (sinkBEL.getName().charAt(0) != inPin.getPinName().charAt(0)) {
continue;
}
Cell cellCollision = siteInst.getCell(sinkBEL);
if (cellCollision != null) {
// Ignore BELs that don't share the same LUT letter
// Specifically, this is to prevent H[1-6] inputs on SLICEM sites
// -- which also drive [A-G].WA[1-6] -- from considering [A-G]LUT[56]
return false;
}
}
}
return true;
}

/**
* Given two Node objects (assumed to make up a routethru PIP) check that this
* PIP is available for use by checking for net and cell collisions within the site
* it is routing through.
* Note that this method is identical to the {@link #isRouteThruPIPAvailable(Design, Wire, Wire)}
* overload, kept separate to minimize unnecessary calling Node.getSitePin().
*/
public static boolean isRouteThruPIPAvailable(Design design, Node start, Node end) {
public static boolean isRouteThruPIPAvailable(Design design, WireInterface start, WireInterface end) {
SitePin outPin = end.getSitePin();
if (!isRouteThruSitePinAvailable(design, outPin)) {
return false;
Expand Down
6 changes: 3 additions & 3 deletions src/com/xilinx/rapidwright/rwroute/Connection.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ private float getRouteDelay() {
RouteNode rnode = getRnodes().get(i);
RouteNode parent = getRnodes().get(i+1);
routeDelay += rnode.getDelay() +
DelayEstimatorBase.getExtraDelay(rnode.getNode(), DelayEstimatorBase.isLong(parent.getNode()));
DelayEstimatorBase.getExtraDelay(rnode, DelayEstimatorBase.isLong(parent));
}
return routeDelay;
}
Expand Down Expand Up @@ -483,7 +483,7 @@ public String toString() {

public void setAllTargets(boolean target) {
if (sinkRnode.countConnectionsOfUser(netWrapper) == 0 ||
sinkRnode.getNode().getIntentCode() == IntentCode.NODE_PINBOUNCE) {
sinkRnode.getIntentCode() == IntentCode.NODE_PINBOUNCE) {
// Since this connection will have been ripped up, only mark a node
// as a target if it's not already used by this net.
// This prevents -- for the case where the same net needs to be routed
Expand All @@ -501,7 +501,7 @@ public void setAllTargets(boolean target) {
if (rnode.countConnectionsOfUser(netWrapper) == 0 ||
// Except if it is not a PINFEED_I
rnode.getType() != RouteNodeType.PINFEED_I) {
assert(rnode.getNode().getIntentCode() != IntentCode.NODE_PINBOUNCE);
assert(rnode.getIntentCode() != IntentCode.NODE_PINBOUNCE);
rnode.setTarget(target);
}
}
Expand Down
18 changes: 8 additions & 10 deletions src/com/xilinx/rapidwright/rwroute/PartialRouter.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ protected boolean isPartOfExistingRoute(Node start, Node end) {
// Presence of a prev pointer means that only that arc is allowed to enter this end node
RouteNode prev = endRnode.getPrev();
if (prev != null) {
assert((prev.getNode() == start) == prev.getNode().equals(start));
if (prev.getNode() == start && routingGraph.isPreserved(end)) {
if (prev.equals(start) && routingGraph.isPreserved(end)) {
// Arc matches start node and end node is preserved
// This implies that both start and end nodes must be preserved for the same net
// (which assumedly is the net we're currently routing, and is asserted upstream)
Expand Down Expand Up @@ -525,17 +524,17 @@ protected void addNetConnectionToRoutingTargets(Net net) {
protected Collection<Net> pickNetsToUnpreserve(Connection connection) {
Set<Net> unpreserveNets = new HashSet<>();

Node sourceNode = connection.getSourceRnode().getNode();
Node sinkNode = connection.getSinkRnode().getNode();
RouteNode sourceRnode = connection.getSourceRnode();
RouteNode sinkRnode = connection.getSinkRnode();

List<Node> candidateNodes = new ArrayList<>();
// Consider the cases of [A-H](X|_I) site pins which are accessed through a bounce node,
// meaning this connection may be unroutable because another net is preserving this node
candidateNodes.add(sinkNode);
candidateNodes.add(sinkRnode);
// Find those reserved signals that are using uphill nodes of the target pin node
candidateNodes.addAll(sinkNode.getAllUphillNodes());
candidateNodes.addAll(sinkRnode.getAllUphillNodes());
// Find those preserved nets that are using downhill nodes of the source pin node
candidateNodes.addAll(sourceNode.getAllDownhillNodes());
candidateNodes.addAll(sourceRnode.getAllDownhillNodes());

for(Node node : candidateNodes) {
Net toRoute = routingGraph.getPreservedNet(node);
Expand Down Expand Up @@ -685,13 +684,12 @@ protected void unpreserveNet(Net net) {
routingGraph.resetExpansion();

for (RouteNode rnode : rnodes) {
Node toBuild = rnode.getNode();
// Check already unpreserved above
assert(!routingGraph.isPreserved(toBuild));
assert(!routingGraph.isPreserved(rnode));

// Each rnode should be added as a child to all of its parents
// that already exist
for (Node uphill : toBuild.getAllUphillNodes()) {
for (Node uphill : rnode.getAllUphillNodes()) {
RouteNode parent = routingGraph.getNode(uphill);
if (parent == null)
continue;
Expand Down
Loading

0 comments on commit 90312fd

Please sign in to comment.