From 14f1d03ee2e178b1bb26fe91f6e387a57d325191 Mon Sep 17 00:00:00 2001 From: eddieh-xlnx Date: Thu, 4 Apr 2024 11:20:44 -0700 Subject: [PATCH] Fix PolynomialGenerator and TestDCPSave tests (#982) * [PolynomialGenerator] Release operators member after use Signed-off-by: Eddie Hung * Fix Test.DCPSave.testWriteCheckpointPreWrittenEDIF() Signed-off-by: Eddie Hung --------- Signed-off-by: Eddie Hung --- .../xilinx/rapidwright/examples/PolynomialGenerator.java | 6 ++++++ test/src/com/xilinx/rapidwright/design/TestDCPSave.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/xilinx/rapidwright/examples/PolynomialGenerator.java b/src/com/xilinx/rapidwright/examples/PolynomialGenerator.java index 32d23667b..4ac719bcc 100644 --- a/src/com/xilinx/rapidwright/examples/PolynomialGenerator.java +++ b/src/com/xilinx/rapidwright/examples/PolynomialGenerator.java @@ -216,6 +216,10 @@ public static Map initializeOperators(Design d, int width) { return operators; } + public static void releaseOperators() { + operators = null; + } + public static int sliceyOther; public static boolean setSliceY = false; @@ -384,6 +388,8 @@ public static Design generatePolynomial(String polynomial, String name, int widt buildOperatorTree(p, d, results); + releaseOperators(); + d.addXDCConstraint(ConstraintGroup.LATE, "create_clock -name "+CLK_NAME+" -period 1.291 [get_ports "+CLK_NAME+"]"); d.addXDCConstraint(ConstraintGroup.LATE, "set_property HD.CLK_SRC BUFGCE_X0Y18 [get_ports "+CLK_NAME+"]"); diff --git a/test/src/com/xilinx/rapidwright/design/TestDCPSave.java b/test/src/com/xilinx/rapidwright/design/TestDCPSave.java index 9414b58c7..3700bf9c1 100644 --- a/test/src/com/xilinx/rapidwright/design/TestDCPSave.java +++ b/test/src/com/xilinx/rapidwright/design/TestDCPSave.java @@ -101,6 +101,6 @@ public void testWriteCheckpointPreWrittenEDIF(@TempDir Path tempDir) { Path dcpPath = tempDir.resolve("tmp.dcp"); design.writeCheckpoint(dcpPath, edfPath, null); - VivadoToolsHelper.assertFullyRouted(design); + VivadoToolsHelper.assertFullyRouted(dcpPath); } }