public class PBlock extends ArrayList<PBlockRange>
Constructor and Description |
---|
PBlock() |
PBlock(Device dev,
Set<Site> sites)
Creates a new pblock object from a set of sites.
|
PBlock(Device dev,
String pblock)
Creates a new pblock object from a Vivado-style PBlock string.
|
Modifier and Type | Method and Description |
---|---|
void |
addSubPBlock(SubPBlock subPBlock) |
boolean |
containRouting() |
boolean |
containsTile(Tile tile)
Checks if this pblock includes the tile provided within its boundaries.
|
PBlock |
createNewPblockAt(Site placement) |
static PBlockRange |
createPBlockRange(Device dev,
Collection<Site> sites)
Creates a pblock range for a specific site type namespace
(all must be SLICE or DSP, no mixing).
|
Set<Site> |
getAllSites(String prefix)
Gets all sites inside the pblock
|
Set<Tile> |
getAllTiles()
Iterates over all Pblock ranges and returns the set of all tiles
covered by the pblock.
|
Tile |
getBottomLeftTile() |
Tile |
getBottomRightTile() |
Device |
getDevice() |
String |
getName() |
PBlock |
getParent() |
List<SubPBlock> |
getSubPBlocks() |
ArrayList<String> |
getTclConstraints() |
Tile |
getTopLeftTile() |
Tile |
getTopRightTile() |
static boolean |
isPBlockCornerSiteType(SiteTypeEnum type)
Returns true if the provided site type is referenced in a pblock corner.
|
static void |
main(String[] args) |
boolean |
movePBlock(int dx,
int dy)
Attempts to move the pblock by an offset of tiles in the x and y directions.
|
void |
setContainRouting(boolean containRouting) |
void |
setName(String name) |
void |
setParent(PBlock parent) |
String |
toString() |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
public PBlock()
public PBlock(Device dev, String pblock)
dev
- The device for which to create the pblock.pblock
- The pblock string (SLICE_X0Y0:SLICE_X1Y1 ...)public PBlock(Device dev, Set<Site> sites)
dev
- The device for which to create the pblocksites
- Set of SLICE sites to be included in the pblock and
create a minimum rectangle size from those provided.public static PBlockRange createPBlockRange(Device dev, Collection<Site> sites)
dev
- The device onto which the pblock range should be createdsites
- The list of homogeneous sites (all must be same type namespace).public ArrayList<String> getTclConstraints()
public String toString()
toString
in class AbstractCollection<PBlockRange>
public Tile getTopLeftTile()
public Tile getBottomLeftTile()
public Tile getBottomRightTile()
public Tile getTopRightTile()
public Set<Tile> getAllTiles()
public Set<Site> getAllSites(String prefix)
prefix
- Starting name of site type desired ("SLICE"). If null, returns all site types.public boolean containsTile(Tile tile)
tile
- The tile in question.public Device getDevice()
public void addSubPBlock(SubPBlock subPBlock)
public List<SubPBlock> getSubPBlocks()
public boolean movePBlock(int dx, int dy)
dx
- The number of tiles to move the pblock in the x direction.dy
- The number of tiles to mvoe the pblock in the y direction.public static void main(String[] args)
public String getName()
public void setName(String name)
name
- the name to setpublic PBlock getParent()
public void setParent(PBlock parent)
parent
- the parent to setpublic boolean containRouting()
public void setContainRouting(boolean containRouting)
public static boolean isPBlockCornerSiteType(SiteTypeEnum type)
type
- The site type in question.