Skip to content

Commit c9f8c66

Browse files
authored
Merge pull request #1012 from Xilinx/2024.1.1
2024.1.1
2 parents e024bff + b3b2f81 commit c9f8c66

File tree

11 files changed

+197
-14
lines changed

11 files changed

+197
-14
lines changed

.classpath

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
<classpathentry kind="lib" path="jars/kryo-5.2.1.jar"/>
3434
<classpathentry kind="lib" path="jars/minlog-1.3.1.jar"/>
3535
<classpathentry kind="lib" path="jars/jython-standalone-2.7.2.jar"/>
36-
<classpathentry kind="lib" path="jars/rapidwright-api-lib-2024.1.0.jar">
36+
<classpathentry kind="lib" path="jars/rapidwright-api-lib-2024.1.1.jar">
3737
<attributes>
38-
<attribute name="javadoc_location" value="jar:platform:/resource/RapidWright/jars/rapidwright-api-lib-2024.1.0-javadoc.jar!/"/>
38+
<attribute name="javadoc_location" value="jar:platform:/resource/RapidWright/jars/rapidwright-api-lib-2024.1.1-javadoc.jar!/"/>
3939
</attributes>
4040
</classpathentry>
4141
<classpathentry kind="lib" path="jars/jgrapht-core-1.3.0.jar"/>

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66

77
env:
8-
RAPIDWRIGHT_VERSION: v2024.1.0-beta
8+
RAPIDWRIGHT_VERSION: v2024.1.1-beta
99

1010
jobs:
1111
build:

.github/workflows/check-git-submodules.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: Submodule refs on origin
22

33
on:
44
pull_request:
5-
branches:
6-
- master
75

86
jobs:
97
check:

