Skip to content

Commit

Permalink
Merge pull request #1060 from Xilinx/2024.1.3
Browse files Browse the repository at this point in the history
2024.1.3
  • Loading branch information
clavin-xlnx authored Oct 2, 2024
2 parents c6a2d3c + ca877a8 commit abeb1f6
Show file tree
Hide file tree
Showing 15 changed files with 508 additions and 277 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-2024.1.2.jar">
<classpathentry kind="lib" path="jars/rapidwright-api-lib-2024.1.3.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/RapidWright/jars/rapidwright-api-lib-2024.1.2-javadoc.jar!/"/>
<attribute name="javadoc_location" value="jar:platform:/resource/RapidWright/jars/rapidwright-api-lib-2024.1.3-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: v2024.1.2-beta
RAPIDWRIGHT_VERSION: v2024.1.3-beta

jobs:
build:
Expand Down
30 changes: 30 additions & 0 deletions RELEASE_NOTES.TXT
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
============= RapidWright 2024.1.3-beta released on 2024-10-02 ================
Notes:
- [RWRoute] Further cleanup (#1070)
- [PhysNetlistReader] Call SiteInst.setDesign() even for STATIC_SOURCEs (#1071)
- [GlobalSignalRouting] Fix VCC routing for UltraScale (#1068)
- [RWRoute] Cleanup static router and RouterHelper (#1059)
- [PartialRouter] Disable ripup in global/static routing (#1067)
- [TestDesign] Add test for net ordering of >= 2022.1 DCPs (#1054)
- [TestBEL] Add testDIFFsAreNotFF() (#1062)
- Test for Design.retargetPart() (#1061)
- [EDIF] Fixes rare bus renaming collision (#1065)
- [RWRoute] Always clear prev pointer of unpreserved RouteNode-s (#1056)
- [LaunchTestsOnLsf] Invoke java with assertions enabled (#1066)
- [LaunchTestsOnLsf] Invoke java with assertions enabled (#1063)
- Fix testRouteStaticNet() to avoid site pins, and fix golden values (#1064)
- [GitHub Actions] Migrate to upload-artifact@v4 (#1058)
- Add recursive partitioning ternary tree (RPTT) (#1055)
- Add support for vu19p tiles in bitstream
- [Design] createModuleInst() to not create duplicate STATIC_SOURCE-s
- Removes all instances of enum.hashCode()
- [Node] equals() to use instanceof for subclass-awareness
- Retarget & relocate an existing design to a new part and location
- Fixes issue related to non-deterministic Net order upon multi-threaded DCP load
- Fix BEL.isFF() based on BELTypes
- Fix missing Design.getSeries()

API Additions:
- com.xilinx.rapidwright.design.Design "public boolean retargetPart(Part targetPart, int tileXOffset, int tileYOffset)"


============= RapidWright 2024.1.2-beta released on 2024-09-04 ================
Notes:
- Creating a standalone entry point to relocate DCPs (#1047)
Expand Down
68 changes: 68 additions & 0 deletions src/com/xilinx/rapidwright/examples/PartRetargeter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
*
* Copyright (c) 2024, 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.examples;

import java.util.Arrays;

import com.xilinx.rapidwright.design.Design;
import com.xilinx.rapidwright.device.Device;
import com.xilinx.rapidwright.device.Part;
import com.xilinx.rapidwright.device.PartNameTools;

/**
* Allows an existing DCP (placed and/or routed) to be retargeted to another
* part and optionally be relocated to another SLR. This works only for specific
* devices such as a VU3P to a VU9P, for example since they have floorplan
* compatible SLRs.
*/
public class PartRetargeter {

public static void main(String[] args) {
if (args.length != 4) {
System.out.println("USAGE: <input.dcp> <output.dcp> <target part name> <target SLR index>");
System.exit(1);
}
Part targetPart = PartNameTools.getPart(args[2]);
if (targetPart == null) {
throw new RuntimeException("ERROR: Unrecognized part '" + args[2] + "'");
}
Device targetDevice = Device.getDevice(targetPart);

int targetSLR = Integer.parseInt(args[3]);
if (targetSLR < 0 || targetSLR >= targetDevice.getNumOfSLRs()) {
throw new RuntimeException("ERROR: Invalid SLR index '" + args[3] + "', should be one of "
+ Arrays.toString(targetDevice.getSLRs()));
}
int tileXOffset = 0;
int tileYOffset = targetSLR * (targetDevice.getMasterSLR().getNumOfClockRegionRows()
* targetPart.getSeries().getCLEHeight());

Design d = Design.readCheckpoint(args[0]);
boolean result = d.retargetPart(targetPart, tileXOffset, tileYOffset);
if (!result) {
System.err.println("WARNING: Incomplete relocation of design.");
}
d.writeCheckpoint(args[1]);
}
}
37 changes: 25 additions & 12 deletions src/com/xilinx/rapidwright/rwroute/Connection.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
*
* Copyright (c) 2021 Ghent University.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc.
* Copyright (c) 2022-2024, Advanced Micro Devices, Inc.
* All rights reserved.
*
* Author: Yun Zhou, Ghent University.
Expand Down Expand Up @@ -34,6 +34,7 @@
import com.xilinx.rapidwright.device.Node;
import com.xilinx.rapidwright.timing.TimingEdge;
import com.xilinx.rapidwright.timing.delayestimator.DelayEstimatorBase;
import com.xilinx.rapidwright.util.Pair;

/**
* A Connection instance represents a pair of source-sink {@link SitePinInst} instances of a {@link Net} instance.
Expand All @@ -49,7 +50,6 @@ public class Connection implements Comparable<Connection>{
* They are created based on the INT tile nodes the source and sink SitePinInsts connect to, respectively.
*/
private RouteNode sourceRnode;
private RouteNode altSourceRnode;
private RouteNode sinkRnode;
private List<RouteNode> altSinkRnodes;
/**
Expand Down Expand Up @@ -273,7 +273,6 @@ public float getCriticality() {

public void resetRoute() {
getRnodes().clear();
sink.setRouted(false);
}

public RouteNode getSourceRnode() {
Expand All @@ -284,14 +283,6 @@ public void setSourceRnode(RouteNode sourceNode) {
sourceRnode = sourceNode;
}

public RouteNode getAltSourceRnode() {
return altSourceRnode;
}

public void setAltSourceRnode(RouteNode altSourceNode) {
altSourceRnode = altSourceNode;
}

public RouteNode getSinkRnode() {
return sinkRnode;
}
Expand Down Expand Up @@ -361,6 +352,7 @@ public SitePinInst getSource() {
}

public void setSource(SitePinInst source) {
assert(source != null);
this.source = source;
}

Expand Down Expand Up @@ -413,7 +405,7 @@ public boolean isCrossSLR() {
}

public List<Node> getNodes() {
return nodes;
return nodes == null ? Collections.emptyList() : nodes;
}

public void setNodes(List<Node> nodes) {
Expand Down Expand Up @@ -498,4 +490,25 @@ public void setAllTargets(RWRoute.ConnectionState state) {
}
}
}

protected Pair<SitePinInst,RouteNode> getOrCreateAlternateSource(RouteNodeGraph routingGraph) {
SitePinInst altSource = netWrapper.getOrCreateAlternateSource(routingGraph);
if (altSource == null) {
return null;
}

Net net = netWrapper.getNet();
RouteNode altSourceRnode;
if (source.equals(net.getSource())) {
altSourceRnode = netWrapper.getAltSourceRnode();
} else {
assert(source.equals(net.getAlternateSource()));
altSource = net.getSource();
assert(altSource != null);
altSourceRnode = netWrapper.getSourceRnode();
}

assert(altSourceRnode != null);
return new Pair<>(altSource, altSourceRnode);
}
}
54 changes: 53 additions & 1 deletion src/com/xilinx/rapidwright/rwroute/NetWrapper.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
*
* Copyright (c) 2021 Ghent University.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc.
* Copyright (c) 2022-2024, Advanced Micro Devices, Inc.
* All rights reserved.
*
* Author: Yun Zhou, Ghent University.
Expand All @@ -27,7 +27,10 @@
import java.util.ArrayList;
import java.util.List;

import com.xilinx.rapidwright.design.DesignTools;
import com.xilinx.rapidwright.design.Net;
import com.xilinx.rapidwright.design.SitePinInst;
import com.xilinx.rapidwright.device.Node;

/**
* A wrapper class of {@link Net} with additional information for the router.
Expand All @@ -44,11 +47,15 @@ public class NetWrapper{
private float yCenter;
/** The half-perimeter wirelength */
private short doubleHpwl;
boolean noAltSourceFound;
private RouteNode sourceRnode;
private RouteNode altSourceRnode;

public NetWrapper(int id, Net net) {
this.id = id;
this.net = net;
connections = new ArrayList<>();
noAltSourceFound = false;
}

public void computeHPWLAndCenterCoordinates(int[] nextLagunaColumn, int[] prevLagunaColumn) {
Expand Down Expand Up @@ -128,4 +135,49 @@ public int hashCode() {
return id;
}

public RouteNode getSourceRnode() {
return sourceRnode;
}

public void setSourceRnode(RouteNode sourceRnode) {
this.sourceRnode = sourceRnode;
}

public SitePinInst getOrCreateAlternateSource(RouteNodeGraph routingGraph) {
if (noAltSourceFound) {
return null;
}

SitePinInst altSource = net.getAlternateSource();
if (altSource == null) {
altSource = DesignTools.getLegalAlternativeOutputPin(net);
if (altSource == null) {
noAltSourceFound = true;
return null;
}

net.addPin(altSource);
DesignTools.routeAlternativeOutputSitePin(net, altSource);
}
if (altSourceRnode == null) {
Node altSourceNode = RouterHelper.projectOutputPinToINTNode(altSource);
if (altSourceNode == null) {
noAltSourceFound = true;
return null;
}

if (routingGraph.isPreserved(altSourceNode)) {
noAltSourceFound = true;
return null;
}

altSourceRnode = routingGraph.getOrCreate(altSourceNode, RouteNodeType.PINFEED_O);
}
assert(altSourceRnode != null);
return altSource;
}

public RouteNode getAltSourceRnode() {
return altSourceRnode;
}
}
Loading

0 comments on commit abeb1f6

Please sign in to comment.