hades.models.register
Class RegisterR

java.lang.Object
  extended byhades.simulator.SimObject
      extended byhades.models.register.Register
          extended byhades.models.register.RegisterR
All Implemented Interfaces:
java.lang.Cloneable, ContextToolTip, java.io.Serializable, Simulatable

public class RegisterR
extends Register

RegisterR - a simple subclass of Register that models a n-bit rising-edge triggered, editable D-register with reset. Signals are expected to be StdLogic1164 objects.

See Also:
Serialized Form

Field Summary
protected  Port port_NR
           
 
Fields inherited from class hades.models.register.Register
data, display, h, labels, n_bits, port_C, t_pass, t_setup, value_0, value_1, value_U, value_X, w
 
Fields inherited from class hades.simulator.SimObject
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible
 
Constructor Summary
RegisterR()
          construct an rising-edge triggered, editable D-RegisterR with low- active reset input, using a default width of 4 bits.
 
Method Summary
 SimObject copy()
          copy(): This function is used to create a clone of the current SimObject.
protected  void createGlobalPortSymbols()
           
 void evaluate(java.lang.Object arg)
          evaluate(): called by the simulation engine on all events that concern this object.
protected  void initPortsAndData()
          the internal utility method to create the array of ports and flipflop values, corresponding to the desired bit-width specified by the global variable n_bits.
 java.lang.String toString()
          toString() - the usual info method
 
Methods inherited from class hades.models.register.Register
addDisplayElementsToSymbol, configure, constructDynamicSymbol, elaborate, getBitWidth, getDefaultBitWidth, getPassTime, initDisplay, initialize, mousePressed, needsDynamicSymbol, removeDisplayElementsFromSymbol, schedule, setBitWidth, setBitWidth, setPassTime, setPassTime, setSymbol, show, showDInputPorts, write
 
Methods inherited from class hades.simulator.SimObject
getBindkey, getClassLoader, getDebug, getEditor, getExternalResources, getFullName, getName, getParent, getPort, getPorts, getPropertySheet, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getToolTip, getVersionId, isVisible, keyPressed, message, 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_NR

protected Port port_NR
Constructor Detail

RegisterR

public RegisterR()
construct an rising-edge triggered, editable D-RegisterR with low- active reset input, using a default width of 4 bits.

The width can be changed later in the 'initialize' method or interactively using the 'PropertySheet' dialog.

Method Detail

initPortsAndData

protected void initPortsAndData()
the internal utility method to create the array of ports and flipflop values, corresponding to the desired bit-width specified by the global variable n_bits.

A register uses n_bits inputs, n_bits outputs, one clock and one reset input.

Overrides:
initPortsAndData in class Register

createGlobalPortSymbols

protected void createGlobalPortSymbols()
Overrides:
createGlobalPortSymbols in class Register

evaluate

public void evaluate(java.lang.Object arg)
evaluate(): called by the simulation engine on all events that concern this object. The object is responsible for updating its internal state and for scheduling all pending output events.

Specified by:
evaluate in interface Simulatable
Overrides:
evaluate in class Register

copy

public SimObject copy()
Description copied from class: SimObject
copy(): This function is used to create a clone of the current SimObject.

I am not yet sure about the correct and best semantic for copy(). Currently a new object of the current class is created by calling the default constructor.

Overrides:
copy in class Register

toString

public java.lang.String toString()
toString() - the usual info method

Overrides:
toString in class Register