public class EDIFCell extends EDIFPropertyObject
Modifier and Type | Field and Description |
---|---|
static EDIFName |
DEFAULT_VIEW |
static byte[] |
EXPORT_CONST_CELL_BEGIN |
static byte[] |
EXPORT_CONST_CELL_END |
static byte[] |
EXPORT_CONST_CELLTYPE |
static byte[] |
EXPORT_CONST_CONTENTS |
static byte[] |
EXPORT_CONST_CONTENTS_END |
static byte[] |
EXPORT_CONST_INTERFACE_END |
static byte[] |
EXPORT_CONST_PROP_INDENT |
static byte[] |
EXPORT_CONST_VIEW_END |
static byte[] |
EXPORT_CONST_VIEWTYPE |
EXPORT_CONST_OWNER_END, EXPORT_CONST_OWNER_START, EXPORT_CONST_PROP_END, EXPORT_CONST_PROP_START
EXPORT_CONST_RENAME_START
Constructor and Description |
---|
EDIFCell(EDIFCell orig)
Shallow Copy constructor - Creates a new EDIFCell object, EDIFCell
contents point to orig.
|
EDIFCell(EDIFLibrary lib,
EDIFCell orig)
Shallow Copy constructor - Creates a new EDIFCell object, EDIFCell
contents point to orig.
|
EDIFCell(EDIFLibrary lib,
EDIFCell orig,
String newCellName)
Full Deep Copy Constructor with rename
|
EDIFCell(EDIFLibrary lib,
String name) |
Modifier and Type | Method and Description |
---|---|
EDIFCellInst |
addCellInst(EDIFCellInst instance)
Adds the instance to this cell.
|
EDIFCellInst |
addCellInstUniqueName(EDIFCellInst instance)
Ensures that the provided cell instance is added to this cell by renaming it
to something unique.
|
void |
addInternalPortMapEntry(String portInstName,
EDIFNet internalNet)
Populates an internal map between port-based port ref name, 'bus[3]' or 'clk'.
|
EDIFNet |
addNet(EDIFNet net)
Adds a net to the cell.
|
EDIFCellInst |
addNewCellInstUniqueName(String suggestedName,
EDIFCell reference) |
EDIFPort |
addPort(EDIFPort port)
Adds a port to the cell.
|
EDIFCellInst |
createCellInst(String name,
EDIFCell parent) |
EDIFCellInst |
createChildCellInst(String name,
EDIFCell reference) |
EDIFNet |
createNet(String name) |
EDIFPort |
createPort(EDIFPort port) |
EDIFPort |
createPort(String name,
EDIFDirection direction,
int width) |
void |
decrementNonHierInstantiationCount()
Atomically decrement instance count of this cell.
|
boolean |
equals(Object o) |
void |
exportEDIF(OutputStream os,
EDIFWriteLegalNameCache<?> cache) |
void |
exportEDIF(OutputStream os,
EDIFWriteLegalNameCache<?> cache,
boolean stable) |
List<EDIFHierCellInst> |
getAllLeafDescendants()
Recursively finds all leaf cell descendants of this cell
The returned EDIFHierCellInsts are relative to this cell.
|
List<EDIFHierCellInst> |
getAllLeafDescendants(EDIFHierCellInst parentInstance)
Recursively finds all leaf cell descendants of this cell
|
EDIFCellInst |
getCellInst(String name) |
Collection<EDIFCellInst> |
getCellInsts() |
EDIFName |
getEDIFView()
Gets the EDIFName object representation of the view name
|
EDIFNet |
getInternalNet(EDIFPortInst portInst)
Takes an external (or internal) port ref and returns the corresponding
EDIFNet connected inside the cell.
|
EDIFNet |
getInternalNet(String portInstName)
Takes an external (or internal) port name and returns the corresponding
EDIFNet connected inside the cell.
|
Map<String,EDIFNet> |
getInternalNetMap() |
EDIFLibrary |
getLibrary() |
EDIFNet |
getNet(EDIFNet net) |
EDIFNet |
getNet(String name) |
EDIFNetlist |
getNetlist() |
Collection<EDIFNet> |
getNets() |
int |
getNonHierInstantiationCount() |
EDIFPort |
getPort(String name)
Gets a port by bus name (see
EDIFPort.getBusName() ). |
EDIFPort |
getPortByLegalName(String name,
EDIFReadLegalNameCache cache) |
EDIFPort |
getPortByPortInstName(String portInstName)
Given a port instance name (not including the name of the cell instance),
gets the associated port.
|
Map<String,EDIFPort> |
getPortMap() |
Collection<EDIFPort> |
getPorts() |
String |
getView()
Gets the original view name
|
boolean |
hasCompatibleInterface(EDIFCell cell)
Checks if all the port on the provided cell match and are equal to the ports on this cell.
|
boolean |
hasContents() |
int |
hashCode() |
void |
incrementNonHierInstantiationCount()
Atomically increment instance count of this cell.
|
boolean |
isGNDSource() |
boolean |
isLeafCellOrBlackBox() |
boolean |
isPrimitive() |
boolean |
isStaticSource() |
boolean |
isUniquified()
True if this cell is instantiated no more than once.
|
boolean |
isVCCSource() |
void |
makePrimitive()
Deletes internal representation.
|
void |
moveToLibrary(EDIFLibrary newLibrary) |
EDIFCellInst |
removeCellInst(EDIFCellInst cellInstance) |
EDIFCellInst |
removeCellInst(String name) |
EDIFNet |
removeInternalPortMapEntry(String portInstName)
Removes the entry within the cell internal net map (when removing a port on a cell).
|
EDIFNet |
removeNet(EDIFNet net) |
EDIFNet |
removeNet(String name) |
void |
removePort(EDIFPort port) |
void |
rename(String newName) |
EDIFCellInst |
renameCellInst(EDIFCellInst i,
String newName)
Renames the provided instance i with newName.
|
void |
setLibrary(EDIFLibrary library) |
void |
setView(EDIFName view) |
void |
setView(String view) |
void |
sortEDIFPortInstLists() |
void |
trackChange(EDIFChangeType type,
String name) |
addProperty, addProperty, addProperty, addProperty, addProperty, createDuplicatePropertiesMap, exportEDIFProperties, getIOStandard, getPropertiesMap, getProperty, removeProperty, setPropertiesMap
compareTo, exportEDIFName, exportSomeEDIFName, getName, getNewMap, toString
public static final EDIFName DEFAULT_VIEW
public static final byte[] EXPORT_CONST_CELL_BEGIN
public static final byte[] EXPORT_CONST_CELLTYPE
public static final byte[] EXPORT_CONST_VIEWTYPE
public static final byte[] EXPORT_CONST_INTERFACE_END
public static final byte[] EXPORT_CONST_CONTENTS
public static final byte[] EXPORT_CONST_CONTENTS_END
public static final byte[] EXPORT_CONST_VIEW_END
public static final byte[] EXPORT_CONST_CELL_END
public static final byte[] EXPORT_CONST_PROP_INDENT
public EDIFCell(EDIFLibrary lib, String name)
public EDIFCell(EDIFCell orig)
orig
- The original cellpublic EDIFCell(EDIFLibrary lib, EDIFCell orig)
lib
- Destination library of the copied cell.orig
- The original cellpublic EDIFCell(EDIFLibrary lib, EDIFCell orig, String newCellName)
lib
- Destination library of the new cellorig
- Prototype of the original cellnewCellName
- Name of the new cell copypublic EDIFCellInst createChildCellInst(String name, EDIFCell reference)
public EDIFCellInst addNewCellInstUniqueName(String suggestedName, EDIFCell reference)
public EDIFCellInst addCellInst(EDIFCellInst instance)
instance
- The instance to add to this cell.public EDIFCellInst addCellInstUniqueName(EDIFCellInst instance)
instance
- The instance to be added to this cell.public EDIFCellInst getCellInst(String name)
public EDIFNet addNet(EDIFNet net)
net
- The net to addpublic EDIFNet getNet(String name)
public EDIFNet removeNet(String name)
public EDIFPort addPort(EDIFPort port)
port
- The port to add.public EDIFPort getPort(String name)
EDIFPort.getBusName()
). Multi-bit ports
need to have closing square bracket and range removed (for example:
"bus[3:0]" -> "bus["
). See EDIFCell.addPort(EDIFPort)
for more information.name
- Bus name (ends with '[' to represent a bussed port) of the
port to get. Single bit ports use their entire name.public EDIFPort getPortByPortInstName(String portInstName)
portInstName
- public EDIFCellInst createCellInst(String name, EDIFCell parent)
public EDIFCellInst removeCellInst(EDIFCellInst cellInstance)
public EDIFCellInst removeCellInst(String name)
public EDIFNet createNet(String name)
public EDIFPort createPort(String name, EDIFDirection direction, int width)
public void rename(String newName)
public EDIFCellInst renameCellInst(EDIFCellInst i, String newName)
i
- Current instance in the cell.newName
- New name for instance ipublic void removePort(EDIFPort port)
public void moveToLibrary(EDIFLibrary newLibrary)
public String getView()
public EDIFName getEDIFView()
public void setView(String view)
view
- the view to setpublic void setView(EDIFName view)
public Collection<EDIFPort> getPorts()
public Map<String,EDIFPort> getPortMap()
public Collection<EDIFCellInst> getCellInsts()
public Collection<EDIFNet> getNets()
public void addInternalPortMapEntry(String portInstName, EDIFNet internalNet)
portInstName
- Name from a port ref as generated in @link EDIFPortInst.getPortInstNameFromPort()
internalNet
- The net inside this cell to match with the port ref name.public EDIFNet removeInternalPortMapEntry(String portInstName)
portInstName
- Name of the port ref to removepublic Map<String,EDIFNet> getInternalNetMap()
public EDIFNet getInternalNet(EDIFPortInst portInst)
portInst
- The external port ref to get the internal net.public EDIFNet getInternalNet(String portInstName)
portInstName
- The external port name to get the internal net.public EDIFLibrary getLibrary()
public void setLibrary(EDIFLibrary library)
library
- the library to setpublic boolean hasContents()
public boolean isPrimitive()
public boolean isStaticSource()
public boolean isVCCSource()
public boolean isGNDSource()
public boolean isLeafCellOrBlackBox()
public boolean hasCompatibleInterface(EDIFCell cell)
cell
- The other cell to check against.public void makePrimitive()
public void exportEDIF(OutputStream os, EDIFWriteLegalNameCache<?> cache, boolean stable) throws IOException
IOException
public void exportEDIF(OutputStream os, EDIFWriteLegalNameCache<?> cache) throws IOException
IOException
public List<EDIFHierCellInst> getAllLeafDescendants()
public List<EDIFHierCellInst> getAllLeafDescendants(EDIFHierCellInst parentInstance)
parentInstance
- Parent name or prefix name for all leaf cell descendants to be
added. Is not error checked against netlist because the context is not available.public EDIFNetlist getNetlist()
public void trackChange(EDIFChangeType type, String name)
public EDIFPort getPortByLegalName(String name, EDIFReadLegalNameCache cache)
public void sortEDIFPortInstLists()
public void incrementNonHierInstantiationCount()
public void decrementNonHierInstantiationCount()
public int getNonHierInstantiationCount()
public boolean isUniquified()