Skip to content

Commit 68bf945

Browse files
committed
Add known failing testcase for #756
Signed-off-by: Eddie Hung <eddie.hung@amd.com>
1 parent 425d89e commit 68bf945

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

test/src/com/xilinx/rapidwright/rwroute/TestGlobalSignalRouting.java

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Advanced Micro Devices, Inc.
2+
* Copyright (c) 2023-2024, Advanced Micro Devices, Inc.
33
* All rights reserved.
44
*
55
* Author: Eddie Hung, Advanced Micro Devices, Inc.
@@ -32,6 +32,7 @@
3232
import com.xilinx.rapidwright.support.RapidWrightDCP;
3333
import org.junit.jupiter.api.Assertions;
3434
import org.junit.jupiter.api.Test;
35+
import org.junit.jupiter.api.function.Executable;
3536
import org.junit.jupiter.params.ParameterizedTest;
3637
import org.junit.jupiter.params.provider.CsvSource;
3738

@@ -41,27 +42,42 @@
4142
public class TestGlobalSignalRouting {
4243
@ParameterizedTest
4344
@CsvSource({
44-
"CLKBWRCLK",
45-
"RSTRAMB"
45+
"CLKBWRCLK,",
46+
"RSTRAMB,",
47+
"WEBWE[0],WEBL0",
48+
"ADDRENA,ADDRENAL",
49+
"ADDRENB,ADDRENBU"
4650
})
47-
public void testRAMB36(String logicalPinName) {
51+
public void testRAMB36(String logicalPinName, String erroringSitePinName) throws Throwable {
4852
Design design = new Design("design", "xcvu3p");
4953
Cell bufg = design.createAndPlaceCell("test_bufg", Unisim.BUFGCE, "BUFGCE_X0Y0/BUFCE");
50-
Net globalNet = design.createNet("global");
54+
Net globalNet = design.createNet("clk");
5155
globalNet.connect(bufg,"O");
5256

5357
Cell target = design.createAndPlaceCell("test_ram", Unisim.RAMB36E2, "RAMB36_X0Y0/RAMB36E2");
54-
if (logicalPinName.equals("CLKBWRCLK") || logicalPinName.equals("RSTRAMB")) {
58+
if (logicalPinName.equals("CLKBWRCLK") || logicalPinName.equals("RSTRAMB") ||
59+
logicalPinName.equals("ADDRENA") || logicalPinName.equals("ADDRENB")) {
5560
target.addPinMapping(logicalPinName + "L", logicalPinName);
5661
target.addPinMapping(logicalPinName + "U", logicalPinName);
62+
} else if (logicalPinName.equals("WEBWE[0]")) {
63+
target.addPinMapping("WEBWEL0", logicalPinName);
64+
target.addPinMapping("WEBWEU0", logicalPinName);
5765
}
5866
globalNet.connect(target, logicalPinName);
5967

6068
// FIXME: Currently, Net.connect() only connects the first physical pin to the net
6169
// This is a canary assertion that will light up when this gets fixed.
6270
Assertions.assertEquals(2 /* 3 */, globalNet.getPins().size());
6371

64-
GlobalSignalRouting.symmetricClkRouting(globalNet, design.getDevice(), (n) -> NodeStatus.AVAILABLE);
72+
Executable e = () -> GlobalSignalRouting.symmetricClkRouting(globalNet, design.getDevice(), (n) -> NodeStatus.AVAILABLE);
73+
if (erroringSitePinName == null) {
74+
e.execute();
75+
} else {
76+
// FIXME: Known broken -- see https://github.com/Xilinx/RapidWright/issues/756
77+
RuntimeException ex = Assertions.assertThrows(RuntimeException.class, e, "true");
78+
Assertions.assertEquals("ERROR: No mapped LCB to SitePinInst IN RAMB36_X0Y0." + erroringSitePinName,
79+
ex.getMessage());
80+
}
6581
}
6682

6783
@Test

0 commit comments

Comments
 (0)