hades.models.gates
Class GenericGate

java.lang.Object
  extended byhades.simulator.SimObject
      extended byhades.models.gates.GenericGate
All Implemented Interfaces:
java.lang.Cloneable, ContextToolTip, java.io.Serializable, Simulatable
Direct Known Subclasses:
And2, And3, And4, And4Neg2, And6, AudioPlayer, BitlineBuffer, Buffer, ClockGen, ClockGen2, ClockGenWithAutoStop, CounterRE, DelayNode, Demux14, DiodeSwitch, GalFuse, Inv, InvOpenCollector, Ipin, LFSRAnalyzer, LFSRGenerator, Mux21, Mux41, Nand2, Nand3, Nand4, NandMetastable2, NandMetastable3, Nor2, Nor3, Nor4, Opin, Or2, Or3, Or4, Or6, RandomBitGenerator, RomDiode, Stimulus, Switch, Tri, WeakBuffer, Xnor2, Xor2

public class GenericGate
extends SimObject
implements Simulatable, ContextToolTip, java.io.Serializable

GenericGate - base class to provide common stuff for logic gates. All Signals are expected to be StdLogic1164 objects. This class provides one timing parameter for the gate propagation delay.

See Also:
Serialized Form

Field Summary
protected  double t_delay
           
 
Fields inherited from class hades.simulator.SimObject
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible
 
Constructor Summary
GenericGate()
           
 
Method Summary
 void configure()
          create and display a 'ConfigDialog' to set the parameters for a SimObject.
 SimObject copy()
          create a copy of the current GenericGate with the same gate delay.
 void elaborate(java.lang.Object arg)
          elaborate: just store a reference to the current simulator
 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.
 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 scheduleEvent(Signal signal, double time, StdLogic1164 value, Port port)
          utility method to schedule a simulator event at the given simulation time.
 void scheduleEventAfter(Signal signal, double delay, StdLogic1164 value, Port port)
          utility method to schedule a simulator event, after delay seconds from the current simulation time.
 void scheduleOutputValue(Port port, StdLogic1164 value, double time)
          utility method to schedule a simulator event at the given simulation time
 void scheduleOutputValueAfter(Port port, StdLogic1164 value, double delay)
          utility method to schedule a simulator event, after delay seconds from the current simulation time.
 void setDelay(double t)
           
 void setDelay(java.lang.String s)
           
 void write(java.io.PrintWriter ps)
          write "versionId" and gate delay "t_delay"
 
Methods inherited from class hades.simulator.SimObject
constructDynamicSymbol, evaluate, 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, 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
evaluate, message
 

Field Detail

t_delay

protected double t_delay
Constructor Detail

GenericGate

public GenericGate()
Method Detail

getDelay

public double getDelay()

setDelay

public void setDelay(double t)

setDelay

public void setDelay(java.lang.String s)

configure

public void configure()
Description copied from class: SimObject
create and display a 'ConfigDialog' to set the parameters for a SimObject. The default ConfigDialog for the base class (SimObject) itself is empty except for the 'instance name' of the SimObject.

Overrides:
configure in class SimObject

initialize

public 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. '1001 0.5E-8'.

Overrides:
initialize in class SimObject

write

public void write(java.io.PrintWriter ps)
write "versionId" and gate delay "t_delay"

Overrides:
write in class SimObject

elaborate

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

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

scheduleEvent

public void scheduleEvent(Signal signal,
                          double time,
                          StdLogic1164 value,
                          Port port)
utility method to schedule a simulator event at the given simulation time.


scheduleEventAfter

public void scheduleEventAfter(Signal signal,
                               double delay,
                               StdLogic1164 value,
                               Port port)
utility method to schedule a simulator event, after delay seconds from the current simulation time.


scheduleOutputValue

public void scheduleOutputValue(Port port,
                                StdLogic1164 value,
                                double time)
utility method to schedule a simulator event at the given simulation time


scheduleOutputValueAfter

public void scheduleOutputValueAfter(Port port,
                                     StdLogic1164 value,
                                     double delay)
utility method to schedule a simulator event, after delay seconds from the current simulation time.


copy

public SimObject copy()
create a copy of the current GenericGate with the same gate delay.

Overrides:
copy in class SimObject

getToolTip

public 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.

Specified by:
getToolTip in interface ContextToolTip
Overrides:
getToolTip in class SimObject