-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Chris Lavin <[email protected]>
- Loading branch information
1 parent
ee916bf
commit 4ad8c19
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
test/src/com/xilinx/rapidwright/rwroute/TestRouterHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.xilinx.rapidwright.rwroute; | ||
|
||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import com.xilinx.rapidwright.design.Design; | ||
import com.xilinx.rapidwright.design.SiteInst; | ||
import com.xilinx.rapidwright.design.SitePinInst; | ||
import com.xilinx.rapidwright.device.Node; | ||
|
||
public class TestRouterHelper { | ||
|
||
@Test | ||
public void testProjectOutputPins() { | ||
Design d = new Design("test", "xcvu19p-fsva3824-1-e"); | ||
|
||
String[] testSites = { "SLICE_X0Y1199", "SLICE_X1Y1199" }; | ||
for (String siteName : testSites) { | ||
SiteInst si = d.createSiteInst(siteName); | ||
for (String pinName : si.getSitePinNames()) { | ||
SitePinInst pin = new SitePinInst(pinName, si); | ||
// Only test output pins to project | ||
if (!pin.isOutPin() || pin.getName().equals("COUT")) { | ||
continue; | ||
} | ||
|
||
Node intNode = RouterHelper.projectOutputPinToINTNode(pin); | ||
Assertions.assertNotNull(intNode); | ||
} | ||
} | ||
|
||
SiteInst si = d.createSiteInst(d.getDevice().getSite("BITSLICE_RX_TX_X1Y78")); | ||
SitePinInst p = new SitePinInst("TX_T_OUT", si); | ||
Node intNode = RouterHelper.projectOutputPinToINTNode(p); | ||
Assertions.assertNotNull(intNode); | ||
Assertions.assertEquals(intNode.toString(), "INT_INTF_L_CMT_X182Y90/LOGIC_OUTS_R19"); | ||
} | ||
} |