public class ModuleInst extends AbstractModuleInst<Module,Site,ModuleInst>
Constructor and Description |
---|
ModuleInst(ModuleInst moduleInst)
This will initialize this module instance to the same attributes
as the module instance passed in.
|
ModuleInst(String name,
Design design)
Constructor initializing instance module name
|
Modifier and Type | Method and Description |
---|---|
void |
addInst(SiteInst inst)
Adds the instance inst to the instances list that are members of the
module instance.
|
void |
addNet(Net net)
Adds the net to the net list that are members of the module instance.
|
void |
addNOCClient(NOCClient nc) |
void |
connect(String portName,
int busIndex0,
ModuleInst other,
String otherPortName,
int busIndex1)
Connects two signals by port name between this module instance and another.
|
ArrayList<Site> |
getAllValidPlacements()
Does a brute force search to find all valid locations of where this module
instance can be placed.
|
SiteInst |
getAnchor()
Gets and returns the anchor instance for this module instance.
|
RelocatableTileRectangle |
getBoundingBox() |
Net |
getCorrespondingNet(Port p)
Gets (if it exists), the corresponding net within the module instance of the port.
|
Set<SitePinInst> |
getCorrespondingPins(Port port)
Gets the corresponding port pins (SitePinInst) on this module instance
that corresponds to the module's port.
|
Tile |
getCorrespondingTile(Tile templateTile,
Tile newAnchorTile)
This method will calculate and return the corresponding tile of a module instance.
|
Design |
getDesign() |
Site |
getLowerLeftPlacement()
Get's the current lower left site as used for a placement directive
for an implementation guide.
|
Site |
getLowerLeftPlacement(SiteTypeEnum type)
Get's the current lower left site as used for a placement directive
for an implementation guide.
|
Tile |
getLowerLeftTile(SiteTypeEnum type)
Chooses a lower left reference tile in a module instance for the purpose
of placement.
|
Module |
getModule() |
ArrayList<Net> |
getNets()
Gets the list of physical nets in the module instance.
|
List<NOCClient> |
getNOCClients() |
Site |
getPlacement() |
Port |
getPort(String name)
Gets the corresponding port on the module by name.
|
SitePinInst |
getSingleCorrespondingPin(Port port)
Gets the single corresponding port pin (SitePinInst) on this module instance
that corresponds to the module's port.
|
List<SiteInst> |
getSiteInsts()
Gets the site instance that belong to this module instance.
|
Set<PIP> |
getUsedStaticPIPs(Net staticNet)
Gets the current set of used GND/VCC PIPs by this ModuleInst.
|
boolean |
isPlaced() |
boolean |
overlaps(ModuleInst hm) |
boolean |
place(Site newAnchorSite)
Places the module instance anchor at the newAnchorSite as well as all other
instances and nets within the module instance at their relative offsets of the new site.
|
boolean |
place(Site newAnchorSite,
boolean skipIncompatible)
Places the module instance anchor at the newAnchorSite as well as all other
instances and nets within the module instance at their relative offsets of the new site.
|
boolean |
place(Site newAnchorSite,
boolean skipIncompatible,
boolean allowOverlap)
Places the module instance anchor at the newAnchorSite as well as all other
instances and nets within the module instance at their relative offsets of the new site.
|
boolean |
placeMINearTile(Tile ipTile,
SiteTypeEnum type)
Attempts to place the module instance such that it's lower left tile falls
on the specified IP tile (CLB,DSP,BRAM,...)
|
boolean |
placeOnOriginalAnchor()
Places the module instance on the module's anchor site (original location of the module).
|
void |
removeInst(SiteInst inst) |
void |
setAnchor(SiteInst anchor)
Sets the anchor instance for this module instance.
|
void |
setDesign(Design design) |
void |
setInsts(ArrayList<SiteInst> instances) |
void |
setModule(Module module) |
void |
unplace()
Removes all placement information and unroutes all nets of the module instance.
|
connect, connect, connect, connect, equals, getCellInst, getName, getNewNetName, hashCode, setCellInst, setName, toString
public ModuleInst(String name, Design design)
name
- Name of the module instancepublic ModuleInst(ModuleInst moduleInst)
ModuleInst
.
This performs a shallow copy of the original Module Instance. It will point to the same cell and instances as the
original module.moduleInst
- The module instance to mimic.public void addInst(SiteInst inst)
inst
- The instance to add.public void removeInst(SiteInst inst)
public void addNet(Net net)
net
- The net to add.public void setDesign(Design design)
design
- the design to setpublic Design getDesign()
public Module getModule()
getModule
in class AbstractModuleInst<Module,Site,ModuleInst>
public void setModule(Module module)
module
- the module to set.public List<SiteInst> getSiteInsts()
public void setInsts(ArrayList<SiteInst> instances)
instances
- the instances to setpublic ArrayList<Net> getNets()
public void setAnchor(SiteInst anchor)
anchor
- The new anchor instance for this module instance.public SiteInst getAnchor()
public boolean isPlaced()
public void addNOCClient(NOCClient nc)
public List<NOCClient> getNOCClients()
public ArrayList<Site> getAllValidPlacements()
public boolean place(Site newAnchorSite)
ModuleInst.place(Site, boolean, boolean)
to disallow module overlap.newAnchorSite
- The new site for the anchor of the module instance.public boolean placeOnOriginalAnchor()
ModuleInst.place(Site, boolean, boolean)
to disallow module overlap.public boolean place(Site newAnchorSite, boolean skipIncompatible)
ModuleInst.place(Site, boolean, boolean)
to disallow module overlap.newAnchorSite
- The new site for the anchor of the module instance.skipIncompatible
- Flag telling the placement checks to skip any incompatible site that
does not match the floorplan according to the original module and simply leave it unplaced.
Setting to false will cause placement to fail on first mismatch of floorplan placement
attempt.public boolean place(Site newAnchorSite, boolean skipIncompatible, boolean allowOverlap)
newAnchorSite
- The new site for the anchor of the module instance.skipIncompatible
- Flag telling the placement checks to skip any incompatible site that
does not match the floorplan according to the original module and simply leave it unplaced.
Setting to false will cause placement to fail on first mismatch of floorplan placement
attempt.allowOverlap
- True if the module instance is allowed to overlap with existing placed logic.public void unplace()
unplace
in class AbstractModuleInst<Module,Site,ModuleInst>
public Tile getCorrespondingTile(Tile templateTile, Tile newAnchorTile)
templateTile
- The tile in the module which acts as a template.newAnchorTile
- This is the tile of the new anchor instance of the module instance.public Set<SitePinInst> getCorrespondingPins(Port port)
port
- The port on the prototype module.public SitePinInst getSingleCorrespondingPin(Port port)
port
- The port on the prototype module.public Net getCorrespondingNet(Port p)
p
- The port on the module of interestpublic Port getPort(String name)
name
- public Site getLowerLeftPlacement()
public Site getLowerLeftPlacement(SiteTypeEnum type)
type
- If a desired type is requested for the corner, otherwise it will search
for the most lower left corner sitepublic Tile getLowerLeftTile(SiteTypeEnum type)
type
- The site type space in which to reference.public boolean placeMINearTile(Tile ipTile, SiteTypeEnum type)
ipTile
- The specific tile onto which the lower left tile of the ModuleInst
should be placed.type
- The specific site type in the tile.public void connect(String portName, int busIndex0, ModuleInst other, String otherPortName, int busIndex1)
connect
in class AbstractModuleInst<Module,Site,ModuleInst>
portName
- This module instance's port name to connect.busIndex0
- If the assigned port of this module instance is multi-bit,
specify the index to connect or -1 if single bit bus.other
- The other module instance to connect to. If this is null, it will
connect it to an existing parent cell port named otherPortName. When null, this is presumed
an out of context design where there might not be a source/sink.otherPortName
- The port name on the other module instance to connect to or
the top-level port of the the cell instance.busIndex1
- If the port (of the other module instance or the existing parent cell) is multi-bit,
specify the index to connect or -1 if single bit bus.public RelocatableTileRectangle getBoundingBox()
getBoundingBox
in class AbstractModuleInst<Module,Site,ModuleInst>
public Site getPlacement()
getPlacement
in class AbstractModuleInst<Module,Site,ModuleInst>
public boolean overlaps(ModuleInst hm)
overlaps
in class AbstractModuleInst<Module,Site,ModuleInst>
public Set<PIP> getUsedStaticPIPs(Net staticNet)
staticNet
- A static net of the type to get.