Skip to content

Commit

Permalink
Merge pull request #1048 from Xilinx/2024.1.2
Browse files Browse the repository at this point in the history
2024.1.2
  • Loading branch information
clavin-xlnx authored Sep 4, 2024
2 parents bb99f28 + ecdeaf8 commit 8eec8cc
Show file tree
Hide file tree
Showing 15 changed files with 258 additions and 64 deletions.
4 changes: 2 additions & 2 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
<classpathentry kind="lib" path="jars/kryo-5.2.1.jar"/>
<classpathentry kind="lib" path="jars/minlog-1.3.1.jar"/>
<classpathentry kind="lib" path="jars/jython-standalone-2.7.2.jar"/>
<classpathentry kind="lib" path="jars/rapidwright-api-lib-2024.1.1.jar">
<classpathentry kind="lib" path="jars/rapidwright-api-lib-2024.1.2.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/RapidWright/jars/rapidwright-api-lib-2024.1.1-javadoc.jar!/"/>
<attribute name="javadoc_location" value="jar:platform:/resource/RapidWright/jars/rapidwright-api-lib-2024.1.2-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="jars/jgrapht-core-1.3.0.jar"/>
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:

env:
RAPIDWRIGHT_VERSION: v2024.1.1-beta
RAPIDWRIGHT_VERSION: v2024.1.2-beta

