hades.models.io
Class BitReg6

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

public class BitReg6
extends SimObject
implements Simulatable, java.io.Serializable

BitReg6 - a 6-bit rising-edge triggered, editable D-register. Signals are expected to be StdLogic1164 objects. The individual bits in the register can be toggled interactively by the user via mouse-clicks.

See Also:
Serialized Form

Field Summary
protected  StdLogic1164[] data
           
protected  Label[] labels
           
protected  int n_bits
           
protected  Port port_C
           
protected  Port port_NR
           
(package private) static double t_pass
           
(package private) static double t_setup
           
protected  StdLogic1164 value_0
           
protected  StdLogic1164 value_1
           
protected  StdLogic1164 value_U
           
protected  StdLogic1164 value_X
           
 
Fields inherited from class hades.simulator.SimObject
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible
 
Constructor Summary
BitReg6()
           
 
Method Summary
 void elaborate(java.lang.Object arg)
          elaborate: store a reference to our simulator.
 void evaluate(java.lang.Object arg)
          evaluate: check the NR and C inputs and calculate the data Q outputs.
 void initDisplay()
          create the (dynamic) symbol for this BitReg6
 void mousePressed(java.awt.event.MouseEvent me)
          mousePressed: react to interactive user events.
 void schedule(int bitIndex, double time)
          schedule the output value for a single bit of the register
 void setSymbol(Symbol s)
           
 void show()
          show: update the BitReg6 symbol
 
Methods inherited from class hades.simulator.SimObject
configure, constructDynamicSymbol, copy, getBindkey, getClassLoader, getDebug, getEditor, getExternalResources, getFullName, getName, getParent, getPort, getPorts, getPropertySheet, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getToolTip, getVersionId, initialize, isVisible, keyPressed, message, needsDynamicSymbol, needsExternalResources, setClassLoader, setConsole, setDebug, setEditor, setName, setParent, setPorts, setSimulator, setVersionId, setVisible, tearDown, toString, write
 
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

n_bits

protected int n_bits

port_C

protected Port port_C

port_NR

protected Port port_NR

value_U

protected StdLogic1164 value_U

value_X

protected StdLogic1164 value_X

value_0

protected StdLogic1164 value_0

value_1

protected StdLogic1164 value_1

data

protected StdLogic1164[] data

labels

protected Label[] labels

t_pass

static double t_pass

t_setup

static double t_setup
Constructor Detail

BitReg6

public BitReg6()
Method Detail

setSymbol

public void setSymbol(Symbol s)
Overrides:
setSymbol in class SimObject

initDisplay

public void initDisplay()
create the (dynamic) symbol for this BitReg6


show

public void show()
show: update the BitReg6 symbol


mousePressed

public void mousePressed(java.awt.event.MouseEvent me)
mousePressed: react to interactive user events. Currently, the register bit at the mouse position is toggled 0-1-0... or 0-1-x-0... (when +click is used).

Overrides:
mousePressed in class SimObject

elaborate

public void elaborate(java.lang.Object arg)
elaborate: store a reference to our simulator.

Specified by:
elaborate in interface Simulatable
Overrides:
elaborate in class SimObject

evaluate

public void evaluate(java.lang.Object arg)
evaluate: check the NR and C inputs and calculate the data Q outputs.

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

schedule

public void schedule(int bitIndex,
                     double time)
schedule the output value for a single bit of the register