Skip to content

Commit

Permalink
Add TestNode.getAll{Uphill,Downhill}PIPsReversed() tests
Browse files Browse the repository at this point in the history
Signed-off-by: Eddie Hung <[email protected]>
  • Loading branch information
eddieh-xlnx committed Jul 5, 2024
1 parent 4d355f7 commit 494f4a9
Showing 1 changed file with 35 additions and 1 deletion.
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 @@ -152,5 +152,39 @@ public void testNodeReachabilityUltraScale(String partName, String tileName, Str
}
System.out.println("visited.size() = " + visited.size());
}

@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());
}
}
}
}

0 comments on commit 494f4a9

Please sign in to comment.