jaga.pj.circuits
Class SimulatorLogicElement

java.lang.Object
  |
  +--jaga.pj.circuits.SimulatorLogicElement
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
SimulatorDelayLE

public abstract class SimulatorLogicElement
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

A LogicElement has one output and any number of inputs. It also has a configurable output delay in simulator clock ticks.

See Also:
Serialized Form

Field Summary
 boolean currentOutput
           
 
Constructor Summary
SimulatorLogicElement()
           
 
Method Summary
abstract  void connect(SimulatorLogicElement[] connections)
           
 SimulatorLogicElement getClone()
           
abstract  SimulatorLogicElement[] getInputs()
          Should return the inputs of this LE
abstract  boolean getNow()
           
abstract  void randomReset()
          Any state within the element is restored to a random value.
abstract  void refreshOutput()
           
abstract  void reset()
          Any state within the element is restored to its startup default.
abstract  void sampleInputs()
           
abstract  void setNow(boolean v)
          Sets the current value to 'v', the future behaviour of the Variable is not affected, so if it was going to change in time 't' it still will.
static void setRandomSeed(long seed)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentOutput

public boolean currentOutput
Constructor Detail

SimulatorLogicElement

public SimulatorLogicElement()
Method Detail

setRandomSeed

public static void setRandomSeed(long seed)

setNow

public abstract void setNow(boolean v)
Sets the current value to 'v', the future behaviour of the Variable is not affected, so if it was going to change in time 't' it still will.

getNow

public abstract boolean getNow()

connect

public abstract void connect(SimulatorLogicElement[] connections)

sampleInputs

public abstract void sampleInputs()

refreshOutput

public abstract void refreshOutput()

reset

public abstract void reset()
Any state within the element is restored to its startup default.

getInputs

public abstract SimulatorLogicElement[] getInputs()
Should return the inputs of this LE

randomReset

public abstract void randomReset()
Any state within the element is restored to a random value.

getClone

public SimulatorLogicElement getClone()