byucc.jhdl.base
Class Net

java.lang.Object
  extended bybyucc.jhdl.base.Net
All Implemented Interfaces:
BooleanFlags
Direct Known Subclasses:
AtomicNet, BusNet, FlatNet

public abstract class Net
extends java.lang.Object
implements BooleanFlags

Used by Netlist to associate wires with a list of connection records. There is a single Net record for each wire in the design. A Connection record exists within the Net for each cell that is connected to the wire.

Author:
Brad L. Hutchings

Field Summary
protected  int atomic_index
          This the index of the net within some large wire (if it is a member of a non-atomic wire).
protected  ConnectionList cl
          The list of cells that are connected to the wire.
protected  java.lang.String name
          The generated name for this bit of the wire.
protected  Wire net_wire
          The atomic net_wire being associated.
 
Fields inherited from interface byucc.jhdl.base.BooleanFlags
ANTECEDANT_IS_BEHAVIORALLY_MODELED, ASYNC_PORT, ASYNCHRONOUS_RESOLVED, ATOMICALLY_PLACEABLE, ATOMICALLY_UNMAPPABLE, BEHAVIORALLY_MODELED_BRANCH, CLK_PORT, CLOCK_METHOD_IMPLEMENTED_BY_USER, CLOCK_METHOD_IS_DISABLED, CLOCKABLE_IS_SCHEDULED, DANGLING_IS_OK, DELETE_MARK, FATAL_BUILD_ERROR_OCCURED, HAS_BEEN_TRACED, HAS_USER_SPECIFIED_NAME, HWUPDATE, IMPLICIT_PORT, IN_CLK_PORT, IN_PORT, INOUT_PORT, IO_TYPE_FLAGS, IS_BEHAVIORALLY_MODELED, IS_ON_BUILD_STACK, IS_ON_PROP_LIST, IS_PLACED, METHODS_IMPLEMENTED_BY_USER, NETLISTABLE, ORIG_WIRE_IS_ATOMIC, OUT_PORT, PLACEMENT_IS_LOCKED, PROPAGATE_METHOD_IMPLEMENTED_BY_USER, PROPAGATE_METHOD_IS_DISABLED, RECURSION_FLAG, RESET_METHOD_IMPLEMENTED_BY_USER, SIMULATEABLE, SOURCELESS_IS_OK, SYNC_PORT, VISIBLE
 
Constructor Summary
protected Net(Wire net_wire, int atomic_index, java.lang.String wire_name, boolean has_user_specified_name, boolean is_atomic)
          Just builds a Net record for the given wire with the first cell.
 
Method Summary
 int getAtomicIndex()
          Returns the atomic index of a wire.
 int getAtomicWidth()
          Returns the atomic width of the net.
 java.util.Enumeration getConnections()
          Just returns the connection list for this wire association object.
abstract  java.lang.String getIndexString()
          Simple accessor to a string representing the net's index
 java.lang.String getName()
          Simple accessor to set the name of the net.
 PropertyList getProperties()
          Returns any properties attached to this net.
 Wire getWire()
          Simple accessor to get the underlying wire.
 boolean hasConnections()
          Used to tell if a net actually connects to something.
 boolean hasMultipleConnections()
          Used to tell if a net has more than one connection (and actually connects something).
 boolean isAlias(Wire w)
          Used to check if a wire and a net are aliases of each other.
 boolean isAtomic()
          Can be used to determine if the net is atomic, i.e., the same width as the width of atomic wires in the system.
 void setAtomicIndex(int index)
          Sets the atomic index of the wire.
 void setName(java.lang.String name)
          Simple accessor to set the name of the net.
 java.lang.String toString()
          Used to display current contents - useful in debugging
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

net_wire

protected Wire net_wire
The atomic net_wire being associated.


cl

protected ConnectionList cl
The list of cells that are connected to the wire.


name

protected java.lang.String name
The generated name for this bit of the wire.


atomic_index

protected int atomic_index
This the index of the net within some large wire (if it is a member of a non-atomic wire).

Constructor Detail

Net

protected Net(Wire net_wire,
              int atomic_index,
              java.lang.String wire_name,
              boolean has_user_specified_name,
              boolean is_atomic)
Just builds a Net record for the given wire with the first cell.

Parameters:
atomic_index - the position of the vp within the wire it was grabbed from, ignored if is_atomic is true.
wire_name - the name of the wire this vp was grabbed from.
has_user_specified_name - true if the user specified the name, false if it was generated on the fly from the class name
is_atomic - true only if the wire it came from was atomic.
Throws:
BuildException - if the wire is not atomic
Method Detail

getWire

public Wire getWire()
Simple accessor to get the underlying wire.

Returns:
the wire of this net

getName

public java.lang.String getName()
Simple accessor to set the name of the net.

Returns:
the base name of the net.

getIndexString

public abstract java.lang.String getIndexString()
Simple accessor to a string representing the net's index

Returns:
the string for the net's index

setName

public void setName(java.lang.String name)
Simple accessor to set the name of the net.

Parameters:
name - the name for this net.

getAtomicIndex

public int getAtomicIndex()
Returns the atomic index of a wire. Returns -1 if the wire is atomic.

Returns:
the atomic index of a wire. Returns -1 if the wire is atomic.

setAtomicIndex

public void setAtomicIndex(int index)
Sets the atomic index of the wire.

Parameters:
index - the atomic index of the wire

getConnections

public java.util.Enumeration getConnections()
Just returns the connection list for this wire association object.

Returns:
the connection list for this wire association object.

isAtomic

public boolean isAtomic()
Can be used to determine if the net is atomic, i.e., the same width as the width of atomic wires in the system. This is useful because you would like to know if the original wire was atomic before it was stripped down to its atomic constituents.

Returns:
true if atomic, false otherwise.

getAtomicWidth

public int getAtomicWidth()
Returns the atomic width of the net.

Returns:
the atomic width of the net.

isAlias

public boolean isAlias(Wire w)
Used to check if a wire and a net are aliases of each other.

Parameters:
w - the wire being checked against the net.
Returns:
true if they are aliases

hasMultipleConnections

public boolean hasMultipleConnections()
Used to tell if a net has more than one connection (and actually connects something).

Returns:
true if element count of connections > 1.

hasConnections

public boolean hasConnections()
Used to tell if a net actually connects to something.

Returns:
true if element count of connections > 0.

getProperties

public PropertyList getProperties()
Returns any properties attached to this net.

Returns:
a propertylist for this net.

toString

public java.lang.String toString()
Used to display current contents - useful in debugging

Returns:
string representing the net


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