Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Known failing test for #756 (GlobalSignalRouting) #758

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, Advanced Micro Devices, Inc.
* Copyright (c) 2023-2024, Advanced Micro Devices, Inc.
* All rights reserved.
*
* Author: Eddie Hung, Advanced Micro Devices, Inc.
Expand Down Expand Up @@ -32,6 +32,7 @@
import com.xilinx.rapidwright.support.RapidWrightDCP;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.function.Executable;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;

Expand All @@ -41,27 +42,42 @@
public class TestGlobalSignalRouting {
@ParameterizedTest
@CsvSource({
"CLKBWRCLK",
"RSTRAMB"
"CLKBWRCLK,",
"RSTRAMB,",
"WEBWE[0],WEBL0",
"ADDRENA,ADDRENAL",
"ADDRENB,ADDRENBU"
})
public void testRAMB36(String logicalPinName) {
public void testRAMB36(String logicalPinName, String erroringSitePinName) throws Throwable {
Design design = new Design("design", "xcvu3p");
Cell bufg = design.createAndPlaceCell("test_bufg", Unisim.BUFGCE, "BUFGCE_X0Y0/BUFCE");
Net globalNet = design.createNet("global");
Net globalNet = design.createNet("clk");
globalNet.connect(bufg,"O");

Cell target = design.createAndPlaceCell("test_ram", Unisim.RAMB36E2, "RAMB36_X0Y0/RAMB36E2");
if (logicalPinName.equals("CLKBWRCLK") || logicalPinName.equals("RSTRAMB")) {
if (logicalPinName.equals("CLKBWRCLK") || logicalPinName.equals("RSTRAMB") ||
logicalPinName.equals("ADDRENA") || logicalPinName.equals("ADDRENB")) {
target.addPinMapping(logicalPinName + "L", logicalPinName);
target.addPinMapping(logicalPinName + "U", logicalPinName);
} else if (logicalPinName.equals("WEBWE[0]")) {
target.addPinMapping("WEBWEL0", logicalPinName);
target.addPinMapping("WEBWEU0", logicalPinName);
}
globalNet.connect(target, logicalPinName);

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

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

@Test
Expand Down
Loading