hades.models.io
Class GalFuse

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

public class GalFuse
extends GenericGate
implements Simulatable

GalFuse: an interactive switch (with builtin diode) useful for demonstrating ROM, PLA, or GAL arrays. This model uses the std_logic levels to simulate the "bipolar" DIODE-based implementation of a active-low AND-matrix connection. (This differs from the actual NOR-NOR based single-NMOS-transistor realization in current MOS technologies, where the switch element is inverting...)

The behaviour is as follows: If the fuse is ok and the input is LOW (0), the output will be LOW (0). If the fuse is ok and the input is HIGH (1), the output will be TRISTATE (Z). If the fuse is ok and the input is UNDEFINED (X or U), the output will be X. If the fuse is blown, the output will be TRISTATE (Z).

See Also:
Serialized Form

Field Summary
(package private) static int[] _active
           
protected static int ACTIVE
           
protected  ColoredPolyline fuse
           
protected  StdLogic1164 next_Y
           
protected static int PASSIVE
           
protected  PortStdLogic1164 port_A
           
protected  PortStdLogic1164 port_Y
           
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
GalFuse()
           
 
Method Summary
 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)
          calculate the StdLogic1164 negation of input A, schedule to Y after t_delay
 boolean initialize(java.lang.String s)
          initialize a GenericGate from a String that contains the integer version id of this gate and its propagation delay (in seconds), e.g.
 void mousePressed(java.awt.event.MouseEvent evt)
          react to a MouseEvent.
 void showState()
           
 void write(java.io.PrintWriter pw)
          write "versionId" and gate delay "t_delay"
 
Methods inherited from class hades.models.gates.GenericGate
configure, copy, getDelay, getToolTip, scheduleEvent, scheduleEventAfter, scheduleOutputValue, scheduleOutputValueAfter, setDelay, 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, needsDynamicSymbol, needsExternalResources, setClassLoader, setConsole, setDebug, setEditor, setName, setParent, setPorts, setSimulator, setSymbol, 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

PASSIVE

protected static final int PASSIVE
See Also:
Constant Field Values

ACTIVE

protected static final int ACTIVE
See Also:
Constant Field Values

state

protected int state

fuse

protected ColoredPolyline fuse

port_A

protected PortStdLogic1164 port_A

port_Y

protected PortStdLogic1164 port_Y

next_Y

protected StdLogic1164 next_Y

_active

static final int[] _active
Constructor Detail

GalFuse

public GalFuse()
Method Detail

elaborate

public void elaborate(java.lang.Object arg)
Description copied from interface: Simulatable
elaborate(): This method is called by the simulation engine to initialize the simulation object.

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

evaluate

public void evaluate(java.lang.Object arg)
calculate the StdLogic1164 negation of input A, schedule to Y after t_delay

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

mousePressed

public void mousePressed(java.awt.event.MouseEvent evt)
Description copied from class: SimObject
react to a MouseEvent. The base SimObject ignores MouseEvents.

Note that the HADES schematic editor will also deliver jfig.canvas.FigCanvasEvent object, which also include the world-coordinates of the Event.

Overrides:
mousePressed in class SimObject

write

public void write(java.io.PrintWriter pw)
Description copied from class: GenericGate
write "versionId" and gate delay "t_delay"

Overrides:
write in class GenericGate

initialize

public boolean initialize(java.lang.String s)
Description copied from class: GenericGate
initialize a GenericGate from a String that contains the integer version id of this gate and its propagation delay (in seconds), e.g. '1001 0.5E-8'.

Overrides:
initialize in class GenericGate

showState

public void showState()