Skip to content

Commit

Permalink
Merge pull request #408 from Xilinx/2022_1_0
Browse files Browse the repository at this point in the history
Staging Branch for the 2022.1.0 release
  • Loading branch information
clavin-xlnx authored May 6, 2022
2 parents 69d5c76 + ad4e6e4 commit 83ffd05
Show file tree
Hide file tree
Showing 37 changed files with 1,355 additions and 348 deletions.
11 changes: 8 additions & 3 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" output="build/classes/java/test" path="test">
<classpathentry kind="src" output="build/classes/java/test" path="test/src">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="build/classes/java/test" path="test/shared">
<attributes>
<attribute name="test" value="true"/>
</attributes>
Expand All @@ -28,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-2021.2.2.jar">
<classpathentry kind="lib" path="jars/rapidwright-api-lib-2022.1.0.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/RapidWright/jars/rapidwright-api-lib-2021.2.1-javadoc.jar!/"/>
<attribute name="javadoc_location" value="jar:platform:/resource/RapidWright/jars/rapidwright-api-lib-2022.1.0-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: v2021.2.2-beta
RAPIDWRIGHT_VERSION: v2022.1.0-beta

jobs:
build:
Expand Down
30 changes: 30 additions & 0 deletions RELEASE_NOTES.TXT
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
============= RapidWright 2022.1.0-beta released on 2022-05-05 ================
Notes:
* Support for Vivado 2022.1 devices and read of DCPs
* Enables parallel EDIF parsing by default (except when EDIF is readable inside DCP). Depending on
file size and number of available threads, speedup can achieve 2.5-10X faster runtimes.
* Adds facilities to track logical netlist and physical netlist changes to keep a record of
incremental changes in a design.
* Preserves AI Engine and NOC data when writing DCPs from RapidWright
* Disallows turning multiple sitePIPs on on the same RBEL at the same time
* Enables LUT routethru routing on intrasite nets
* Net.addPin() to add output pin as an alternate source if a source on the net already exists
* The anchor object on the Module class has been changed from a SiteInst to a Site
* Allows better recovery of augmented tile cache generation failure
* Includes PRs: #378, #379, #380, #381, #382, #383, #385, #387, #396, #395, #397, #400, #401, #402,
#405, #406, #404, #407
* Fixes Issues: #392
- API Additions:
- com.xilinx.rapidwright.design.Design public "void clearTrackedChanges()"
- com.xilinx.rapidwright.design.Design public "void setTrackingChanges(boolean trackChanges)"
- com.xilinx.rapidwright.design.Design public "boolean isTrackingSiteInstChanges()"
- com.xilinx.rapidwright.design.Design public "void setTrackSiteInstChanges(boolean trackSiteInstChanges)"
- com.xilinx.rapidwright.design.Design public "boolean isTrackingNetChanges()"
- com.xilinx.rapidwright.design.Design public "void setTrackNetChanges(boolean trackNetChanges)"
- com.xilinx.rapidwright.design.Design public "Set<SiteInst> getModifiedSiteInsts()"
- com.xilinx.rapidwright.design.Design public "Set<Net> getModifiedNets()"
- com.xilinx.rapidwright.design.Design public "boolean addModifiedNet(Net net)"
- com.xilinx.rapidwright.design.Design public "boolean addModifiedSiteInst(SiteInst siteInst)"
- com.xilinx.rapidwright.device.Device public "Tile getArbitraryTileOfType(TileTypeEnum type)"


============= RapidWright 2021.2.2-beta released on 2022-03-17 ================
Notes:
* Parallelism enabled by default (#365), can be turned off with:
Expand Down
2 changes: 1 addition & 1 deletion src/com/xilinx/rapidwright/debug/ILAInserter.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public static boolean applyILAToDesign(Design original, Design ila, String clkNa
ModuleInst mi = original.createModuleInst(ila.getName(), m);
original.getNetlist().migrateCellAndSubCells(ila.getTopEDIFCell());
if(m.getAnchor() != null) {
mi.place(m.getAnchor().getSite());
mi.place(m.getAnchor());
}


Expand Down
19 changes: 8 additions & 11 deletions src/com/xilinx/rapidwright/design/DesignTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,7 @@ public static boolean stampPlacement(Design design, Module stamp, Map<String,Sit
String instName = e.getKey();
String prefix = instName + "/";
Site newAnchor = e.getValue();
Site anchor = stamp.getAnchor().getSite();
Site anchor = stamp.getAnchor();

// Create New Nets
for(Net n : stamp.getNets()){
Expand Down Expand Up @@ -1705,13 +1705,7 @@ public static List<SitePinInst> createMissingSitePinInsts(Design design, Net net
if(pin.isSitePort()) {
SitePinInst currPin = siteInst.getSitePinInst(pin.getName());
if(currPin == null) {
boolean isOutput = siteInst.isSitePinOutput(pin.getName());
if(isOutput && net.getSource() != null) {
currPin = new SitePinInst(pin.getName(), siteInst);
net.setAlternateSource(currPin);
}else {
currPin = net.createPin(isOutput, pin.getName(), siteInst);
}
currPin = net.createPin(pin.getName(), siteInst);
newPins.add(currPin);
}
}
Expand Down Expand Up @@ -1831,12 +1825,15 @@ public static String getRoutedSitePinFromPhysicalPin(Cell cell, Net net, String
// Check if there is a dual output scenario
if(toReturn != null) {
SitePinInst source = net.getSource();
String toCreate;
if(source != null && source.getName().equals(sink.getName())) {
net.setAlternateSource(new SitePinInst(true, toReturn, inst));
toCreate = toReturn;
toReturn = sink.getName();
}else {
net.setAlternateSource(new SitePinInst(true, sink.getName(), inst));
}
toCreate = sink.getName();
}
if (inst.getSitePinInst(toCreate) == null)
net.createPin(toCreate, inst);
// We'll return the first one we found, store the 2nd in the alternate
// reference on the net
return toReturn;
Expand Down
38 changes: 31 additions & 7 deletions src/com/xilinx/rapidwright/design/ModuleInst.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

import com.xilinx.rapidwright.design.blocks.PBlock;
import com.xilinx.rapidwright.design.blocks.PBlockRange;
import com.xilinx.rapidwright.design.noc.NOCClient;
import com.xilinx.rapidwright.device.Device;
import com.xilinx.rapidwright.device.PIP;
import com.xilinx.rapidwright.device.Site;
Expand Down Expand Up @@ -59,6 +60,8 @@ public class ModuleInst extends AbstractModuleInst<Module, ModuleInst>{
private ArrayList<SiteInst> instances;
/** A list of all nets internal to this module instance */
private ArrayList<Net> nets;
/** A list of all NOCClients belonging to this instance **/
private ArrayList<NOCClient> nocClients;

/**
* Constructor initializing instance module name
Expand Down Expand Up @@ -192,7 +195,18 @@ public SiteInst getAnchor(){
}

public boolean isPlaced(){
return anchor.isPlaced();
return anchor != null && anchor.isPlaced();
}

public void addNOCClient(NOCClient nc) {
getNOCClients().add(nc);
}

public List<NOCClient> getNOCClients() {
if(nocClients == null) {
nocClients = new ArrayList<NOCClient>();
}
return nocClients;
}

/**
Expand Down Expand Up @@ -236,7 +250,7 @@ public boolean place(Site newAnchorSite){
* @return True if the placement was successful, false otherwise.
*/
public boolean placeOnOriginalAnchor() {
return place(module.getAnchor().getSite(), false);
return place(module.getAnchor(), false);
}

/**
Expand All @@ -258,7 +272,7 @@ public boolean place(Site newAnchorSite, boolean skipIncompatible){

// Do some error checking on the newAnchorSite
if(module.getAnchor() == null) return false;
Site p = module.getAnchor().getSite();
Site p = module.getAnchor();
Tile t = newAnchorSite.getTile();
Site newValidSite = p.getCorrespondingSite(module.getAnchor().getSiteTypeEnum(), t);
if(!newAnchorSite.equals(newValidSite)){
Expand Down Expand Up @@ -360,6 +374,16 @@ public boolean place(Site newAnchorSite, boolean skipIncompatible){
designNet.getPIPs().addAll(net.getPIPs());
}
}
//Update location of NOCClients
for(NOCClient nc : getNOCClients()) {
Site templateSite = dev.getSite(nc.getLocation());
if(templateSite == null)
continue;
Tile newTile = module.getCorrespondingTile(templateSite.getTile(), newAnchorSite.getTile());
Site newSite = templateSite.getCorrespondingSite(templateSite.getSiteTypeEnum(), newTile);
nc.setLocation(newSite != null ? newSite.getName() : null);
}

return true;
}

Expand Down Expand Up @@ -523,10 +547,10 @@ public Site getLowerLeftPlacement(){
*/
public Site getLowerLeftPlacement(SiteTypeEnum type){
// Calculate anchor offset
SiteInst anchor = getModule().getAnchor();
Site anchor = getModule().getAnchor();
if(anchor == null) return null;

Tile origAnchor = anchor.getSite().getTile();
Tile origAnchor = anchor.getTile();
Tile currAnchor = getAnchor().getSite().getTile();
int dx = currAnchor.getTileXCoordinate() - origAnchor.getTileXCoordinate();
int dy = currAnchor.getTileYCoordinate() - origAnchor.getTileYCoordinate();
Expand Down Expand Up @@ -613,9 +637,9 @@ public boolean placeMINearTile(Tile ipTile, SiteTypeEnum type){
Tile newAnchorTile = getModule().getCorrespondingAnchorTile(targetTile, ipTile, dev);
if(newAnchorTile == null) return false;

SiteInst anchor = getModule().getAnchor();
Site anchor = getModule().getAnchor();
if(anchor == null) return false;
Site moduleAnchor = anchor.getSite();
Site moduleAnchor = anchor;
boolean success = place(newAnchorTile.getSites()[moduleAnchor.getTile().getSiteIndex(moduleAnchor)]);

if(!success) System.out.println("Failed placement attempt, TargetTile="+targetTile.getName()+" ipTile="+ipTile.getName());
Expand Down
5 changes: 3 additions & 2 deletions src/com/xilinx/rapidwright/design/Unisim.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Xilinx, Inc.
* Copyright (c) 2022 Xilinx, Inc.
* All rights reserved.
*
* Author: Chris Lavin, Xilinx Research Labs.
Expand All @@ -19,6 +19,7 @@
* limitations under the License.
*
*/

/**
*
*/
Expand All @@ -32,7 +33,7 @@
import com.xilinx.rapidwright.edif.EDIFLibrary;

/**
* Generated on: Thu Nov 04 18:28:41 2021
* Generated on: Mon Apr 25 23:31:34 2022
* by: com.xilinx.rapidwright.release.UnisimParser
*
* Enumerates supported Unisim primitives that map to Xilinx devices.
Expand Down
59 changes: 59 additions & 0 deletions src/com/xilinx/rapidwright/design/noc/ChannelType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Copyright (c) 2022 Xilinx, Inc.
* All rights reserved.
*
* Author Zac Blair, Xilinx Research Labs.
*
* 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.design.noc;

import java.util.HashMap;
import java.util.Map;

/**
* Enumerates the four major channel types that are used in a NOC Connection
*/
public enum ChannelType {
READ("READ"),
READ_REQUEST("READ_REQ"),
WRITE("WRITE"),
WRITE_RESPONSE("WRITE_RESP");

private static Map<String,ChannelType> map;

static {
map = new HashMap<>();
for(ChannelType e : values()) {
map.put(e.toString(), e);
}
}

private final String nc;

ChannelType(String nc){
this.nc = nc;
}

public static ChannelType stringToValue(String s) {
return map.get(s);
}

@Override
public String toString() {
return nc;
}
}
59 changes: 59 additions & 0 deletions src/com/xilinx/rapidwright/design/noc/CommunicationType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Copyright (c) 2022 Xilinx, Inc.
* All rights reserved.
*
* Author Zac Blair, Xilinx Research Labs.
*
* 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.design.noc;

import java.util.HashMap;
import java.util.Map;

/**
* Enumerates AXI traffic communication types.
*/
public enum CommunicationType {
MEMORY_MAPPED_FULL("MM_ReadWrite"),
MEMORY_MAPPED_READ("MM_ReadOnly"),
MEMORY_MAPPED_WRITE("MM_WriteOnly"),
STREAM("STRM");

private static Map<String,CommunicationType> map;

static {
map = new HashMap<>();
for(CommunicationType e : values()) {
map.put(e.toString(), e);
}
}

private final String ct;

CommunicationType(String ct){
this.ct = ct;
}

public static CommunicationType stringToValue(String s) {
return map.get(s);
}

@Override
public String toString() {
return ct;
}
}
Loading

0 comments on commit 83ffd05

Please sign in to comment.