Skip to content

Commit

Permalink
Merge pull request #1012 from Xilinx/2024.1.1
Browse files Browse the repository at this point in the history
2024.1.1
  • Loading branch information
clavin-xlnx authored Jul 17, 2024
2 parents e024bff + b3b2f81 commit c9f8c66
Show file tree
Hide file tree
Showing 11 changed files with 197 additions and 14 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.0.jar">
<classpathentry kind="lib" path="jars/rapidwright-api-lib-2024.1.1.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/RapidWright/jars/rapidwright-api-lib-2024.1.0-javadoc.jar!/"/>
<attribute name="javadoc_location" value="jar:platform:/resource/RapidWright/jars/rapidwright-api-lib-2024.1.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: v2024.1.0-beta
RAPIDWRIGHT_VERSION: v2024.1.1-beta

jobs:
build:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/check-git-submodules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Submodule refs on origin

on:
pull_request:
branches:
- master

jobs:
check:
Expand Down
34 changes: 34 additions & 0 deletions RELEASE_NOTES.TXT
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
============= RapidWright 2024.1.1-beta released on 2024-07-17 ================
Notes:
- [VivadoTools] Source *_load.tcl from same dir as DCP (#1032)
- Test that PIP.isReversed() is correct (#1024)
- Add TestSite.testGetIntTile() (#1022)
- [EDIFTools] writeTclLoadScriptForPartialEncryptedDesigns abspath (#1029)
- Adding HDIOB types (#1028)
- Test for site routing from raw placed design (#1000)
- [RWRoute] Do not NPE on encrypted netlists (#1025)
- [RWRoute] Do not assume Y = 0 has Laguna tiles, since it could be HBM device (#1026)
- Adds UNKWN state for LSFJobs (#1027)
- Adding legacy support for u280 (#1021)
- Remove flawed loop intended to for encrypted cell removal (#1023)
- [DesignTools.makeBlackBox()] Fixes an issue of removing CARRY blocks fed by routethrus (#1009)
- Fix null netlist pointer on expanded macro children (#1008)
- [Interchange] Device Resources Verifier Fixes (#1014)
- Fix ConcurrentModificationError (#1015)
- [EDIFTools] Adding method to create a flat netlist from a hierarchical one (#1006)
- Adding HBM ComponentTypes (#1007)
- Test for wire/node mismatch reported in #983 (#1005)
- 3.6% memory reduction usage for large placed designs (de-duplication of cell pin strings)
- Add missing pin entry for BUFG_GT when tracking INT tile connections
- Fixes rare DCP write issue with stubbed bi-directional PIPs (more common on DFX designs)
- Fix for reversed flag on PIPs
- Addresses issue with Net.getBufferDelay() by checking for null wire names
- Fixes two site routing issues


API Additions:
- (None)

API Removals:
- (None)

============= RapidWright 2024.1.0-beta released on 2024-06-11 ================
Notes:
- Support for Vivado 2024.1 DCPs and devices
Expand Down
47 changes: 43 additions & 4 deletions src/com/xilinx/rapidwright/util/VivadoTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class VivadoTools {

public static final String REPORT_ROUTE_STATUS = "report_route_status";
public static final String PLACE_DESIGN = "place_design";
public static final String ROUTE_DESIGN = "route_design";
public static final String WRITE_CHECKPOINT = "write_checkpoint";
public static final String WRITE_EDIF = "write_edif";

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

/**
* Run Vivado's `get_timing_paths -setup` command on the provided DCP path
* (to find its worst setup timing path) and return its SLACK property as a float.
*
* @param dcp Path to DCP to report on.
* Run Vivado's `route_design` command on the design provided and get the
* `report_route_status` results. Note: this method does not preserve the routed
* output from Vivado.
*
* @param design The design to route and report on.
* @param workdir Directory to work within.
* @return The results of `report_route_status`.
*/
public static ReportRouteStatusResult routeDesignAndGetStatus(Design design, Path workdir) {
boolean encrypted = !design.getNetlist().getEncryptedCells().isEmpty();
Path dcp = workdir.resolve("routeDesignAndGetStatus.dcp");
design.writeCheckpoint(dcp);
return routeDesignAndGetStatus(dcp, workdir, encrypted);
}

/**
* Run Vivado's `route_design` command on the provided DCP path and return the
* `report_route_status` results. Note: this method does not preserve the routed
* output from Vivado.
*
* @param dcp Path to DCP to route and report on.
* @param workdir Directory to work within.
* @param encrypted Indicates whether DCP contains encrypted EDIF cells.
* @return The results of `report_route_status`.
*/
public static ReportRouteStatusResult routeDesignAndGetStatus(Path dcp, Path workdir, boolean encrypted) {
final Path outputLog = workdir.resolve("outputLog.log");

StringBuilder sb = new StringBuilder();
sb.append(createTclDCPLoadCommand(dcp, encrypted));
sb.append(ROUTE_DESIGN + "; ");
sb.append(REPORT_ROUTE_STATUS + "; ");

List<String> log = VivadoTools.runTcl(outputLog, sb.toString(), true);
return new ReportRouteStatusResult(log);
}

/**
* Run Vivado's `get_timing_paths -setup` command on the provided DCP path (to
* find its worst setup timing path) and return its SLACK property as a float.
*
* @param dcp Path to DCP to report on.
* @param workdir Directory to work within.
* @param encrypted Indicates whether DCP contains encrypted EDIF cells.
* @return Worst slack of design as float.
*/
Expand Down
2 changes: 1 addition & 1 deletion test/RapidWrightDCP
19 changes: 17 additions & 2 deletions test/shared/com/xilinx/rapidwright/util/VivadoToolsHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@

package com.xilinx.rapidwright.util;

import com.xilinx.rapidwright.design.Design;
import java.nio.file.Path;

import org.junit.jupiter.api.Assertions;

import java.nio.file.Path;
import com.xilinx.rapidwright.design.Design;

public class VivadoToolsHelper {
public static void assertFullyRouted(Design design) {
Expand All @@ -45,4 +46,18 @@ public static void assertFullyRouted(Path dcp) {
ReportRouteStatusResult rrs = VivadoTools.reportRouteStatus(dcp);
Assertions.assertTrue(rrs.isFullyRouted());
}

/**
* Ensures that the provided design can be routed successfully in Vivado.
*
* @param design The design to route.
* @param dir The directory to work within.
*/
public static void assertRoutedSuccessfullyByVivado(Design design, Path dir) {
if (!FileTools.isVivadoOnPath()) {
return;
}
ReportRouteStatusResult rrs = VivadoTools.routeDesignAndGetStatus(design, dir);
Assertions.assertTrue(rrs.isFullyRouted());
}
}
10 changes: 10 additions & 0 deletions test/src/com/xilinx/rapidwright/design/TestSiteInst.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@
import com.xilinx.rapidwright.device.Device;
import com.xilinx.rapidwright.device.Series;
import com.xilinx.rapidwright.support.RapidWrightDCP;
import com.xilinx.rapidwright.util.VivadoToolsHelper;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

import java.nio.file.Path;
import java.util.Arrays;

public class TestSiteInst {
Expand Down Expand Up @@ -365,4 +368,11 @@ public void testUnrouteSiteUpdatesNetSiteInsts() {

Assertions.assertTrue(net.getSiteInsts().isEmpty());
}

@Test
public void testSiteRouting(@TempDir Path dir) {
Design design = RapidWrightDCP.loadDCP("gnl_2_4_3_1.3_gnl_3000_07_3_80_80_placed.dcp");
design.routeSites();
VivadoToolsHelper.assertRoutedSuccessfullyByVivado(design, dir);
}
}
36 changes: 35 additions & 1 deletion test/src/com/xilinx/rapidwright/device/TestNode.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc.
* Copyright (c) 2022-2024, Advanced Micro Devices, Inc.
* All rights reserved.
*
* Author: Eddie Hung, Advanced Micro Devices, Inc.
Expand Down Expand Up @@ -169,5 +169,39 @@ public void testWireNodeMismatch(String deviceName, String nodeName) {
Assertions.assertEquals(node, wire.getNode());
}
}

@ParameterizedTest
@CsvSource({
"xcvu3p,INT_X0Y0/BYPASS_W14,INT_X0Y0/INT.INT_NODE_IMUX_50_INT_OUT0<<->>BYPASS_W14",
"xcvu3p,INT_X0Y0/INT_NODE_IMUX_50_INT_OUT0,",
})
public void testGetAllDownhillPIPsReversed(String deviceName, String startNodeName, String reversedPIPString) {
Device d = Device.getDevice(deviceName);
Node startNode = d.getNode(startNodeName);
for (PIP pip : startNode.getAllDownhillPIPs()) {
if (pip.toString().equals(reversedPIPString)) {
Assertions.assertTrue(pip.isReversed());
} else {
Assertions.assertFalse(pip.isReversed());
}
}
}

@ParameterizedTest
@CsvSource({
"xcvu3p,INT_X0Y0/INT_NODE_IMUX_50_INT_OUT0,INT_X0Y0/INT.INT_NODE_IMUX_50_INT_OUT0<<->>BYPASS_W14",
"xcvu3p,INT_X0Y0/BYPASS_W14,",
})
public void testGetAllUphillPIPsReversed(String deviceName, String endNodeName, String reversedPIPString) {
Device d = Device.getDevice(deviceName);
Node endNode = d.getNode(endNodeName);
for (PIP pip : endNode.getAllUphillPIPs()) {
if (pip.toString().equals(reversedPIPString)) {
Assertions.assertTrue(pip.isReversed());
} else {
Assertions.assertFalse(pip.isReversed());
}
}
}
}

16 changes: 15 additions & 1 deletion test/src/com/xilinx/rapidwright/device/TestPIP.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2022, Xilinx, Inc.
* Copyright (c) 2022, Advanced Micro Devices, Inc.
* Copyright (c) 2022, 2024, Advanced Micro Devices, Inc.
* All rights reserved.
*
* Author: Chris Lavin, Xilinx Research Labs.
Expand All @@ -25,6 +25,7 @@

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
import org.junit.jupiter.params.provider.ValueSource;

public class TestPIP {
Expand All @@ -47,4 +48,17 @@ public void testGetArbitraryPIP(String deviceName) {
}
}
}

@ParameterizedTest
@CsvSource({
"xcvu3p,INT_X0Y0/BYPASS_W14,INT_X0Y0/INT_NODE_IMUX_50_INT_OUT0,true",
"xcvu3p,INT_X9Y9/INT_NODE_IMUX_50_INT_OUT0,INT_X9Y9/BYPASS_W14,false"
})
public void testGetArbitraryPIPReversed(String deviceName, String startNodeName, String endNodeName, boolean isReversed) {
Device d = Device.getDevice(deviceName);
Node startNode = d.getNode(startNodeName);
Node endNode = d.getNode(endNodeName);
PIP pip = PIP.getArbitraryPIP(startNode, endNode);
Assertions.assertEquals(isReversed, pip.isReversed());
}
}
39 changes: 39 additions & 0 deletions test/src/com/xilinx/rapidwright/device/TestSite.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2024, Advanced Micro Devices, Inc.
* All rights reserved.
*
* Author: Eddie Hung, Advanced Micro Devices, Inc.
*
* 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;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;

public class TestSite {
@ParameterizedTest
@CsvSource({
"xcvu3p,BUFG_GT_X0Y96,INT_X0Y256"
})
public void testGetIntTile(String deviceName, String siteName, String intTileName) {
Device device = Device.getDevice(deviceName);
Site site = device.getSite(siteName);
Assertions.assertEquals(intTileName, site.getIntTile().getName());
}
}

0 comments on commit c9f8c66

Please sign in to comment.