byucc.jhdl.platforms.util
Class VPortInfo

java.lang.Object
  extended bybyucc.jhdl.platforms.util.VPortInfo
All Implemented Interfaces:
UtilConstants

public class VPortInfo
extends java.lang.Object
implements UtilConstants

This class is used to encapsulate all of the information given by the user when requesting a port. This class should never be constructed directly, but will be constructed when the user calls the wa() method in GenericUserCore.


Field Summary
 
Fields inherited from interface byucc.jhdl.platforms.util.UtilConstants
directions, IN, NONE, OUT, TRISTATE, UNASSIGNED
 
Constructor Summary
VPortInfo(java.lang.String port)
          Constructor used when the entire bus is wanted.
VPortInfo(java.lang.String port, int index)
          Constructor used when a single bit is wanted.
VPortInfo(java.lang.String port, int top, int bottom)
          Constructor used when a range is wanted.
VPortInfo(java.lang.String port, int top, int bottom, java.lang.String[] attrib)
          Constructor used when a range is wanted.
VPortInfo(java.lang.String port, int index, java.lang.String[] attrib)
          Constructor used when a single bit is wanted.
VPortInfo(java.lang.String port, java.lang.String[] attrib)
          Constructor used when the entire bus is wanted.
 
Method Summary
 PortProperty[] getAttributes()
          Get the array of attributes
 int getBottom()
          Gets the LSB of the requested range
 int getDirection()
          Get the direction of the port
 Wire getEnable()
          Get the enable wire.
 int getIndex()
          Gets the index of the requested bit
 java.lang.String getPortName()
          Gets the name of the requested port.
 int getTop()
          Gets the MSB of the requested range
 boolean isEntireBus()
           
 boolean isRange()
           
 boolean isSingleBit()
           
 void setDirection(int direction)
          Set the direction of the port
 void setEnable(Wire enable)
          Set the enable wire.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VPortInfo

public VPortInfo(java.lang.String port,
                 int top,
                 int bottom,
                 java.lang.String[] attrib)
Constructor used when a range is wanted. Also excepts a list of attributes.

Parameters:
port - Name of requested port.
top - Index of the MSB of the requested wire
bottom - Index of the MSB of the requested wire
attrib - List of attributes. The list is simply a comma and/or space deliminated list.

VPortInfo

public VPortInfo(java.lang.String port,
                 int top,
                 int bottom)
Constructor used when a range is wanted. Does not except a list of attributes.

Parameters:
port - Name of requested port.
top - Index of the MSB of the requested wire
bottom - Index of the MSB of the requested wire

VPortInfo

public VPortInfo(java.lang.String port,
                 int index,
                 java.lang.String[] attrib)
Constructor used when a single bit is wanted. Also excepts a list of attributes.

Parameters:
port - Name of requested port.
index - Index of the requested bit
attrib - List of attributes. The list is simply a comma and/or space deliminated list.

VPortInfo

public VPortInfo(java.lang.String port,
                 int index)
Constructor used when a single bit is wanted. Does not except a list of attributes.

Parameters:
port - Name of requested port.
index - Index of the requested bit

VPortInfo

public VPortInfo(java.lang.String port,
                 java.lang.String[] attrib)
Constructor used when the entire bus is wanted. Also excepts a list of attributes.

Parameters:
port - Name of requested port.
attrib - List of attributes. The list is simply a comma and/or space deliminated list.

VPortInfo

public VPortInfo(java.lang.String port)
Constructor used when the entire bus is wanted. Does not except a list of attributes.

Parameters:
port - Name of requested port.
Method Detail

toString

public java.lang.String toString()

getPortName

public java.lang.String getPortName()
Gets the name of the requested port.

Returns:
Name of requested port.

getTop

public int getTop()
Gets the MSB of the requested range

Returns:
The MSB of the requested range

getBottom

public int getBottom()
Gets the LSB of the requested range

Returns:
The LSB of the requested range

getIndex

public int getIndex()
Gets the index of the requested bit

Returns:
The index of the requested bit

isEntireBus

public boolean isEntireBus()
Returns:
True if user requested the entire bus, false otherwise.

isSingleBit

public boolean isSingleBit()
Returns:
True if user requested a single bit, false otherwise.

isRange

public boolean isRange()
Returns:
True if user requested a range of the bus, false otherwise.

getAttributes

public PortProperty[] getAttributes()
Get the array of attributes

Returns:
Array of attributes

setDirection

public void setDirection(int direction)
Set the direction of the port

Parameters:
direction - Direction of the port

getDirection

public int getDirection()
Get the direction of the port

Returns:
Direction of the port

setEnable

public void setEnable(Wire enable)
Set the enable wire. Only used for out ports

Parameters:
enable - Enable wire.

getEnable

public Wire getEnable()
Get the enable wire. Only used for out ports

Returns:
Enable wire.


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.