RELEASE_NOTES.TXT

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
============= RapidWright 2024.1.1-beta released on 2024-07-17 ================
2+
Notes:
3+
- [VivadoTools] Source *_load.tcl from same dir as DCP (#1032)
4+
- Test that PIP.isReversed() is correct (#1024)
5+
- Add TestSite.testGetIntTile() (#1022)
6+
- [EDIFTools] writeTclLoadScriptForPartialEncryptedDesigns abspath (#1029)
7+
- Adding HDIOB types (#1028)
8+
- Test for site routing from raw placed design (#1000)
9+
- [RWRoute] Do not NPE on encrypted netlists (#1025)
10+
- [RWRoute] Do not assume Y = 0 has Laguna tiles, since it could be HBM device (#1026)
11+
- Adds UNKWN state for LSFJobs (#1027)
12+
- Adding legacy support for u280 (#1021)
13+
- Remove flawed loop intended to for encrypted cell removal (#1023)
14+
- [DesignTools.makeBlackBox()] Fixes an issue of removing CARRY blocks fed by routethrus (#1009)
15+
- Fix null netlist pointer on expanded macro children (#1008)
16+
- [Interchange] Device Resources Verifier Fixes (#1014)
17+
- Fix ConcurrentModificationError (#1015)
18+
- [EDIFTools] Adding method to create a flat netlist from a hierarchical one (#1006)
19+
- Adding HBM ComponentTypes (#1007)
20+
- Test for wire/node mismatch reported in #983 (#1005)
21+
- 3.6% memory reduction usage for large placed designs (de-duplication of cell pin strings)
22+
- Add missing pin entry for BUFG_GT when tracking INT tile connections
23+
- Fixes rare DCP write issue with stubbed bi-directional PIPs (more common on DFX designs)
24+
- Fix for reversed flag on PIPs
25+
- Addresses issue with Net.getBufferDelay() by checking for null wire names
26+
- Fixes two site routing issues
27+
28+
29+
API Additions:
30+
- (None)
31+
32+
API Removals:
33+
- (None)
34+
135
============= RapidWright 2024.1.0-beta released on 2024-06-11 ================
236
Notes:
337
- Support for Vivado 2024.1 DCPs and devices

src/com/xilinx/rapidwright/util/VivadoTools.java

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class VivadoTools {
3939

4040
public static final String REPORT_ROUTE_STATUS = "report_route_status";
4141
public static final String PLACE_DESIGN = "place_design";
42+
public static final String ROUTE_DESIGN = "route_design";
4243
public static final String WRITE_CHECKPOINT = "write_checkpoint";
4344
public static final String WRITE_EDIF = "write_edif";
4445

@@ -337,11 +338,49 @@ public static Design placeDesign(Path dcp, Path workdir, boolean encrypted) {
337338
}
338339

339340
/**
340-
* Run Vivado's `get_timing_paths -setup` command on the provided DCP path
341-
* (to find its worst setup timing path) and return its SLACK property as a float.
342-
*
343-
* @param dcp Path to DCP to report on.
341+
* Run Vivado's `route_design` command on the design provided and get the
342+
* `report_route_status` results. Note: this method does not preserve the routed
343+
* output from Vivado.
344+
*
345+
* @param design The design to route and report on.
344346
* @param workdir Directory to work within.
347+
* @return The results of `report_route_status`.
348+
*/
349+
public static ReportRouteStatusResult routeDesignAndGetStatus(Design design, Path workdir) {
350+
boolean encrypted = !design.getNetlist().getEncryptedCells().isEmpty();
351+
Path dcp = workdir.resolve("routeDesignAndGetStatus.dcp");
352+
design.writeCheckpoint(dcp);
353+
return routeDesignAndGetStatus(dcp, workdir, encrypted);
354+
}
355+
356+
/**
357+
* Run Vivado's `route_design` command on the provided DCP path and return the
358+
* `report_route_status` results. Note: this method does not preserve the routed
359+
* output from Vivado.
360+
*
361+
* @param dcp Path to DCP to route and report on.
362+
* @param workdir Directory to work within.
363+
* @param encrypted Indicates whether DCP contains encrypted EDIF cells.
364+
* @return The results of `report_route_status`.
365+
*/
366+
public static ReportRouteStatusResult routeDesignAndGetStatus(Path dcp, Path workdir, boolean encrypted) {
367+
final Path outputLog = workdir.resolve("outputLog.log");
368+
369+
StringBuilder sb = new StringBuilder();
370+
sb.append(createTclDCPLoadCommand(dcp, encrypted));
371+
sb.append(ROUTE_DESIGN + "; ");
372+
sb.append(REPORT_ROUTE_STATUS + "; ");
373+
374+
List<String> log = VivadoTools.runTcl(outputLog, sb.toString(), true);
375+
return new ReportRouteStatusResult(log);
376+
}
377+
378+
/**
379+
* Run Vivado's `get_timing_paths -setup` command on the provided DCP path (to
380+
* find its worst setup timing path) and return its SLACK property as a float.
381+
*
382+
* @param dcp Path to DCP to report on.
383+
* @param workdir Directory to work within.
345384
* @param encrypted Indicates whether DCP contains encrypted EDIF cells.
346385
* @return Worst slack of design as float.
347386
*/

test/shared/com/xilinx/rapidwright/util/VivadoToolsHelper.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222

2323
package com.xilinx.rapidwright.util;
2424

25-
import com.xilinx.rapidwright.design.Design;
25+
import java.nio.file.Path;
26+
2627
import org.junit.jupiter.api.Assertions;
2728

28-
import java.nio.file.Path;
29+
import com.xilinx.rapidwright.design.Design;
2930

3031
public class VivadoToolsHelper {
3132
public static void assertFullyRouted(Design design) {
@@ -45,4 +46,18 @@ public static void assertFullyRouted(Path dcp) {
4546
ReportRouteStatusResult rrs = VivadoTools.reportRouteStatus(dcp);
4647
Assertions.assertTrue(rrs.isFullyRouted());
4748
}
49+
50+
/**
51+
* Ensures that the provided design can be routed successfully in Vivado.
52+
*
53+
* @param design The design to route.
54+
* @param dir The directory to work within.
55+
*/
56+
public static void assertRoutedSuccessfullyByVivado(Design design, Path dir) {
57+
if (!FileTools.isVivadoOnPath()) {
58+
return;
59+
}
60+
ReportRouteStatusResult rrs = VivadoTools.routeDesignAndGetStatus(design, dir);
61+
Assertions.assertTrue(rrs.isFullyRouted());
62+
}
4863
}

test/src/com/xilinx/rapidwright/design/TestSiteInst.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@
2929
import com.xilinx.rapidwright.device.Device;
3030
import com.xilinx.rapidwright.device.Series;
3131
import com.xilinx.rapidwright.support.RapidWrightDCP;
32+
import com.xilinx.rapidwright.util.VivadoToolsHelper;
3233
import org.junit.jupiter.api.Assertions;
3334
import org.junit.jupiter.api.Test;
35+
import org.junit.jupiter.api.io.TempDir;
3436
import org.junit.jupiter.params.ParameterizedTest;
3537
import org.junit.jupiter.params.provider.ValueSource;
3638

39+
import java.nio.file.Path;
3740
import java.util.Arrays;
3841

3942
public class TestSiteInst {
@@ -365,4 +368,11 @@ public void testUnrouteSiteUpdatesNetSiteInsts() {
365368

366369
Assertions.assertTrue(net.getSiteInsts().isEmpty());
367370
}
371+
372+
@Test
373+
public void testSiteRouting(@TempDir Path dir) {
374+
Design design = RapidWrightDCP.loadDCP("gnl_2_4_3_1.3_gnl_3000_07_3_80_80_placed.dcp");
375+
design.routeSites();
376+
VivadoToolsHelper.assertRoutedSuccessfullyByVivado(design, dir);
377+
}
368378
}

test/src/com/xilinx/rapidwright/device/TestNode.java

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc.
2+
* Copyright (c) 2022-2024, Advanced Micro Devices, Inc.
33
* All rights reserved.
44
*
55
* Author: Eddie Hung, Advanced Micro Devices, Inc.
@@ -169,5 +169,39 @@ public void testWireNodeMismatch(String deviceName, String nodeName) {
169169
Assertions.assertEquals(node, wire.getNode());
170170
}
171171
}
172+
173+
@ParameterizedTest
174+
@CsvSource({
175+
"xcvu3p,INT_X0Y0/BYPASS_W14,INT_X0Y0/INT.INT_NODE_IMUX_50_INT_OUT0<<->>BYPASS_W14",
176+
"xcvu3p,INT_X0Y0/INT_NODE_IMUX_50_INT_OUT0,",
177+
})
178+
public void testGetAllDownhillPIPsReversed(String deviceName, String startNodeName, String reversedPIPString) {
179+
Device d = Device.getDevice(deviceName);
180+
Node startNode = d.getNode(startNodeName);
181+
for (PIP pip : startNode.getAllDownhillPIPs()) {
182+
if (pip.toString().equals(reversedPIPString)) {
183+
Assertions.assertTrue(pip.isReversed());
184+
} else {
185+
Assertions.assertFalse(pip.isReversed());
186+
}
187+
}
188+
}
189+
190+
@ParameterizedTest
191+
@CsvSource({
192+
"xcvu3p,INT_X0Y0/INT_NODE_IMUX_50_INT_OUT0,INT_X0Y0/INT.INT_NODE_IMUX_50_INT_OUT0<<->>BYPASS_W14",
193+
"xcvu3p,INT_X0Y0/BYPASS_W14,",
194+
})
195+
public void testGetAllUphillPIPsReversed(String deviceName, String endNodeName, String reversedPIPString) {
196+
Device d = Device.getDevice(deviceName);
197+
Node endNode = d.getNode(endNodeName);
198+
for (PIP pip : endNode.getAllUphillPIPs()) {
199+
if (pip.toString().equals(reversedPIPString)) {
200+
Assertions.assertTrue(pip.isReversed());
201+
} else {
202+
Assertions.assertFalse(pip.isReversed());
203+
}
204+
}
205+
}
172206
}
173207

test/src/com/xilinx/rapidwright/device/TestPIP.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (c) 2022, Xilinx, Inc.
3-
* Copyright (c) 2022, Advanced Micro Devices, Inc.
3+
* Copyright (c) 2022, 2024, Advanced Micro Devices, Inc.
44
* All rights reserved.
55
*
66
* Author: Chris Lavin, Xilinx Research Labs.
@@ -25,6 +25,7 @@
2525

2626
import org.junit.jupiter.api.Assertions;
2727
import org.junit.jupiter.params.ParameterizedTest;
28+
import org.junit.jupiter.params.provider.CsvSource;
2829
import org.junit.jupiter.params.provider.ValueSource;
2930

3031
public class TestPIP {
@@ -47,4 +48,17 @@ public void testGetArbitraryPIP(String deviceName) {
4748
}
4849
}
4950
}
51+
52+
@ParameterizedTest
53+
@CsvSource({
54+
"xcvu3p,INT_X0Y0/BYPASS_W14,INT_X0Y0/INT_NODE_IMUX_50_INT_OUT0,true",
55+
"xcvu3p,INT_X9Y9/INT_NODE_IMUX_50_INT_OUT0,INT_X9Y9/BYPASS_W14,false"
56+
})
57+
public void testGetArbitraryPIPReversed(String deviceName, String startNodeName, String endNodeName, boolean isReversed) {
58+
Device d = Device.getDevice(deviceName);
59+
Node startNode = d.getNode(startNodeName);
60+
Node endNode = d.getNode(endNodeName);
61+
PIP pip = PIP.getArbitraryPIP(startNode, endNode);
62+
Assertions.assertEquals(isReversed, pip.isReversed());
63+
}
5064
}

0 commit comments

Comments
 (0)