public class Wire extends Object implements WireInterface
Constructor and Description |
---|
Wire(Device dev,
String wire)
Creates an instance of a wire -- on device load, no wire objects exist.
|
Wire(Device dev,
String tileName,
String wireName)
Creates an instance of a wire -- on device load, no wire objects exist.
|
Wire(Tile tile,
int wire)
Creates an instance of a wire.
|
Wire(Tile tile,
String wireName)
Creates an instance of a wire -- on device load, no wire objects exist.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
boolean |
equals(WireInterface w)
Checks equality (based on tile and wire values) between this Wire and another
WireInterface
|
ArrayList<PIP> |
getBackwardPIPs()
Helper method to get corresponding PIPs that drive this wire.
|
ArrayList<PIP> |
getForwardPIPs()
Helper method to get corresponding PIPs driven by this wire
|
IntentCode |
getIntentCode()
Gets the intent code associated with this wire.
|
Node |
getNode()
Creates the corresponding node to which this wire belongs.
|
PIPType |
getPIPType()
If this Wire was created from a PIP, it gets the PIP type from which
it was created.
|
SitePin |
getSitePin()
Gets the associated site pin with this wire and/or node.
|
Wire |
getStartWire()
Will examine the node this wire belongs to and returns the
wire that corresponds to the head or start of the node.
|
Tile |
getTile()
Get the tile of this wire.
|
int |
getWireIndex()
Gets the wire index of the wire in its tile type.
|
int |
hashCode()
Produces a hash code based on the tile and wire of the object.
|
boolean |
isConnected()
Checks if this wire is connected to a site pin or a PIP.
|
boolean |
isEndPIPWire()
Checks if this wire was created from a PIP connection and that it is the end
segment of the PIP.
|
boolean |
isRouteThru()
Checks if this wire was created from a PIP and participates in a routethru.
|
boolean |
isTied()
Checks if this wire is tied to GND or VCC in the tile.
|
boolean |
isTiedToGND()
Checks if this wire is tied to GND in the tile.
|
boolean |
isTiedToVCC()
Checks if this wire is tied to VCC in the tile.
|
boolean |
matches(String tileName,
String wireName)
Checks if the given tile and wire names match this Wire object.
|
void |
setTile(Tile tile)
Updates the tile for this wire
|
void |
setWire(int wire)
Updates the wire index for this wire
|
String |
toString() |
getTileName, getWireName
public Wire(Tile tile, int wire)
tile
- The tile where the wire resides.wire
- The wire index within the tile type of the tile.public Wire(Tile tile, String wireName)
tile
- The tile where the wire resides.wireName
- The wire name within the tile type of the tile.public Wire(Device dev, String tileName, String wireName)
dev
- The device to which the wire belongs.tileName
- The name of the tile.wireName
- The name of the wire within the tile.public Wire(Device dev, String wire)
dev
- The device to which the wire belongs.wire
- The name of the wire ("Tile Name/Wire Name")public Tile getTile()
Vivado Tcl:
get_tiles -of $this
getTile
in interface WireInterface
public int getWireIndex()
Vivado Tcl:
get_property ID_IN_TILE_TYPE $this
getWireIndex
in interface WireInterface
public PIPType getPIPType()
public boolean isEndPIPWire()
public void setTile(Tile tile)
tile
- The new tilepublic void setWire(int wire)
wire
- The new wire indexpublic boolean isRouteThru()
public String toString()
toString
in class Object
public IntentCode getIntentCode()
Vivado Tcl:
get_property INTENT_CODE $this
getIntentCode
in interface WireInterface
public Wire getStartWire()
Vivado Tcl:
lindex [get_wires -of [get_nodes -of $this]] 0
public ArrayList<PIP> getBackwardPIPs()
public ArrayList<PIP> getForwardPIPs()
public boolean matches(String tileName, String wireName)
tileName
- Name of the tile to matchwireName
- Name of the wire to matchpublic int hashCode()
WireInterface
hashCode
in interface WireInterface
hashCode
in class Object
public boolean equals(WireInterface w)
equals
in interface WireInterface
w
- The other WireInterface object to check against for equality.public boolean equals(Object obj)
equals
in class Object
public SitePin getSitePin()
Vivado Tcl:
get_site_pins -of [get_nodes -of [$this]]
getSitePin
in interface WireInterface
public Node getNode()
public boolean isConnected()
public boolean isTiedToVCC()
public boolean isTiedToGND()
public boolean isTied()