hades.models.rtlib.muxes
Class Decoder

java.lang.Object
  extended byhades.simulator.SimObject
      extended byhades.models.rtlib.GenericRtlibObject
          extended byhades.models.rtlib.muxes.Decoder
All Implemented Interfaces:
java.lang.Cloneable, ContextToolTip, java.io.Serializable, Simulatable, Wakeable

public class Decoder
extends GenericRtlibObject

Decoder - decode an n-input value into 1 1-out-2**n code (active high). For example, the truth-table for a 3-bit decoder would be: 000 0000 0001 001 0000 0010 010 0000 0100 011 0000 1000 ... 111 1000 0000 Signals are expected to be SignalStdLogicVector objects.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class hades.models.rtlib.GenericRtlibObject
GenericRtlibObject.BinaryValueLabelFormatter, GenericRtlibObject.DecimalValueLabelFormatter, GenericRtlibObject.DINColorSource, GenericRtlibObject.FlexibleLabelFormatter, GenericRtlibObject.HexValueLabelFormatter
 
Field Summary
protected  PortStdLogicVector port_A
           
protected  PortStdLogicVector port_Y
           
protected  StdLogicVector value_A
           
 
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
 
Constructor Summary
Decoder()
           
 
Method Summary
 void constructPorts()
           
 void evaluate(java.lang.Object arg)
          evaluate(): get the input value "i", then set the bit at index i of the output vector.
 void setWidth(int _n)
           
 
Methods inherited from class hades.models.rtlib.GenericRtlibObject
assign, configure, constructStandardValues, copy, elaborate, getDelay, getEnableAnimationFlag, getFormattedValue, getNumberFormat, getToolTip, getValue, getWidth, initialize, initValueLabel, isConnected, scheduleAfter, scheduleAfter, scheduleVectorOutputPort, setDelay, setDelay, setEnableAnimationFlag, setEnableAnimationFlag, setFormattedValue, setNumberFormat, setNumberFormat, setSymbol, setValue, setValue, setWidth, toString, updateSymbol, wakeup, wakeupAfter, write
 
Methods inherited from class hades.simulator.SimObject
constructDynamicSymbol, getBindkey, getClassLoader, getDebug, getEditor, getExternalResources, getFullName, getName, getParent, getPort, getPorts, getPropertySheet, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getVersionId, isVisible, keyPressed, message, mousePressed, needsDynamicSymbol, 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
 
Methods inherited from interface hades.simulator.Simulatable
message
 

Field Detail

port_A

protected PortStdLogicVector port_A

port_Y

protected PortStdLogicVector port_Y

value_A

protected StdLogicVector value_A
Constructor Detail

Decoder

public Decoder()
Method Detail

constructPorts

public void constructPorts()
Overrides:
constructPorts in class GenericRtlibObject

setWidth

public void setWidth(int _n)
Overrides:
setWidth in class GenericRtlibObject

evaluate

public void evaluate(java.lang.Object arg)
evaluate(): get the input value "i", then set the bit at index i of the output vector.

Specified by:
evaluate in interface Simulatable
Overrides:
evaluate in class SimObject
Parameters:
arg - an arbitrary object argument