|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthades.simulator.SimObject
hades.models.gates.GenericGate
hades.models.io.Switch
Switch - a not-so-simple class that models a switch (or tgate).
Field Summary | |
boolean |
CLOSED
|
protected double |
delay
|
boolean |
OPEN
|
protected StdLogic1164 |
output_0
|
protected StdLogic1164 |
output_1
|
protected StdLogic1164 |
output_U
|
protected StdLogic1164 |
output_X
|
protected StdLogic1164 |
output_Z
|
protected PortStdLogic1164 |
port_A
|
protected PortStdLogic1164 |
port_B
|
protected PortStdLogic1164 |
port_C
|
protected StdLogic1164 |
startValue
|
protected boolean |
state
|
protected ClockArm |
the_arm
|
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 | |
Switch()
Switch(): simple constructor |
Method Summary | |
void |
configure()
configure: display a dialog to specify the Switch instance name, initial output value, and gate propagation delay. |
void |
elaborate(java.lang.Object arg)
elaborate(): This method is called by the simulation engine to initialize the simulation object. |
void |
evaluate(java.lang.Object arg)
evaluate: as interactive Switch events are handled by mousePressed(), this method is only called by the simulation engine whenever our (hidden) toplevel signal changes. |
double |
getDelay()
|
java.lang.String |
getToolTip(java.awt.Point position,
long millis)
construct a (short) tool tip message for a logic gate with name, class name, and gate delay. |
protected void |
initDisplay()
|
boolean |
initialize(java.lang.String s)
initialize an Switch from a String, which contains the integer version id, and optionally the start value of this Switch (the latter encoded via StdLogic1164.getChar() values, 'U' 'X' '0' ... |
void |
setDelay(java.lang.String s)
|
void |
setSymbol(Symbol s)
|
void |
showState()
|
void |
wakeup(java.lang.Object arg)
wakeup: this method is currently used to handle "external" events on this Switch via the assign call, which schedules a Wakeup event to update the Switch symbol at the correct simulation time. |
void |
write(java.io.PrintWriter ps)
write the versionID and the start value of this Switch (the latter as StdLogic1164.getChar() value), e.g. |
Methods inherited from class hades.models.gates.GenericGate |
copy, scheduleEvent, scheduleEventAfter, scheduleOutputValue, scheduleOutputValueAfter, setDelay |
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, toString |
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 |
public final boolean OPEN
public final boolean CLOSED
protected boolean state
protected PortStdLogic1164 port_A
protected PortStdLogic1164 port_B
protected PortStdLogic1164 port_C
protected StdLogic1164 output_1
protected StdLogic1164 output_0
protected StdLogic1164 output_Z
protected StdLogic1164 output_X
protected StdLogic1164 output_U
protected StdLogic1164 startValue
protected double delay
protected ClockArm the_arm
Constructor Detail |
public Switch()
Method Detail |
public double getDelay()
getDelay
in class GenericGate
public void setDelay(java.lang.String s)
setDelay
in class GenericGate
public boolean initialize(java.lang.String s)
initialize
in class GenericGate
public void write(java.io.PrintWriter ps)
write
in class GenericGate
public void setSymbol(Symbol s)
setSymbol
in class SimObject
protected void initDisplay()
public void showState()
public void elaborate(java.lang.Object arg)
elaborate
in interface Simulatable
elaborate
in class GenericGate
arg
- This parameter is ignored by Switchpublic void evaluate(java.lang.Object arg)
evaluate
in interface Simulatable
evaluate
in class SimObject
arg
- an arbitrary object argumentpublic void wakeup(java.lang.Object arg)
wakeup
in interface Wakeable
public void configure()
configure
in class GenericGate
public java.lang.String getToolTip(java.awt.Point position, long millis)
GenericGate
getToolTip
in interface ContextToolTip
getToolTip
in class GenericGate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |