public class Device
extends Object
implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
AWS_F1
The device used in the Amazon F1 Instance
|
static String |
DEVICE_CACHE_FILE_VERSION
Version of the device cache file that contains the uncommon wire connections
|
static String |
DEVICE_FILE_VERSION
This is the current device file version (saved in file to ensure proper compatibility)
|
static String |
FRAMEWORK_NAME
Formal name of this framework
|
static String |
FRAMEWORK_NAME_AND_VERSION
Full formal name to identify this version of RapidWright
|
static String |
KCU105
The device present on the Xilinx KCU105 development board
|
static String |
PYNQ_Z1
The original Digilent PYNQ-Z1 board device
|
static boolean |
QUIET_MESSAGE |
static int |
RAPIDWRIGHT_MINOR_VERSION
A minor revision number indicating small changes between Vivado releases
|
static int |
RAPIDWRIGHT_QUARTER_VERSION
Quarter version matching a Vivado release
|
static String |
RAPIDWRIGHT_VERSION
The current release of the tools (coincides with Vivado)
|
static int |
RAPIDWRIGHT_YEAR_VERSION
Year version matching a Vivado release
|
static String |
RW_QUIET_MESSAGE
Name of the environment variable to quiet messages
|
Modifier and Type | Method and Description |
---|---|
void |
ensureDeviceCacheFileIsGenerated()
This will generate the device cache file that contains uncommonly used nodes.
|
Package |
getActivePackage()
Gets the current active package
|
Site[] |
getAllCompatibleSites(SiteTypeEnum type)
This method will get all compatible sites for a particular
site type in this device.
|
Site[] |
getAllSites()
Gets all the sites in the device in an array ordered by index.
|
Site[] |
getAllSitesOfType(SiteTypeEnum type)
Gets and returns an array of all sites of the given site type.
|
Collection<Tile> |
getAllTiles()
Gets all the tiles in the device
|
Tile |
getArbitraryTileOfType(TileTypeEnum type)
Gets a tile of a particular type (TileTypeEnum)
|
FamilyType |
getArchitecture()
Gets and returns the base architecture for this device.
|
static List<String> |
getAvailableDevices()
Checks for all device files present in the current RapidWright path and returns
a list of strings of those part names available to be used by the tool.
|
BEL |
getBEL(SiteTypeEnum type,
String belName)
Gets the named BEL on the associated site type
|
BEL[] |
getBELs(SiteTypeEnum type)
Gets the array of BELs on the associated site type
|
ClockRegion |
getClockRegion(int row,
int col)
Gets the clock region at the specific row and column index.
|
ClockRegion |
getClockRegion(String name)
Gets the clock region by name, either CLOCKREGION_X2Y2 or X2Y2, both
formats are accommodated.
|
ClockRegion |
getClockRegionFromTile(String tileName)
Gets the clock region to which the specified tile belongs.
|
ClockRegion |
getClockRegionFromTile(Tile tile)
Gets the clock region to which the specified tile belongs.
|
ClockRegion[][] |
getClockRegions()
Get the clock region grid.
|
int |
getColumns()
Gets and returns the number of columns of tiles in this device.
|
static Device |
getDevice(Part part)
Gets the unique instance of a device by part, (devices are unique by
device name), or loads the device from file if it hasn't been loaded.
|
static Device |
getDevice(String partName)
Gets the unique instance of a device by part name, (devices are unique by
device name), or loads the device from file if it hasn't been loaded.
|
static String |
getDeviceVersion(Part part)
Looks at the current device file for the part name specified and retrieves
its current RapidWright device version.
|
FamilyType |
getFamilyType()
Gets the family type of this device.
|
SLR |
getMasterSLR()
Gets the master SLR (first configured SLR) in the device.
|
String |
getName()
Gets and return the deviceName of this device (ex: xcvu9p).
|
Node |
getNode(String name)
Creates and returns the named node
|
int |
getNumOfClockRegionRows()
Gets the number of clock region or fabric sub regions (FSRs) rows in the
device.
|
int |
getNumOfClockRegionsColumns()
Gets the number of clock regions or fabric sub regions (FSRs) columns in the
device.
|
int |
getNumOfSLRs()
Gets the total count of SLRs (Super Logic Regions or separate dies)
in the device.
|
Package |
getPackage(String name)
Gets the package object by the given name.
|
Set<String> |
getPackages()
Gets and returns the name of all compatible packages for this device.
|
PIP |
getPIP(String name)
Creates the corresponding PIP from its full Vivado name (
|
int |
getRows()
Gets and returns the number of rows of tiles in this device.
|
Series |
getSeries()
Gets and returns the series for this device.
|
Site |
getSite(String name)
This gets and returns a site on the device by name.
|
Site |
getSiteByIndex(int siteIndex)
Gets the site in this device with the provided index
|
Site |
getSiteFromPackagePin(String pkgPinName)
Gets the site that connects to the named package pin.
|
int |
getSiteIndex(Site site)
Gets the unique index of the site.
|
int |
getSiteIndex(String siteName)
Gets the unique index of the site by looking up the site by name.
|
SitePin |
getSitePin(String name)
Creates the corresponding SitePin from its full Vivado name (
|
int |
getSiteTypeCount()
Gets the total number of unique site types used in the device.
|
SLR |
getSLR(int id)
Gets an SLR by its index.
|
SLR |
getSLRByConfigOrderIndex(int cfgOrderIdx)
Gets the SLR with the specified configuration order index.
|
SLR[] |
getSLRs()
Gets all SLRs in the device.
|
Tile |
getTile(int uniqueTileNumber)
Each tile in a device can be referenced by a unique integer which is a combination
of its row and column index.
|
Tile |
getTile(int row,
int column)
Gets the current tile in the device based on absolute row and column indices
|
Tile |
getTile(String name)
This will get a Tile by its name using a HashMap.
|
Tile |
getTile(String rootName,
int xCoordinate,
int yCoordinate)
This will get a Tile by its root name (as reported by
Tile.getRootName() ()}) and X/Y coordinates (as reported by
Tile.getTileXCoordinate() / Tile.getTileXCoordinate() ) using
a HashMap of Arrays. |
Tile[][] |
getTiles()
Gets and returns this device's 2D array of tiles that define
the layout of the FPGA.
|
Tile[][] |
getTilesByRootName(String rootName)
Get a 2D Array of all Tiles with the specified Root Name
(
Tile.getRootName() ). |
int |
getTileTypeCount()
Gets the total number of unique tile types used in the device.
|
Wire |
getWire(String name)
Creates and returns the named wire
|
boolean |
hasModularSLRs()
Flag indicating that a device has modular SLRs (such as the xcvp1902).
|
static void |
quietReflectiveAccessWarning()
Work-around for pervasive illegal access warnings that cause runtime errors in output.
|
static void |
releaseDeviceReferences()
Clears the singleton map, thus deleting any internal references to the device
objects.
|
Package |
setActivePackage(String name)
Sets the active package for this device.
|
String |
toString() |
public static final String FRAMEWORK_NAME
public static final int RAPIDWRIGHT_YEAR_VERSION
public static final int RAPIDWRIGHT_QUARTER_VERSION
public static final int RAPIDWRIGHT_MINOR_VERSION
public static final String RAPIDWRIGHT_VERSION
public static final String DEVICE_FILE_VERSION
public static final String DEVICE_CACHE_FILE_VERSION
public static final String FRAMEWORK_NAME_AND_VERSION
public static final String AWS_F1
public static final String PYNQ_Z1
public static final String KCU105
public static final String RW_QUIET_MESSAGE
public static boolean QUIET_MESSAGE
public static Device getDevice(Part part)
part
- The part of the device that should be returned/loadedpublic static void releaseDeviceReferences()
public static Device getDevice(String partName)
partName
- The part name of the device that should be returned/loadedpublic Package setActivePackage(String name)
name
- Name of the packagepublic Package getActivePackage()
public Package getPackage(String name)
name
- Name of the package to getpublic Set<String> getPackages()
Vivado Tcl:
set d []; foreach p [get_parts -filter DEVICE==xcvu9p] {lappend d [get_property PACKAGE $p]};lsort -unique $d
public Tile getTile(int row, int column)
Vivado Tcl:
get_tiles -filter "ROW==$row && COLUMN==$column"
row
- The absolute row index (0 starting at top)column
- The absolute column index (0 starting at the left)public Tile getTile(String name)
Vivado Tcl:
get_tiles -filter "NAME==$name"
name
- The name of the tile to get.Device.getTile(String, int, int)
public Tile getTile(int uniqueTileNumber)
Vivado Tcl:
get_tiles -filter "INDEX==$uniqueTileNumber"
uniqueTileNumber
- The unique tile number of the tile to get.public Tile getArbitraryTileOfType(TileTypeEnum type)
Vivado Tcl:
lindex [get_tiles -filter "TILE_TYPE==$type"] 0"
type
- The desired type to getpublic Tile getTile(String rootName, int xCoordinate, int yCoordinate)
Tile.getRootName()
()}) and X/Y coordinates (as reported by
Tile.getTileXCoordinate()
/ Tile.getTileXCoordinate()
) using
a HashMap of Arrays.
The data structure to perform this access efficiently is initialized on first
access. Device.getTile(String)
essentially performs the same function, but
without having to initialize any dedicated data structure first. However,
getting arguments from the format of this function to the one of
Device.getTile(String)
involves String concatenation. For repeated calls,
this function is faster.
Vivado Tcl:
get_tiles -filter "NAME==$prefix_X$xCoordinateY$yCoordinate"
rootName
- The Root Name of the tile to get.xCoordinate
- The X CoordinateyCoordinate
- The Y CoordinateDevice.getTile(String)
public Tile[][] getTilesByRootName(String rootName)
Tile.getRootName()
).rootName
- The root name of the tilepublic Site getSite(String name)
Vivado Tcl:
get_sites $name"
name
- Name of the site to get.public int getRows()
Vivado Tcl:
set c 0; foreach t [get_tiles] {if {[get_property COLUMN $t] > $c} {set c [get_property COLUMN $t]} [expr $c + 1]}
public int getColumns()
Vivado Tcl:
set c 0; foreach t [get_tiles] {if {[get_property ROW $t] > $c} {set c [get_property ROW $t]} [expr $c + 1]}
public Tile[][] getTiles()
Vivado Tcl:
get_tiles
public String getName()
Vivado Tcl:
get_property DEVICE [get_property PART [current_project]]
public String toString()
toString
in class Object
public FamilyType getFamilyType()
Vivado Tcl:
get_property FAMILY [get_property PART [current_project]]
public FamilyType getArchitecture()
Vivado Tcl:
get_property ARCHITECTURE [get_property PART [current_project]]
public Series getSeries()
public Site[] getAllCompatibleSites(SiteTypeEnum type)
type
- The type for which to find compatible sites.public Site[] getAllSitesOfType(SiteTypeEnum type)
Vivado Tcl:
get_sites -filter SITE_TYPE==$type
type
- The site type of the site to get.public Site getSiteFromPackagePin(String pkgPinName)
Vivado Tcl:
get_sites -of_objects [get_package_pins $pkgPinName]
pkgPinName
- Name of the package pin.public BEL getBEL(SiteTypeEnum type, String belName)
type
- Site typebelName
- The BEL to get on the associated site typepublic BEL[] getBELs(SiteTypeEnum type)
type
- Site typepublic int getNumOfClockRegionRows()
Vivado Tcl:
set r 0; foreach cr [get_clock_regions] {if {[get_property ROW_INDEX $cr] > $r} {set r [get_property ROW $cr]} [expr $r + 1]}
public int getNumOfClockRegionsColumns()
Vivado Tcl:
set c 0; foreach cr [get_clock_regions] {if {[get_property COLUMN_INDEX $cr] > $c} {set c [get_property ROW $cr]} [expr $c + 1]}
public ClockRegion getClockRegion(int row, int col)
Vivado Tcl:
get_clock_regions -filter "ROW_INDEX==$row && COLUMN_INDEX==$col"
row
- The row (Y coordinate) of the clock regioncol
- The column (X coordinate) of the clock regionpublic ClockRegion getClockRegion(String name)
Vivado Tcl:
get_clock_regions $name
name
- Name of the clock region to get, either CLOCKREGION_X#Y# or X#Y#public ClockRegion[][] getClockRegions()
Vivado Tcl:
get_clock_regions
public ClockRegion getClockRegionFromTile(String tileName)
tileName
- Name of the tile of interest.public ClockRegion getClockRegionFromTile(Tile tile)
tile
- The tile of interestpublic int getNumOfSLRs()
Vivado Tcl:
llength [get_slrs]
public SLR getSLR(int id)
Vivado Tcl:
get_slrs "SLR${id}"
id
- SLR index or IDpublic SLR[] getSLRs()
Vivado Tcl:
get_slrs
public Node getNode(String name)
name
- The name of the node in the device (public Wire getWire(String name)
name
- The name of the wire in the device (public SLR getMasterSLR()
public SLR getSLRByConfigOrderIndex(int cfgOrderIdx)
cfgOrderIdx
- The configuration order index of the desired SLR.public PIP getPIP(String name)
name
- Full Vivado name of the PIPpublic SitePin getSitePin(String name)
name
- Full Vivado name of the site pinpublic int getSiteTypeCount()
public int getTileTypeCount()
public boolean hasModularSLRs()
public Collection<Tile> getAllTiles()
Vivado Tcl:
get_tiles
public static String getDeviceVersion(Part part)
deviceName
- The part name of the file to check.public static List<String> getAvailableDevices()
Vivado Tcl:
set d []; foreach p [get_parts] {lappend d [get_property DEVICE $p]};lsort -unique $d
public static void quietReflectiveAccessWarning()
FileTools
public void ensureDeviceCacheFileIsGenerated()
public int getSiteIndex(String siteName)
siteName
- Name of the sitepublic int getSiteIndex(Site site)
site
- The site to query.public Site getSiteByIndex(int siteIndex)
siteIndex
- The unique index of the sitepublic Site[] getAllSites()