Skip to content

Commit

Permalink
Test for #558
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Lavin <[email protected]>
  • Loading branch information
clavin-xlnx committed Oct 12, 2022
1 parent ee916bf commit 4ad8c19
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions test/src/com/xilinx/rapidwright/rwroute/TestRouterHelper.java
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");
}
}

0 comments on commit 4ad8c19

Please sign in to comment.