public class SiteInst extends Object implements Serializable, Comparable<SiteInst>
ModuleInst
or part of a Design
. It differs from the
Site
class in that it carries configuration data from the user design whereas
Site
is static and only represents available constructs in the silicon.Modifier and Type | Field and Description |
---|---|
static String |
STATIC_SOURCE
Sentinel named SiteInst that is used to provide a static source (such as a configured LUT)
|
Constructor and Description |
---|
SiteInst()
Creates a new Instance, everything is empty, false or -1
|
SiteInst(String name,
Design design,
SiteTypeEnum type,
Site site)
Creates a new site instance called name of type type and places
it on the site site.
|
SiteInst(String name,
Module module,
SiteTypeEnum type,
Site site)
Creates a new site instance to be a part of a
Module . |
SiteInst(String name,
SiteTypeEnum type)
Creates a new site instance called name of type.
|
Modifier and Type | Method and Description |
---|---|
Cell |
addCell(Cell c)
Adds a cell to the instance.
|
void |
addPin(SitePinInst sitePinInst)
Adds a pin to the pin map of this instance and attaches the net to the
corresponding site wire.
|
void |
addSitePIP(SitePIP sitePIP)
Turns on the provided SitePIP in this site.
|
void |
addSitePIP(String belName,
String inputPin)
Turns on the provided SitePIP in this site.
|
int |
compareTo(SiteInst o) |
Cell |
createCell(EDIFHierCellInst inst,
BEL bel)
Creates a physical cell from the provided logical hierarchical cell instance and places it
on the provided bel in this SiteInst.
|
void |
detachFromModule()
This method will detach and remove all reference of the instance to a module
or module instance.
|
boolean |
equals(Object obj)
Checks if this instance is equal to obj.
|
String |
getAlternateSitePinName(String primarySitePinName)
If this site instance is set to an alternate site type, this
method will get the corresponding alternate site pin name from
the primary site pin name.
|
SiteTypeEnum[] |
getAlternateSiteTypeEnums()
Gets alternate site types (if any) for the current site of this site instance.
|
BEL |
getBEL(String belName)
Gets and returns the named BEL from the site instance.
|
BELPin |
getBELPin(String belName,
String pinName)
Gets a bel pin by name
|
BEL[] |
getBELs()
Gets the BELs of this site
|
Cell |
getCell(BEL bel)
Gets the cell at the BEL location in this site.
|
Cell |
getCell(String belName)
Gets a cell by BEL name
|
Map<String,Cell> |
getCellMap()
Gets the map of all cells in this site instance, keyed by BEL name.
|
Collection<Cell> |
getCells()
Gets all cells in this site instance.
|
Set<Net> |
getConnectedNets()
Gets and returns the nets that connect to this instance.
|
Design |
getDesign()
Gets and returns the design which this instance is a part of.
|
int |
getHighestSitePinInputIndex()
Gets and returns the index of the last site pin in this site type (names are ordered with
inputs first)
|
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).
|
ModuleInst |
getModuleInst()
Gets the module instance this Instance is a member of.
|
String |
getModuleInstName()
Gets the name of the instance of the module this Instance is a member of.
|
Module |
getModuleTemplate()
Gets the module template this instance is a member of
|
SiteInst |
getModuleTemplateInst()
Gets and returns the instance found in the module which this instance implements.
|
String |
getName()
Gets the user name of the instance
|
Net |
getNetFromSiteWire(String siteWireName)
Gets the net assigned to the given site wire.
|
Map<Net,List<String>> |
getNetToSiteWiresMap()
Gets a map of nets in this site instance and the list of site wires they each map to.
|
String |
getPrimarySitePinName(String alternateSitePinName)
For site pins on alternate site type instances, there is a mapping
to the primary site type pin name.
|
SiteTypeEnum |
getPrimarySiteTypeEnum()
Gets the primary site type (default type) for the site of this site instance.
|
SiteInst |
getReferenceCopy()
Creates a reference copy of this SiteInst--a deep copy of the SiteInst
without this new instance being referenced in the design object.
|
Site |
getSite()
Gets the Site for this instance.
|
String |
getSiteName()
Gets the string that defines the instance location (such as 'SLICE_X0Y0')
|
SitePinInst |
getSitePinInst(String pinName)
This method will get and return the instantiation of the
SitePinInst class object
that represents a used pin on this instance given the pin name. |
Map<String,SitePinInst> |
getSitePinInstMap()
Gets the pin map for this instance.
|
Set<String> |
getSitePinInstNames()
Gets all the pin names that are currently being used on this instance.
|
Collection<SitePinInst> |
getSitePinInsts()
Gets and returns the set of pins being used on this instance.
|
String[] |
getSitePinNames()
Gets the array of all site pin names for this site type.
|
SitePIP |
getSitePIP(BELPin inputPin)
Gets the site PIP that connects to the BEL input pin provided
|
SitePIP |
getSitePIP(String belName,
String inputPin)
Gets the site PIP by the specified BEL and input/output pin names
|
SitePIP[] |
getSitePIPs()
This will get the SitePIPs of the site type this SiteInst instantiates.
|
SitePIPStatus |
getSitePIPStatus(int index)
Determines if the indexed site PIP is enabled or not.
|
SitePIPStatus |
getSitePIPStatus(SitePIP sitePIP)
Determines if the referenced site PIP is enabled or not.
|
SiteTypeEnum |
getSiteTypeEnum()
Gets the type of the site instance (such as "SLICEL" or "SLICEM").
|
BELPin[] |
getSiteWirePins(int siteWireIdx)
Gets the site wire's connected BELPins for the current site type of this site instance.
|
BELPin[] |
getSiteWirePins(String siteWireName)
Gets the site wire's connected BELPins for the current site type of this site instance.
|
String[] |
getSiteWires()
Gets the array of site wire names for the type of this site instance.
|
List<String> |
getSiteWiresFromNet(Net net)
Gets all site wire names occupied by the provided net.
|
Map<String,Net> |
getSiteWireToNetMap()
Gets a map that provides the mapping between a site wire name and its net within a site.
|
Tile |
getTile()
Gets the tile object where this instance resides on the chip
|
SitePIP |
getUsedSitePIP(BEL bel)
This method will return the first used SitePIP of
the provided BEL or null if none exists.
|
SitePIP |
getUsedSitePIP(BELPin p)
This method will return the first used SitePIP of
the provided BELPin or null if none exists.
|
SitePIP |
getUsedSitePIP(String belName)
This method will return the first used SitePIP of
the provided BEL name or null if none exists.
|
List<SitePIP> |
getUsedSitePIPs()
Creates a new list that contains all used sitePIPs that are turned on.
|
int |
hashCode()
Generates a hash code for the instance based on instance name.
|
boolean |
hasUsedSitePIPs()
Checks if this site instance has used site PIPs.
|
boolean |
isAnchor()
A method to determine if this instance corresponds to the anchor
instance in a module instance, or is the anchor for a module.
|
boolean |
isMemberOfSameModuleInst(SiteInst inst)
Checks if the instance inst and this instance are members of
the same module instance.
|
Boolean |
isPlaced()
Determines if the instance is placed or unplaced
|
boolean |
isSiteLocked()
Checks if this site is locked to its site
|
boolean |
isSitePinInput(String pinName)
Checks if the provided site pin name is an input.
|
boolean |
isSitePinOutput(String pinName)
Checks if the provided site pin name is an output.
|
void |
place(Site site)
Places the site instance at the site specified.
|
Cell |
removeCell(BEL bel)
Removes the cell from the specified BEL in this site instance
|
boolean |
removePin(SitePinInst sitePinInst)
Removes a pin from this instance.
|
boolean |
routeIntraSiteNet(Net net,
BELPin src,
BELPin snk)
Routes an intra-site net (or the portion of a net that is inside this site).
|
void |
routeSite()
Routes all the nets inside of a site.
|
void |
setDesign(Design design)
Sets the design which this instance is a part of.
|
void |
setModuleInst(ModuleInst instanceModule)
Sets the module instance of this instance (the instance of a
module to which this instance belongs).
|
void |
setModuleTemplate(Module instanceModuleTemplate)
Sets the module class this instance implements.
|
void |
setModuleTemplateInst(SiteInst moduleTemplateInstance)
Sets the corresponding instance inside a module template of this instance.
|
void |
setName(String name)
Sets the user name of the instance
|
void |
setSiteLocked(boolean isSiteLocked)
Sets this state of the site as locked or not
|
String |
toString() |
void |
trackChanges() |
void |
unPlace()
Removes all placement information for the instance.
|
boolean |
unrouteIntraSiteNet(BELPin src,
BELPin snk)
Unroutes an intra-site net (or the portion of a net that is inside this site).
|
void |
unrouteSite()
Unroutes the entire site.
|
public static final String STATIC_SOURCE
public SiteInst()
public SiteInst(String name, SiteTypeEnum type)
name
- name of the new site instance.type
- The instance type of the new site instance.public SiteInst(String name, Design design, SiteTypeEnum type, Site site)
name
- name of the new site instance.type
- The instance type of the new instance.public SiteInst(String name, Module module, SiteTypeEnum type, Site site)
Module
.name
- Name of the site instancemodule
- Module to which this site instance will belongtype
- The site type of the module instancesite
- The site where the site instance would be placedpublic SiteInst getReferenceCopy()
public String getModuleInstName()
public ModuleInst getModuleInst()
public boolean isAnchor()
public void setModuleInst(ModuleInst instanceModule)
instanceModule
- The module instance of this instance.public boolean isMemberOfSameModuleInst(SiteInst inst)
inst
- The instance to check.public Module getModuleTemplate()
public void setModuleTemplate(Module instanceModuleTemplate)
instanceModuleTemplate
- The module which this instance implements.public void setModuleTemplateInst(SiteInst moduleTemplateInstance)
moduleTemplateInstance
- The instance in the module to which this
instance corresponds.public SiteInst getModuleTemplateInst()
public void detachFromModule()
public String getName()
public SiteTypeEnum getSiteTypeEnum()
SiteInst
),
then that type will take precedence. If the site instance type is not
specified in the constructor, the method will get the default type from its
current site.public SiteTypeEnum getPrimarySiteTypeEnum()
Site.getAlternateSiteTypeEnums()
) that can be
applied to this site instance's site. The current site instance may or may not be configured
with the primary site type.
Vivado Tcl:
get_property SITE_TYPE [get_sites $this]
public SiteTypeEnum[] getAlternateSiteTypeEnums()
Vivado Tcl:
get_property ALTERNATE_SITE_TYPES $site
public Boolean isPlaced()
public Tile getTile()
Vivado Tcl:
get_tiles -of $site
public String getSiteName()
public Site getSite()
public BEL getBEL(String belName)
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 BELPin getBELPin(String belName, String pinName)
belName
- Name of the BEL on which the pin residespinName
- The name of the pin on the BELpublic String getPrimarySitePinName(String alternateSitePinName)
alternateSitePinName
- Sute pin name on a compatible alternate site type.public String getAlternateSitePinName(String primarySitePinName)
primarySitePinName
- Name of the primary site pin.public void setDesign(Design design)
design
- the new design of this instance.public Design getDesign()
public void setName(String name)
name
- The desired name for the instancepublic void place(Site site)
site
- The site where the instance will residepublic void unPlace()
public Set<Net> getConnectedNets()
public int getInstanceX()
public int getInstanceY()
public void addPin(SitePinInst sitePinInst)
sitePinInst
- The pin to add.public boolean removePin(SitePinInst sitePinInst)
sitePinInst
- The pin to remove.public SitePinInst getSitePinInst(String pinName)
SitePinInst
class object
that represents a used pin on this instance given the pin name.pinName
- Name of the pin on this instance.public Map<String,SitePinInst> getSitePinInstMap()
public Set<String> getSitePinInstNames()
public Collection<SitePinInst> getSitePinInsts()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
public Cell addCell(Cell c)
c
- The cell to add.public Cell createCell(EDIFHierCellInst inst, BEL bel)
inst
- The logical hierarchical cell instancebel
- The location of where to place the cell within this SiteInstpublic Map<String,Cell> getCellMap()
public Cell getCell(String belName)
belName
- The name of the BEL where the cell is placedpublic Cell getCell(BEL bel)
bel
- The BEL in questionpublic int compareTo(SiteInst o)
compareTo
in interface Comparable<SiteInst>
public boolean isSiteLocked()
public void setSiteLocked(boolean isSiteLocked)
isSiteLocked
- True for a locked site, false for not lockedpublic Map<Net,List<String>> getNetToSiteWiresMap()
public SitePIP[] getSitePIPs()
public SitePIP getUsedSitePIP(BELPin p)
p
- The element pin of interestpublic SitePIP getUsedSitePIP(String belName)
belName
- The name of the element of interestpublic SitePIP getUsedSitePIP(BEL bel)
bel
- The element of interestpublic List<SitePIP> getUsedSitePIPs()
public boolean hasUsedSitePIPs()
public void addSitePIP(SitePIP sitePIP)
Vivado Tcl:
set_property MANUAL_ROUTING [get_property SITE_TYPE $site] $site;set_property SITE_PIPS "[get_property SITE_PIPS $site] $sitePIP" $site;set_property MANUAL_ROUTING {} $site
sitePIP
- The site PIP to active.public void addSitePIP(String belName, String inputPin)
Vivado Tcl:
set_property MANUAL_ROUTING [get_property SITE_TYPE $site] $site;set_property SITE_PIPS "[get_property SITE_PIPS $site] ${belName}:${inputPin}" $site;set_property MANUAL_ROUTING {} $site
belName
- Name of the BELinputPin
- Name of the input BEL pinpublic SitePIP getSitePIP(String belName, String inputPin)
Vivado Tcl:
get_site_pips -of [get_sites $site] -filter NAME==$site/$belName:$inputPin
belName
- Name of the BELinputPin
- Name of the input pinpublic SitePIP getSitePIP(BELPin inputPin)
inputPin
- The BEL input pin that starts the site PIP.public List<String> getSiteWiresFromNet(Net net)
Vivado GUI:
For each Site Wire in Site; Right click on Site Wire->Select->Net; if {$net == [get_selected]}insert (Site Wire) in set
net
- The net to querypublic Net getNetFromSiteWire(String siteWireName)
Vivado GUI:
Right click on Site Wire->Select->Net
siteWireName
- Name of the site wire in the sitepublic Map<String,Net> getSiteWireToNetMap()
Vivado GUI:
For each Site Wire in Site; Right click on Site Wire->Select->Net; insert (Site Wire, Net) in map
public Collection<Cell> getCells()
Cell.isRoutethru()
, but
they are not part of the logical design.public Cell removeCell(BEL bel)
bel
- The BEL where the to be removed cell resides.public SitePIPStatus getSitePIPStatus(SitePIP sitePIP)
Vivado Tcl:
set_property MANUAL_ROUTING [get_property SITE_TYPE $site] $site;lsearch -exact [get_property SITE_PIPS $site] $sitePIP;set_property MANUAL_ROUTING {} $site
sitePIP
- The site PIP to querypublic SitePIPStatus getSitePIPStatus(int index)
Vivado Tcl:
set_property MANUAL_ROUTING [get_property SITE_TYPE $site] $site;set sp [lindex [get_site_pips -of $site] $index; lsearch -exact [get_property SITE_PIPS $site] $sp;set_property MANUAL_ROUTING {} $site
sitePIP
- The site PIP to querypublic void unrouteSite()
public boolean unrouteIntraSiteNet(BELPin src, BELPin snk)
src
- Start/source of the intra-site netsnk
- End/sink of the intra-site netpublic boolean routeIntraSiteNet(Net net, BELPin src, BELPin snk)
Vivado Tcl:
route_design -nets $net
net
- The intra-site net to routesrc
- Start/source of the intra-site netsnk
- End/sink of the intra-site netpublic void routeSite()
Vivado Tcl:
route_design -nets [get_nets -of $site]
public BELPin[] getSiteWirePins(String siteWireName)
siteWireName
- Name of the site wirepublic BELPin[] getSiteWirePins(int siteWireIdx)
siteWireIdx
- Index of the site wire within the site type.public String[] getSiteWires()
public String[] getSitePinNames()
public int getHighestSitePinInputIndex()
public boolean isSitePinInput(String pinName)
pinName
- The name of the site pin in question.public boolean isSitePinOutput(String pinName)
pinName
- The name of the site pin in question.public void trackChanges()