public class Site extends Object implements Serializable, PBlockCorner
Modifier and Type | Field and Description |
---|---|
static HashMap<SiteTypeEnum,SiteTypeEnum[]>[] |
compatibleTypesArray
Keeps track of extra site types on which primitive types can be placed
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
SiteTypeEnum[] |
getAlternateSiteTypeEnums()
Gets the alternate site types compatible with this site.
|
BEL |
getBEL(String name)
Gets and returns the named element type from the site.
|
BELPin |
getBELPin(String name)
Get the BEL pin object from its hierarchical name
(i.e.
|
BELPin |
getBELPin(String belName,
String pinName)
Get the BEL pin object from its hierarchical name
(i.e.
|
BELPin[] |
getBELPins(int siteWireIndex)
For a given site wire index (or ID), gets all connected BEL pins of the site wire.
|
BELPin[] |
getBELPins(String siteWireName)
For a given site wire name, this will return all connected BEL pins of the site wire.
|
BEL[] |
getBELs()
Gets and returns the BELs of this site.
|
ClockRegion |
getClockRegion()
Gets the clock region to which this site belongs.
|
Node |
getConnectedNode(int pinIndex)
Creates and returns the corresponding node that connects to specified
site pin provided.
|
Node |
getConnectedNode(String pinName)
Creates and returns the corresponding node that connects to specified site
pin provided.
|
Site |
getCorrespondingSite(SiteTypeEnum type,
Tile newSiteTile)
A method to get the corresponding primitive site for current in a different tile.
|
Device |
getDevice()
Gets the device this site belongs to.
|
int |
getHighestInputPinIndex()
The largest site pin index that is an input.
|
int |
getInstanceX()
Gets and returns the integer X value of the instance location
(ex: SLICE_X5Y10, it will return 5).
|
int |
getInstanceY()
Gets and returns the integer Y value of the instance location
(ex: SLICE_X5Y10, it will return 10).
|
Tile |
getIntTile()
Gets the approximate INT tile to which this site connects.
|
String |
getName()
Gets and returns the name of this primitive site (ex: SLICE_X4Y6).
|
String |
getNameSpacePrefix()
Gets a new string representation of the site type's namespace.
|
Site |
getNeighborSite(int dx,
int dy)
This will attempt to locate a neighbor site of similar type (pblock-compatible)
with the provided X,Y offset.
|
int |
getPinIndex(String pinName)
Gets the site pin index for the named site pin.
|
String |
getPinName(int pinIndex)
Gets the name of the site pin of the provided pin index.
|
int |
getRpmX()
Gets the RPM X coordinate of this site.
|
int |
getRpmY()
Gets the RPM Y coordinate of this site.
|
int |
getSiteIndexInTile()
Gets the index of this site as stored in its parent tile.
|
int |
getSitePinCount()
Gets the total number of site pins on this site (type).
|
SitePIP |
getSitePIP(BELPin input)
Gets the site PIP connecting the two element (BEL) pins provided.
|
SitePIP |
getSitePIP(int index)
Gets the site PIP at the provided index
|
int |
getSitePIPCount()
Gets the number of site PIPs in this site.
|
SitePIP[] |
getSitePIPs()
Gets the array of site PIPs in this site.
|
SiteTypeEnum |
getSiteTypeEnum()
Gets and returns the native type of primitive of this primitive site.
|
int |
getSiteWireCount()
Returns the total number of site wires in this site.
|
Integer |
getSiteWireIndex(String siteWireName)
Looks up the index by name of the site wire within the site.
|
String |
getSiteWireName(int wireIndex)
Gets the site wire name from a site wire index
|
String[] |
getSiteWireNames()
Gets the array of site wire names for this site.
|
Tile |
getTile()
Gets and returns the Tile where this primitive site resides.
|
int |
getTileWireIndexFromPinName(String pinName)
Get the wire index connected to the pin provided.
|
String |
getTileWireNameFromPinName(String pinName)
Gets and returns the wire name of the given pin name.
|
int |
hashCode() |
boolean |
hasPin(String pinName)
Checks if the site pin exists on this site.
|
boolean |
isCompatibleSiteType(Site otherSite)
This method gets the type of otherSite and calls the other method
public boolean isCompatibleSiteType(SiteTypeEnum otherType);
See that method for more information.
|
boolean |
isCompatibleSiteType(SiteTypeEnum otherType)
This method will check if the SiteTypeEnum otherType can be placed
at this primitive site.
|
boolean |
isGlobalClkBuffer()
Checks if this site is a global clk buffer (IS_GLOBAL_CLOCK_BUFFER).
|
boolean |
isGlobalClkPad()
Checks if this site is a global clk pad (IS_GLOBAL_CLOCK_PAD).
|
boolean |
isInputPin(int pinIndex)
Checks if the provide site pin index is an input
|
boolean |
isInputPin(String pinName)
Determine if the named site pin is an input
|
boolean |
isOutputPin(int pinIndex)
Checks if the provide site pin index is an output
|
boolean |
isOutputPin(String pinName)
Determine if the named site pin is an output
|
boolean |
isRegionalClkBuffer()
Checks if this site is a regional clk buffer (IS_REGIONAL_CLOCK_BUFFER).
|
boolean |
isRegionalClkPad()
Checks if this site is a regional clk pad (IS_REGIONAL_CLOCK_PAD).
|
String |
toString() |
public static HashMap<SiteTypeEnum,SiteTypeEnum[]>[] compatibleTypesArray
public String getName()
getName
in interface PBlockCorner
public String getNameSpacePrefix()
public Device getDevice()
getDevice
in interface PBlockCorner
public Tile getTile()
public String getTileWireNameFromPinName(String pinName)
pinName
- Name of the pin on this site.public int getTileWireIndexFromPinName(String pinName)
pinName
- Name of the pin on the site to get its connecting wire.public Node getConnectedNode(String pinName)
pinName
- Name of the site pin in question.public Node getConnectedNode(int pinIndex)
pinIndex
- Index of the pin in the site type that refers to the
site pin in question.public int getSiteIndexInTile()
public boolean isGlobalClkPad()
public boolean isGlobalClkBuffer()
public boolean isRegionalClkPad()
public boolean isRegionalClkBuffer()
public SiteTypeEnum getSiteTypeEnum()
public SiteTypeEnum[] getAlternateSiteTypeEnums()
Vivado Tcl:
get_property ALTERNATE_SITE_TYPES [get_sites $this]
public BEL getBEL(String name)
Vivado Tcl:
get_bels -of_objects [get_sites $site] -filter NAME==$site/$name
name
- Name of the element type to get.public BEL[] getBELs()
Vivado Tcl:
get_bels -of_objects [get_sites $site]
public int getInstanceX()
getInstanceX
in interface PBlockCorner
public int getInstanceY()
getInstanceY
in interface PBlockCorner
public int getRpmX()
Vivado Tcl:
get_property RPM_X [get_sites $site]
public int getRpmY()
Vivado Tcl:
get_property RPM_Y [get_sites $site]
public boolean hasPin(String pinName)
Vivado Tcl:
[get_site_pins -of [get_sites $site] -filter NAME==$site/$pinName] != ""
pinName
- Name of the site pin to check.public boolean isCompatibleSiteType(SiteTypeEnum otherType)
otherType
- The primitive type to try to place on this site.public Site getNeighborSite(int dx, int dy)
dx
- The X offset of the desired neighbor site.dy
- The Y offset of the desired neighbor site.public boolean isCompatibleSiteType(Site otherSite)
otherSite
- The other site to see if its type is compatible with this site.public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public Tile getIntTile()
public Site getCorrespondingSite(SiteTypeEnum type, Tile newSiteTile)
current
- The current primitive site of the instance.newSiteTile
- The tile of the new proposed site.public Integer getSiteWireIndex(String siteWireName)
Vivado GUI:
Site Properties->Site Wires
siteWireName
- Name of the wire in the site.public int getSiteWireCount()
public String getSiteWireName(int wireIndex)
wireIndex
- The index of the wire in the site (type)public int getSitePinCount()
public int getHighestInputPinIndex()
public boolean isInputPin(int pinIndex)
pinIndex
- Index of the site pin in questionpublic boolean isOutputPin(int pinIndex)
pinIndex
- Index of the site pin in questionpublic SitePIP[] getSitePIPs()
public SitePIP getSitePIP(int index)
index
- The index of the site PIP to retrievepublic int getSitePIPCount()
public String[] getSiteWireNames()
public BELPin[] getBELPins(int siteWireIndex)
Vivado GUI:
Site Wire Properties->BEL Pins
siteWireIndex
- Index of the site wire to query.public BELPin[] getBELPins(String siteWireName)
Vivado GUI:
Site Wire Properties->BEL Pins
siteWireName
- Name of the site wire to query.public boolean isOutputPin(String pinName)
Vivado Tcl:
[get_property DIRECTION [get_site_pins $site/$pinName]]=="OUT"
name
- The site pin namepublic boolean isInputPin(String pinName)
Vivado Tcl:
[get_property DIRECTION [get_site_pins $site/$pinName]]=="IN"
name
- The site pin namepublic int getPinIndex(String pinName)
Vivado Tcl:
get_property INDEX [get_site_pins -of_objects [get_sites $site] -filter NAME==$site/$pinName]
pinName
- Name of the site pin.public String getPinName(int pinIndex)
Vivado Tcl:
set n [get_site_pins -of [get_sites $site] -filter INDEX==$pinIndex];string range $n [string last "/" $n]+1 [string length $n]
pinIndex
- Index of the pin within the site.public SitePIP getSitePIP(BELPin input)
Vivado Tcl:
get_site_pips -of [get_sites $site] -filter {FROM_PIN==$input && TO_PIN==$output}
input
- Input pin of the element.output
- Output pin of the element.public BELPin getBELPin(String name)
Vivado Tcl:
get_bel_pins -of $this -filter NAME==$name
name
- Hierarchical name or site pin namepublic BELPin getBELPin(String belName, String pinName)
Vivado Tcl:
get_bel_pins -of $this -filter NAME==$belName/$pinName
name
- Hierarchical name or site pin namepublic ClockRegion getClockRegion()