Skip to content

Commit

Permalink
ReportRouteStatusResult.isFullyRouted() to check >0 logical net found (
Browse files Browse the repository at this point in the history
…#852)

* Test that invalid input to ReportRouteStatusResult for isFullyRouted()

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

* ReportRouteStatusResult.isFullyRouted() to check at least one logical net found

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

---------

Signed-off-by: Eddie Hung <[email protected]>
  • Loading branch information
eddieh-xlnx authored Oct 16, 2023
1 parent 398b79f commit b353074
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public ReportRouteStatusResult(List<String> log) {
}

public boolean isFullyRouted() {
return unroutedNets == 0 && netsWithRoutingErrors == 0;
return logicalNets > 0 && unroutedNets == 0 && netsWithRoutingErrors == 0;
}

}
11 changes: 11 additions & 0 deletions test/src/com/xilinx/rapidwright/util/TestVivadoTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

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

public class TestVivadoTools {
Expand Down Expand Up @@ -79,6 +80,16 @@ private void assertVivadoLogContains(List<String> log, String query) {
Assertions.assertTrue(0 < result.size());
}

@Test
public void testReportRouteStatusInvalid() {
ReportRouteStatusResult rrs = new ReportRouteStatusResult(Arrays.asList(
"foo",
"bar",
"blah"
));
Assertions.assertFalse(rrs.isFullyRouted());
}

@Test
public void testWriteBitstream(@TempDir Path tempDir) {
Assumptions.assumeTrue(FileTools.isVivadoOnPath());
Expand Down

0 comments on commit b353074

Please sign in to comment.