diff --git a/.classpath b/.classpath
index fbb11329b..0dbf200fc 100644
--- a/.classpath
+++ b/.classpath
@@ -33,9 +33,9 @@
-
+
-
+
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 829d3c4fe..7c17bcf8a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -5,7 +5,7 @@ on:
pull_request:
env:
- RAPIDWRIGHT_VERSION: v2024.2.1-rc4-beta
+ RAPIDWRIGHT_VERSION: v2024.2.1-rc5-beta
jobs:
build:
diff --git a/src/com/xilinx/rapidwright/util/Params.java b/src/com/xilinx/rapidwright/util/Params.java
index 9c02ec1e5..dca3ce655 100644
--- a/src/com/xilinx/rapidwright/util/Params.java
+++ b/src/com/xilinx/rapidwright/util/Params.java
@@ -36,6 +36,8 @@ public class Params {
public static String RW_WRITE_DCP_2024_1_NAME = "RW_WRITE_DCP_2024_1";
+ public static String RW_DISABLE_WRITING_ADV_FLOW_DCPS_NAME = "RW_DISABLE_WRITING_ADV_FLOW_DCPS";
+
/**
* Flag to have RapidWright decompress gzipped EDIF files to disk prior to
* parsing. This is a tradeoff where pre-decompression improves runtime over the
@@ -60,6 +62,14 @@ public class Params {
*/
public static boolean RW_WRITE_DCP_2024_1 = isParamSet(RW_WRITE_DCP_2024_1_NAME);
+ /**
+ * Flag to disable RapidWright from writing any DCPs that target Vivado's
+ * Advanced Flow (starting in Vivado 2024.2). By default, RapidWright writes
+ * DCPs targeting Versal devices with the Advanced Flow compatibility flag set
+ * to true.
+ */
+ public static boolean RW_DISABLE_WRITING_ADV_FLOW_DCPS = isParamSet(RW_DISABLE_WRITING_ADV_FLOW_DCPS_NAME);
+
/**
* Checks if the named RapidWright parameter is set via an environment variable
* or by a JVM parameter of the same name.
diff --git a/src/com/xilinx/rapidwright/util/VivadoTools.java b/src/com/xilinx/rapidwright/util/VivadoTools.java
index 6ffe05bec..50bfa4e9f 100644
--- a/src/com/xilinx/rapidwright/util/VivadoTools.java
+++ b/src/com/xilinx/rapidwright/util/VivadoTools.java
@@ -22,15 +22,16 @@
package com.xilinx.rapidwright.util;
-import com.xilinx.rapidwright.design.Design;
-import com.xilinx.rapidwright.edif.EDIFTools;
-
import java.io.File;
import java.nio.file.FileSystems;
+import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
+import com.xilinx.rapidwright.design.Design;
+import com.xilinx.rapidwright.edif.EDIFTools;
+
/**
* Utility methods to provide access to vivado and parse logs
*
@@ -115,6 +116,11 @@ public static List runTcl(Path outputLog, Path tclScript, boolean verbos
+ tclScript.toString();
Integer exitCode = FileTools.runCommand(vivadoCmd, verbose, environ, runDir);
if (exitCode != 0) {
+ if (Files.exists(outputLog)) {
+ for (String l : FileTools.getLinesFromTextFile(outputLog.toString())) {
+ System.out.println("FAILED OUTPUT> " + l);
+ }
+ }
throw new RuntimeException("Vivado exited with code: " + exitCode);
}
return FileTools.getLinesFromTextFile(outputLog.toString());
diff --git a/test/src/com/xilinx/rapidwright/design/TestDCPWrite.java b/test/src/com/xilinx/rapidwright/design/TestDCPWrite.java
index a4d145375..aba036ff7 100644
--- a/test/src/com/xilinx/rapidwright/design/TestDCPWrite.java
+++ b/test/src/com/xilinx/rapidwright/design/TestDCPWrite.java
@@ -24,6 +24,7 @@
import java.nio.file.Path;
+import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
@@ -53,4 +54,35 @@ public void testNewPhysDBWrite(@TempDir Path dir) {
VivadoToolsHelper.assertFullyRouted(dcp);
}
}
+
+ @Test
+ public void testAdvancedFlowFlags(@TempDir Path tempDir) {
+ Design design = RapidWrightDCP.loadDCP("picoblaze_2022.2.dcp");
+
+ // Should be true since it is targeting Versal
+ Assertions.assertTrue(design.isAdvancedFlow());
+ Path defaultDCPPath = tempDir.resolve("default.dcp");
+ design.writeCheckpoint(defaultDCPPath);
+
+ Design defaultDCP = Design.readCheckpoint(defaultDCPPath);
+ Assertions.assertTrue(defaultDCP.isAdvancedFlow());
+
+ design.setAdvancedFlow(false);
+ Assertions.assertFalse(design.isAdvancedFlow());
+ Path setFalseDCPPath = tempDir.resolve("false.dcp");
+ design.writeCheckpoint(setFalseDCPPath);
+
+ Design falseDCP = Design.readCheckpoint(setFalseDCPPath);
+ // Write DCP should revert flag to default case (true)
+ Assertions.assertTrue(falseDCP.isAdvancedFlow());
+
+ falseDCP.setAdvancedFlow(true);
+
+ Path overrideDCPPath = tempDir.resolve("override.dcp");
+ Params.RW_DISABLE_WRITING_ADV_FLOW_DCPS = true;
+ Assertions.assertTrue(falseDCP.isAdvancedFlow());
+ falseDCP.writeCheckpoint(overrideDCPPath);
+ // Return to default for other tests
+ Params.RW_DISABLE_WRITING_ADV_FLOW_DCPS = false;
+ }
}