jfrace
Class EmulatorThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--jfrace.EmulatorThread
All Implemented Interfaces:
java.lang.Runnable

public class EmulatorThread
extends java.lang.Thread

Thread running a group of CPUs asynchronously from the other ones.

Author:
Franze-Josef Elmer

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
EmulatorThread(CPU[] cpus, long yieldInterval, double clockFrequency, long adaptationTime, boolean printEffectiveClockFrequency, boolean debuging, int debugStart, int debugEnd, int debugStep)
          Create a new thread for the given group of CPUs.
 
Method Summary
 void run()
          Run emulation.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmulatorThread

public EmulatorThread(CPU[] cpus,
                      long yieldInterval,
                      double clockFrequency,
                      long adaptationTime,
                      boolean printEffectiveClockFrequency,
                      boolean debuging,
                      int debugStart,
                      int debugEnd,
                      int debugStep)
Create a new thread for the given group of CPUs.
Parameters:
cpus - CPUs to be run.
yieldInterval - Number of clock cycles between calls of the method Thread.yield().
clockFrequency - The clock frequency in MHz.
adaptationTime - Time interval in milliseconds between resetings of the time origin for the clock frequency algorithm.
printEffectiveClockFrequency - Print the effective clock frequency if true.
debuging - true in the case of debuging.
debugStart - Number of instruction when debuging starts.
debugEnd - Number of instruction when debuging ends. 0 if no end.
debugStep - Number of steps between two debug prints
Method Detail

run

public void run()
Run emulation.
Overrides:
run in class java.lang.Thread