|
||||||||||
| 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.Ipin
Ipin - a simple subclass of GenericGate that models an switch. Also, a Ipin object is automatically interpreted as an input for a hierarchical Design - like a standard-CAD 'ipin'.
| Field Summary | |
protected double |
delay
|
protected StdLogic1164 |
output_0
|
protected StdLogic1164 |
output_1
|
protected StdLogic1164 |
output_U
|
protected StdLogic1164 |
output_X
|
protected StdLogic1164 |
output_Z
|
protected PortStdLogic1164 |
port_toplevel
|
protected PortStdLogic1164 |
port_Y
|
protected ColoredCircle |
showOnOff
|
protected StdLogic1164 |
startValue
|
protected int |
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 | |
Ipin()
Ipin(): simple constructor |
|
| Method Summary | |
void |
assign(java.lang.String value,
double time)
used to specify a new Ipin output value from an external source (e.g. a script). |
void |
configure()
configure: display a dialog to specify the Ipin 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 Ipin 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 |
getStartValue()
|
protected void |
initDisplay()
|
boolean |
initialize(java.lang.String s)
initialize an Ipin from a String, which contains the integer version id, and optionally the start value of this Ipin (the latter encoded via StdLogic1164.getChar() values, 'U' 'X' '0' ... |
void |
mousePressed(java.awt.event.MouseEvent me)
handle a mouse click on this Ipin's graphical symbol. |
protected void |
schedule(int state,
double delay,
boolean interactive)
|
void |
setDelay(java.lang.String s)
|
void |
setName(java.lang.String name)
set the name of this SimObject. |
void |
setStartState()
|
void |
setStartValue(java.lang.String s)
|
void |
setSymbol(Symbol s)
|
void |
setValueAtTime(StdLogic1164 value,
double time)
Deprecated. please use assign(String,time) instead |
void |
showState()
|
void |
wakeup(java.lang.Object arg)
wakeup: this method is currently used to handle "external" events on this Ipin via the assign call, which schedules a Wakeup event to update the Ipin symbol at the correct simulation time. |
void |
write(java.io.PrintWriter ps)
write the versionID and the start value of this Ipin (the latter as StdLogic1164.getChar() value), e.g. "1001 Z" |
| Methods inherited from class hades.models.gates.GenericGate |
copy, getToolTip, 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, 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 |
protected int state
protected PortStdLogic1164 port_Y
protected PortStdLogic1164 port_toplevel
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 ColoredCircle showOnOff
| Constructor Detail |
public Ipin()
| Method Detail |
public double getDelay()
getDelay in class GenericGatepublic void setDelay(java.lang.String s)
setDelay in class GenericGatepublic java.lang.String getStartValue()
public void setStartValue(java.lang.String s)
public boolean initialize(java.lang.String s)
initialize in class GenericGatepublic void write(java.io.PrintWriter ps)
write in class GenericGatepublic void setSymbol(Symbol s)
setSymbol in class SimObjectpublic void setName(java.lang.String name)
SimObjectTo avoid consistency problems, when the user changes a SimObject's name interactively, we also try to enforce a unique name.
setName in class SimObjectprotected void initDisplay()
public void setStartState()
public void showState()
public void mousePressed(java.awt.event.MouseEvent me)
mousePressed in class SimObjectpublic void elaborate(java.lang.Object arg)
elaborate in interface Simulatableelaborate in class GenericGatearg - This parameter is ignored by Ipin
protected void schedule(int state,
double delay,
boolean interactive)
public void setValueAtTime(StdLogic1164 value,
double time)
public void assign(java.lang.String value,
double time)
Internally, the latter graphical symbol update is implemented via a Wakeup event for this Ipin.
assign in interface Assignablepublic void evaluate(java.lang.Object arg)
evaluate in interface Simulatableevaluate in class SimObjectarg - an arbitrary object argumentpublic void wakeup(java.lang.Object arg)
wakeup in interface Wakeablepublic void configure()
configure in class GenericGate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||