|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbyucc.jhdl.platforms.util.VirtualPort
This class is used to contain all the information necessary to represent a virtual port that the user can link to.
Field Summary |
Fields inherited from interface byucc.jhdl.platforms.util.UtilConstants |
directions, IN, NONE, OUT, TRISTATE, UNASSIGNED |
Constructor Summary | |
VirtualPort(java.lang.String name,
int width,
Wire in,
Wire out)
Constructs a new VirtualPort. |
Method Summary | |
VirtualPort |
addAttribute(java.lang.String attrib)
Adds known attributes to the Virtual Port. |
void |
addDefaultProperty(PortProperty property)
Adds a default property for all bits of this VirtualPort |
void |
addDefaultProperty(java.lang.String property)
Adds a default property for all bits of this VirtualPort |
java.util.Vector |
getDefaultProperties()
Used to get a list of all default properties. |
PortProperty |
getDefaultProperty(java.lang.String property)
Get a specific default property. |
BV |
getDefaultState()
Returns a copy of the default state. |
Wire |
getEnableWire(int index)
Gets the entire enable wire associated with the UserPort which covers the indicated bit. |
PortProperty |
getInAttribute(int index,
java.lang.String property)
Retrieves the specified attribute associated with the UserPort for the IN direction for the specified bit. |
PortProperty[] |
getInAttributes(int index)
Retrieves all attributes associated with the UserPort for the IN direction for the specified bit. |
java.lang.String |
getName()
Get the name of the virtual port. |
PortProperty |
getOutAttribute(int index,
java.lang.String prop)
Retrieves the specified attribute associated with the UserPort for the OUT direction for the specified bit. |
PortProperty[] |
getOutAttributes(int index)
Retrieves all attributes associated with the UserPort for the OUT direction for the specified bit. |
Wire |
getOutputWire()
Returns the output wire. |
Wire |
getSingleEnable(int index)
Gets the single bit enable wire associated with the specified bit. |
UserPortInfo[] |
getUserPorts()
Get an Array of all UserPorts. |
int |
getWidth()
Get the width of the virtual port. |
Wire |
getWireForPort(VPortInfo vpi,
java.lang.String portName)
Used to get the wire for the port specified by the parameters. |
boolean |
hasDefaultState()
Checks whether or not a default state has been set. |
boolean |
hasInPort(int index)
Find out if a given bit has a UserPort associated with the IN direction. |
boolean |
hasOutPort(int index)
Find out if a given bit has a UserPort associated with the OUT direction. |
boolean |
isUsed()
Tells whether any bits in this virtual port are currently used. |
boolean |
isUsed(int bit)
Tells whether a specific bit in this virtual port is currently used. |
boolean |
isValidAttribute(java.lang.String attrib)
Find out if an attribute is valid for this VirtualPort. |
boolean |
setDefaultState(BV state)
Allows the board-model writer to set a default state for this signal. |
void |
setImplicitEnable(Wire enable)
Sets the implicit enable for this virtual port. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VirtualPort(java.lang.String name, int width, Wire in, Wire out)
name
- Name of the VirtualPortwidth
- Width of the virtualPortin
- Wire associated with in direction of this port. Pass a null if
this port has no in direction.out
- Wire associated with out direction of this port. Pass a null if
this port has no out direction.Method Detail |
public VirtualPort addAttribute(java.lang.String attrib)
attrib
- Name of the attribute.public boolean setDefaultState(BV state)
state
- State to drive on undriven bits. Please note that the width of the BV must be the same
as the width of the wire. Each bit in the BV will match with the corresponding bit in the VirtualPort.
public boolean hasDefaultState()
public BV getDefaultState()
public Wire getOutputWire()
public boolean isValidAttribute(java.lang.String attrib)
attrib
- Attribute to check
public void addDefaultProperty(PortProperty property)
property
- Property to add.public void addDefaultProperty(java.lang.String property)
property
- Property to add.public java.util.Vector getDefaultProperties()
public PortProperty getDefaultProperty(java.lang.String property)
property
- Property to retrieve.
public void setImplicitEnable(Wire enable)
enable
- Wire to use as the implicit enable.public java.lang.String getName()
public int getWidth()
public boolean isUsed()
public boolean isUsed(int bit)
bit
- Index of bit to check.
public Wire getWireForPort(VPortInfo vpi, java.lang.String portName)
vpi
- VPortInfo object containing information about the port. Generally,
this is created by the user with a call to wa() in GenericUserCore.portName
- User's name for the port.
public boolean hasInPort(int index)
index
- Index of bit to check
public boolean hasOutPort(int index)
index
- Index of bit to check
public Wire getEnableWire(int index)
index
- Index of bit
public Wire getSingleEnable(int index)
index
- Index of bit
public PortProperty[] getInAttributes(int index)
index
- Index of bit.
public PortProperty getInAttribute(int index, java.lang.String property)
index
- Index of bit.property
- Property to retrieve.
public PortProperty[] getOutAttributes(int index)
index
- Index of bit.
public PortProperty getOutAttribute(int index, java.lang.String prop)
index
- Index of bit.
public UserPortInfo[] getUserPorts()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |