byucc.jhdl.base
Class Bindings

java.lang.Object
  extended bybyucc.jhdl.base.Bindings

public final class Bindings
extends java.lang.Object

Author:
Brad Hutchings Stores name-value bindings of parameters declared in the CellInterface. Any design parameter that affects how a circuit is built must also be bound in the CellInterface if Cell.cellInterfaceDeterminesUniqueNetlistStructure() returns true. Bindings must also be made if ports have generic widths that depend on the value of a bound parameter. Any class may be bound (native types are automatically wrapped), but #INTEGER, #BOOLEAN, and #STRING are the most common, and along with #LONG, these four constants are defined in Cell.

It is assumed that the bindings will have a constant length, known at the time of construction.


Method Summary
 boolean getBooleanValue(java.lang.String name)
          Returns a Boolean parameter as the native boolean
 byte getByteValue(java.lang.String name)
          Returns a Byte parameter as the native byte
 char getCharValue(java.lang.String name)
          Returns a Character parameter as the native char
 double getDoubleValue(java.lang.String name)
          Returns a Double parameter as the native double
 float getFloatValue(java.lang.String name)
          Returns a Float parameter as the native float
 int getIntValue(java.lang.String name)
          Returns an Integer parameter as the native int
 long getLongValue(java.lang.String name)
          Returns a Long parameter as the native long
 short getShortValue(java.lang.String name)
          Returns a Short parameter as the native short
 java.lang.String toString()
          Outputs the bindings in nice format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getIntValue

public int getIntValue(java.lang.String name)
Returns an Integer parameter as the native int

Parameters:
name - the name of the binding.
Returns:
the value of the binding. This may involve rounding or truncation.
Throws:
TypeException - if the argument is an incompatible type.
See Also:
#getArgument(String)

getBooleanValue

public boolean getBooleanValue(java.lang.String name)
Returns a Boolean parameter as the native boolean

Parameters:
name - the name of the binding.
Returns:
the value of the binding.
Throws:
TypeException - if the argument is an incompatible type.
See Also:
#getArgument(String)

getCharValue

public char getCharValue(java.lang.String name)
Returns a Character parameter as the native char

Parameters:
name - the name of the binding.
Returns:
the value of the binding. This may involve rounding or truncation.
Throws:
TypeException - if the argument is an incompatible type.
See Also:
#getArgument(String)

getByteValue

public byte getByteValue(java.lang.String name)
Returns a Byte parameter as the native byte

Parameters:
name - the name of the binding.
Returns:
the value of the binding. This may involve rounding or truncation.
Throws:
TypeException - if the argument is an incompatible type.
See Also:
#getArgument(String)

getLongValue

public long getLongValue(java.lang.String name)
Returns a Long parameter as the native long

Parameters:
name - the name of the binding.
Returns:
the value of the binding. This may involve rounding or truncation.
Throws:
TypeException - if the argument is an incompatible type.
See Also:
#getArgument(String)

getShortValue

public short getShortValue(java.lang.String name)
Returns a Short parameter as the native short

Parameters:
name - the name of the binding.
Returns:
the value of the binding. This may involve rounding or truncation.
Throws:
TypeException - if the argument is an incompatible type.
See Also:
#getArgument(String)

getFloatValue

public float getFloatValue(java.lang.String name)
Returns a Float parameter as the native float

Parameters:
name - the name of the binding.
Returns:
the value of the binding. This may involve rounding or truncation.
Throws:
TypeException - if the argument is an incompatible type.
See Also:
#getArgument(String)

getDoubleValue

public double getDoubleValue(java.lang.String name)
Returns a Double parameter as the native double

Parameters:
name - the name of the binding.
Returns:
the value of the binding. This may involve rounding or truncation.
Throws:
TypeException - if the argument is an incompatible type.
See Also:
#getArgument(String)

toString

public java.lang.String toString()
Outputs the bindings in nice format

Returns:
String representation of current state of bindings


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