jobs:
build:
Expand Down
27 changes: 27 additions & 0 deletions RELEASE_NOTES.TXT
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
============= RapidWright 2024.1.2-beta released on 2024-09-04 ================
Notes:
- Creating a standalone entry point to relocate DCPs (#1047)
- [Interchange] Reorders tile types and tiles to follow their Vivado index (#1039)
- [DesignTools] Conform to Vivado *RST* pin inversion site routing configuration (#1053)
- Fix for design merging, including designs with encrypted cells (#1035)
- Filters out comments in XDC while parsing clk constraints (#1037)
- Assign an empty list when path finding for direct connections fails (#1052)
- Make LogicalNetlistToEdif not expand macros by default (#1051)
- [Interchange] Fixes to support Versal designs via Interchange (#1040)
- EDIF cleanup preventing singleton cells/libraries from attaching to user designs (#1050)
- [RWRoute] Refactoring/cleanup/preparation for multi-threading (#1046)
- Add Hybrid Updating Strategy (HUS) (#1043)
- [TestSiteInst] Add test for unrouting through FF routethru cells (#1041)
- [TestPIP] Test PIP constructor for reversed wires (#1045)
- [RWRoute] Preserve primary source nodes on connections (#1038)
- Small Interchange/PhysNetlistReader/VivadoTools improvements (#1042)
- [UnisimManager] Use EDIFLibraryBuiltin for primitive/macro libs
- Avoids NPE when site routing BRAMs
- Fix isCarry() for Versal devices
- Resolves PIP constructor issue for reversed PIPs
- [SiteInst] unrouteIntraSiteNet() to handle FF routethru cells

API Additions:
- com.xilinx.rapidwright.design.Design "public Series getSeries()"
- com.xilinx.rapidwright.design.SiteInst "public SitePIP getUsedSitePIP(BEL bel)"

============= RapidWright 2024.1.1-beta released on 2024-07-17 ================
Notes:
- [VivadoTools] Source *_load.tcl from same dir as DCP (#1032)
Expand Down
2 changes: 1 addition & 1 deletion src/com/xilinx/rapidwright/design/DesignTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -2095,7 +2095,7 @@ public static boolean placeCell(Cell c, Design design) {
// Don't move cell if already placed
return true;
}
Map<SiteTypeEnum, Set<String>> compatTypes = c.getCompatiblePlacements();
Map<SiteTypeEnum, Set<String>> compatTypes = c.getCompatiblePlacements(design.getDevice());

for (Entry<SiteTypeEnum, Set<String>> e : compatTypes.entrySet()) {
for (Site s : design.getDevice().getAllSitesOfType(e.getKey())) {
Expand Down
23 changes: 22 additions & 1 deletion src/com/xilinx/rapidwright/edif/EDIFCell.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
*
* Copyright (c) 2017-2022, Xilinx, Inc.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc.
* Copyright (c) 2022-2024, Advanced Micro Devices, Inc.
* All rights reserved.
*
* Author: Chris Lavin, Xilinx Research Labs.
Expand Down Expand Up @@ -78,6 +78,16 @@ public EDIFCell(EDIFLibrary lib, String name) {
if (lib != null) lib.addCell(this);
}

/**
* Shallow Copy constructor - Creates a new EDIFCell object, EDIFCell
* contents point to orig.
*
* @param orig The original cell
*/
public EDIFCell(EDIFCell orig) {
this(null, orig);
}

/**
* Shallow Copy constructor - Creates a new EDIFCell object, EDIFCell
* contents point to orig.
Expand Down Expand Up @@ -477,9 +487,20 @@ public EDIFLibrary getLibrary() {
* @param library the library to set
*/
public void setLibrary(EDIFLibrary library) {
if (library == null) {
throw new RuntimeException("ERROR: library argument cannot be null.");
}
if (this.library != null && this.library != library) {
throw new RuntimeException("ERROR: EDIFCell is already attached to a library. Call EDIFLibrary.removeCell() first.");
}

this.library = library;
}

protected void clearLibrary() {
this.library = null;
}

public boolean hasContents() {
return instances != null || nets != null;
}
Expand Down
56 changes: 45 additions & 11 deletions src/com/xilinx/rapidwright/edif/EDIFLibrary.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
*
* Copyright (c) 2017-2022, Xilinx, Inc.
* Copyright (c) 2022-2023, Advanced Micro Devices, Inc.
* Copyright (c) 2022-2024, Advanced Micro Devices, Inc.
* All rights reserved.
*
* Author: Chris Lavin, Xilinx Research Labs.
Expand Down Expand Up @@ -59,26 +59,45 @@ public EDIFLibrary(String name) {
super(name);
}

/**
* Shallow copy constructor - Creates a new EDIFLibrary object containing
* shallow copies of its contained EDIFCell-s.
*
* @param copy The original library
*/
public EDIFLibrary(EDIFLibrary copy) {
super(copy.getName());

for (Map.Entry<String,EDIFCell> e : copy.getCellMap().entrySet()) {
addCell(e.getValue());
}
}

protected EDIFLibrary() {

}

/**
* Adds the provided cell to the library. All cells
* must be unique by their name.
* Adds the provided cell to the library. All cells must be unique by their name.
* If provided cell is already attached to a library, make a shallow copy.
* @param cell The cell to add to the library.
* @return The cell that has been added.
*/
public EDIFCell addCell(EDIFCell cell) {
if (cells == null) cells = getNewMap();
EDIFCell collision = cells.put(cell.getName(), cell);
if (collision != null && cell != collision) {
return cells.compute(cell.getName(), (k,v) -> {
if (v == null) {
v = (cell.getLibrary() != null) ? new EDIFCell(cell) : cell;
v.setLibrary(this);
return v;
}
if (v == cell) {
return v;
}
throw new RuntimeException("ERROR: Failed to add cell " +
cell.getName() + " to library " + getName()+". The library "
+ "already contains a cell with the same name.");
}
cell.setLibrary(this);
return cell;
cell.getName() + " to library " + getName()+". The library "
+ "already contains a cell with the same name.");
});
}

private String findUniqueCellName(String name) {
Expand Down Expand Up @@ -150,9 +169,20 @@ public EDIFNetlist getNetlist() {
* @param netlist the netlist to set
*/
public void setNetlist(EDIFNetlist netlist) {
if (netlist == null) {
throw new RuntimeException("ERROR: netlist argument cannot be null.");
}
if (this.netlist != null && this.netlist != netlist) {
throw new RuntimeException("ERROR: EDIFLibrary is already attached to a netlist. Call EDIFNetlist.removeLibrary() first.");
}

this.netlist = netlist;
}

protected void clearNetlist() {
this.netlist = null;
}

/**
* Removes the cell from the library. Uses the legal EDIF name as the key.
* @param cell The cell to remove.
Expand All @@ -168,7 +198,11 @@ public EDIFCell removeCell(EDIFCell cell) {
* @return The removed cell, or null if it did not exist in the library.
*/
public EDIFCell removeCell(String name) {
return cells == null ? null : cells.remove(name);
EDIFCell cell = cells == null ? null : cells.remove(name);
if (cell != null) {
cell.clearLibrary();
}
return cell;
}

/**
Expand Down
42 changes: 42 additions & 0 deletions src/com/xilinx/rapidwright/edif/EDIFLibraryBuiltin.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (c) 2024, Advanced Micro Devices, Inc.
* All rights reserved.
*
* Author: Eddie Hung, Advanced Micro Devices, Inc.
*
* This file is part of RapidWright.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package com.xilinx.rapidwright.edif;

/**
* Extension of {@link EDIFLibrary} with setNetlist() and removeCell() methods disabled.
*/
public class EDIFLibraryBuiltin extends EDIFLibrary {
public EDIFLibraryBuiltin(String name) {
super(name);
}

@Override
public void setNetlist(EDIFNetlist netlist) {
throw new UnsupportedOperationException();
}

@Override
public EDIFCell removeCell(EDIFCell cell) {
throw new UnsupportedOperationException();
}
}
Loading

0 comments on commit 8eec8cc

Please sign in to comment.