hades.models.io
Class IpinStdLogic1164

java.lang.Object
  extended byhades.simulator.SimObject
      extended byhades.models.gates.GenericGate
          extended byhades.models.io.Ipin
              extended byhades.models.io.IpinStdLogic1164
All Implemented Interfaces:
Assignable, java.lang.Cloneable, ContextToolTip, InputConnector, java.io.Serializable, Simulatable, Wakeable

public class IpinStdLogic1164
extends Ipin

IpinStdLogic1164 - an input pin (and hierarchy connectors) which allows to generate all nine std_logic values directly by clicking: U/X/0/1/Z/L/H/W/D.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class hades.models.io.Ipin
bindkey, delay, output_0, output_1, output_U, output_X, output_Z, port_toplevel, port_Y, showOnOff, startValue, state
 
Fields inherited from class hades.models.gates.GenericGate
t_delay
 
Fields inherited from class hades.simulator.SimObject
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible
 
Constructor Summary
IpinStdLogic1164()
          IpinStdLogic1164(): simple constructor
 
Method Summary
 int findStateFromMouseclick(java.awt.event.MouseEvent me)
           
 void mousePressed(java.awt.event.MouseEvent me)
          mousePressed: an interactive mouse click on this switch.
 void schedule(int state, double delay, boolean interactive)
           
 void setStartState()
           
 void showState()
           
 java.lang.String toString()
          toString() - the usual info method
 
Methods inherited from class hades.models.io.Ipin
assign, configure, elaborate, evaluate, getBindkey, getDelay, getStartValue, getToolTip, initDisplay, initialize, keyPressed, mouseOrKeyEvent, setBindkey, setDelay, setName, setStartValue, setSymbol, setValueAtTime, wakeup, write
 
Methods inherited from class hades.models.gates.GenericGate
copy, scheduleEvent, scheduleEventAfter, scheduleOutputValue, scheduleOutputValueAfter, setDelay
 
Methods inherited from class hades.simulator.SimObject
constructDynamicSymbol, getClassLoader, getDebug, getEditor, getExternalResources, getFullName, getName, getParent, getPort, getPorts, getPropertySheet, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getVersionId, isVisible, message, needsDynamicSymbol, needsExternalResources, setClassLoader, setConsole, setDebug, setEditor, 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
 

Constructor Detail

IpinStdLogic1164

public IpinStdLogic1164()
IpinStdLogic1164(): simple constructor

Method Detail

setStartState

public void setStartState()
Overrides:
setStartState in class Ipin

showState

public void showState()
Overrides:
showState in class Ipin

mousePressed

public void mousePressed(java.awt.event.MouseEvent me)
mousePressed: an interactive mouse click on this switch.

For a normal click, we find the std_logic value whose "field" is selected by (or nearest to) the click position. The output value of this switch is then updated after t_delay. Note that the algorithm used for searching the right field does not work for mirrored symbols (yet).

If the SHIFT-key is down during the mouse click, we increment the switch state, allowing to toggle quickly through all nine std_logic values: U-X-0-1-Z-L-H-W-D-0-... The output value of this switch is updated after t_delay.

Overrides:
mousePressed in class Ipin

findStateFromMouseclick

public int findStateFromMouseclick(java.awt.event.MouseEvent me)

schedule

public void schedule(int state,
                     double delay,
                     boolean interactive)
Overrides:
schedule in class Ipin

toString

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

Overrides:
toString in class SimObject