Skip to content

Commit

Permalink
Fix PolynomialGenerator and TestDCPSave tests (#982)
Browse files Browse the repository at this point in the history
* [PolynomialGenerator] Release operators member after use

Signed-off-by: Eddie Hung <[email protected]>

* Fix Test.DCPSave.testWriteCheckpointPreWrittenEDIF()

Signed-off-by: Eddie Hung <[email protected]>

---------

Signed-off-by: Eddie Hung <[email protected]>
  • Loading branch information
eddieh-xlnx authored Apr 4, 2024
1 parent 675ba3a commit 14f1d03
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/com/xilinx/rapidwright/examples/PolynomialGenerator.java
Original file line number Diff line number Diff line change
@@ -216,6 +216,10 @@ public static Map<String,Module> 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+"]");

2 changes: 1 addition & 1 deletion test/src/com/xilinx/rapidwright/design/TestDCPSave.java
Original file line number Diff line number Diff line change
@@ -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);
}
}

0 comments on commit 14f1d03

Please sign in to comment.