Class ClockThread

  extended bybyucc.jhdl.apps.util.SwingWorker
      extended bybyucc.jhdl.apps.util.SimulatorThread
          extended bybyucc.jhdl.apps.util.ClockThread

public class ClockThread
extends SimulatorThread

This thread should be used from GUIs to execute steps or cycles of the simulator. This is important especially for long simulation runs that would otherwise lock up the GUI. If this Thread is used for any of the simulation control, it should be used for all of it. Also, to be sure that Stimulator events (puts to wires) are executed in the proper order relative to Clock events, make sure that you use StimulatorThreads as well.

It is crucial to note that ClockThreads are queued (in the SimulatorThread queue) in the order they are created, not necessarily in the order they are started by the creating thread.

Anthony L. Slade
See Also:

Constructor Summary
ClockThread(HWSystem hwsystem, boolean cycle, int number)
          Creates and queues up a new ClockThread.
Method Summary
 java.lang.Object construct()
          This is the SwingWorker method that gets called to do the work of this thread
Methods inherited from class byucc.jhdl.apps.util.SimulatorThread
addReturnedListener, finished, start
Methods inherited from class byucc.jhdl.apps.util.SwingWorker
get, getValue, interrupt
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ClockThread(HWSystem hwsystem,
                   boolean cycle,
                   int number)
Creates and queues up a new ClockThread.

hwsystem - the HWSystem to clock or step
cycle - If true, then the action will be to cycle, otherwise, it will be to step the simulator.
number - the number cycles or steps to perform.
Method Detail


public java.lang.Object construct()
This is the SwingWorker method that gets called to do the work of this thread

Specified by:
construct in class SwingWorker
some object representative of the work of this thread, in this case it is simply a successful message

Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.