hades.models.rtlib.muxes
Class BitDecoder
java.lang.Object
hades.simulator.SimObject
hades.models.rtlib.GenericRtlibObject
hades.models.rtlib.muxes.BitDecoder
- All Implemented Interfaces:
- java.lang.Cloneable, ContextToolTip, java.io.Serializable, Simulatable, Wakeable
- public class BitDecoder
- extends GenericRtlibObject
BitDecoder - decode the value at input A into a 1-out-N code (2**N)
of type SignalStdLogic1164 outputs.
- See Also:
- Serialized Form
Fields inherited from class hades.models.rtlib.GenericRtlibObject |
BINARY, DECIMAL, defaultdelay, delay, enableAnimationFlag, HEX, labelFormatter, n_bits, valueLabel, vector, vector_000, vector_111, vector_UUU, vector_XXX, vector_ZZZ, vectorOutputPort |
Fields inherited from class hades.simulator.SimObject |
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible |
Method Summary |
void |
configure()
create and display a 'ConfigDialog' to set the parameters for
a SimObject. |
void |
constructDynamicSymbol()
|
void |
constructPorts()
|
void |
evaluate(java.lang.Object arg)
evaluate(): get the numerial value i of input A (if defined), and
set output bit[i] to 1, all others to 0. |
java.lang.String |
getToolTip(java.awt.Point position,
long millis)
construct a (short) tool tip message. |
void |
initDisplay()
|
boolean |
initialize(java.lang.String s)
initialize a RTLIB object from a String
which contains the integer version id, the width of the input vector,
and the default delay. |
boolean |
needsDynamicSymbol()
|
void |
setSymbol(Symbol s)
|
void |
setWidth(int _n)
we need to override setWidth from GenericRtlibObject, because we need to
rebuild our symbol completely, once the width (n_outputs) of the input
vector changed. |
void |
updateSymbol()
|
void |
write(java.io.PrintWriter ps)
write the following data to PrintWriter ps:
our versionId, the width (n_bits),
and the default delay. |
Methods inherited from class hades.models.rtlib.GenericRtlibObject |
assign, constructStandardValues, copy, elaborate, getDelay, getEnableAnimationFlag, getFormattedValue, getNumberFormat, getValue, getWidth, initValueLabel, isConnected, scheduleAfter, scheduleAfter, scheduleVectorOutputPort, setDelay, setDelay, setEnableAnimationFlag, setEnableAnimationFlag, setFormattedValue, setNumberFormat, setNumberFormat, setValue, setValue, setWidth, toString, wakeup, wakeupAfter |
Methods inherited from class hades.simulator.SimObject |
getBindkey, getClassLoader, getDebug, getEditor, getExternalResources, getFullName, getName, getParent, getPort, getPorts, getPropertySheet, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getVersionId, isVisible, keyPressed, message, mousePressed, needsExternalResources, setClassLoader, setConsole, setDebug, setEditor, setName, setParent, setPorts, setSimulator, setVersionId, setVisible, tearDown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
n_outputs
protected int n_outputs
port_A
protected PortStdLogicVector port_A
value_U
protected StdLogic1164 value_U
value_0
protected StdLogic1164 value_0
value_1
protected StdLogic1164 value_1
values
protected StdLogic1164[] values
BitDecoder
public BitDecoder()
constructPorts
public void constructPorts()
- Overrides:
constructPorts
in class GenericRtlibObject
needsDynamicSymbol
public boolean needsDynamicSymbol()
- Overrides:
needsDynamicSymbol
in class SimObject
constructDynamicSymbol
public void constructDynamicSymbol()
- Overrides:
constructDynamicSymbol
in class SimObject
setSymbol
public void setSymbol(Symbol s)
- Overrides:
setSymbol
in class GenericRtlibObject
initDisplay
public void initDisplay()
setWidth
public void setWidth(int _n)
- we need to override setWidth from GenericRtlibObject, because we need to
rebuild our symbol completely, once the width (n_outputs) of the input
vector changed.
- Overrides:
setWidth
in class GenericRtlibObject
evaluate
public void evaluate(java.lang.Object arg)
- evaluate(): get the numerial value i of input A (if defined), and
set output bit[i] to 1, all others to 0.
- Specified by:
evaluate
in interface Simulatable
- Overrides:
evaluate
in class SimObject
- Parameters:
arg
- an arbitrary object argument
updateSymbol
public void updateSymbol()
- Overrides:
updateSymbol
in class GenericRtlibObject
write
public void write(java.io.PrintWriter ps)
- write the following data to PrintWriter ps:
our versionId, the width (n_bits),
and the default delay.
- Overrides:
write
in class GenericRtlibObject
initialize
public boolean initialize(java.lang.String s)
- initialize a RTLIB object from a String
which contains the integer version id, the width of the input vector,
and the default delay.
- Overrides:
initialize
in class GenericRtlibObject
configure
public void configure()
- Description copied from class:
SimObject
- create and display a 'ConfigDialog' to set the parameters for
a SimObject. The default ConfigDialog for the base class (SimObject)
itself is empty except for the 'instance name' of the SimObject.
- Overrides:
configure
in class GenericRtlibObject
getToolTip
public java.lang.String getToolTip(java.awt.Point position,
long millis)
- construct a (short) tool tip message.
- Specified by:
getToolTip
in interface ContextToolTip
- Overrides:
getToolTip
in class GenericRtlibObject