edu.cmu.emulator
Class Emulator

java.lang.Object
  extended by edu.cmu.emulator.Emulator

public class Emulator
extends Object

Emulator - The main class in charge of running the emulator. This class contains all the main objects that need to be accessed from user code; The EmuWorld, SignalEnvironment, DaemonCommunicator, WorldViewer and the EventQueue. Startup proceeds in two phases. First init() is called to initialize data structures. start() is then called to begin actual emulation. Note that all modules must not begin actual emulation or assume the presence of real hardware before start() is called. This allows utility code (e.g. verilog generation code) to construct an emulator and access data structures without actually performing emulation.


Field Summary
protected static String BUILD_NUMBER
           
protected  CommReceiver commReceiver
           
protected  CommSender commSender
           
protected  DaemonCommunicator daemonCommunicator
           
private static String DEMO_MODE_PROP
           
static String DEMO_SCHED_SERVER
           
static boolean demoMode
           
protected  DSPConfiguration dspConfiguration
           
protected  EmuHWConfiguration emuHWConfiguration
           
protected  EmuEventQueue eventQueue
           
protected  Thread eventT
           
protected  GUIServerControl guiServerControl
           
protected  GUISettings guiSettings
           
protected  Logger log
           
protected static String MAJOR_VERSION
           
private  boolean noGUI
           
private  SchedClient schedClient
           
protected  ScriptController scriptController
           
protected  SignalEnvironment sigEnv
           
private  String[][] userArgs
           
private  String[] userClassNames
           
private  String[] userCodeUrls
           
protected  EmuWorld world
           
protected  WorldDef worldDef
           
protected  WorldViewer worldViewer
           
 
Constructor Summary
Emulator()
          Constructor.
 
Method Summary
 CommSender getCommSender()
          Part of EmuControlInterface Implementation.
 DaemonCommunicator getDaemonCommunicator()
           
 EmuEventQueue getEmuEventQueue()
           
 EmuWorld getEmuWorld()
          Helper API for user code to obtain access to EmuWorld object in the emulator.
 GUISettings getGUISettings()
           
 EmuHWConfiguration getHWConfig()
           
 SignalEnvironment getSignalEnvironment()
           
 WorldDef getWorldDef()
           
 WorldViewer getWorldViewer()
          This should not be used within the core emulator code.
 ConfigFileParser init(String hwConfigFile, String pid, String eid, String emuConfigFile, boolean validate)
          Initializes the emulator by invoking the parser to parse the config file.
static void main(String[] args)
           
 void noGUI()
           
 void shutdown()
          Shuts down the emulator.
 void shutdownAndExit(int exitCode)
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

world

protected EmuWorld world

eventQueue

protected EmuEventQueue eventQueue

worldViewer

protected WorldViewer worldViewer

sigEnv

protected SignalEnvironment sigEnv

scriptController

protected ScriptController scriptController

daemonCommunicator

protected DaemonCommunicator daemonCommunicator

eventT

protected Thread eventT

worldDef

protected WorldDef worldDef

dspConfiguration

protected DSPConfiguration dspConfiguration

emuHWConfiguration

protected EmuHWConfiguration emuHWConfiguration

commSender

protected CommSender commSender

commReceiver

protected CommReceiver commReceiver

guiServerControl

protected GUIServerControl guiServerControl

guiSettings

protected GUISettings guiSettings

userCodeUrls

private String[] userCodeUrls

userClassNames

private String[] userClassNames

userArgs

private String[][] userArgs

schedClient

private SchedClient schedClient

noGUI

private boolean noGUI

DEMO_MODE_PROP

private static final String DEMO_MODE_PROP
See Also:
Constant Field Values

DEMO_SCHED_SERVER

public static final String DEMO_SCHED_SERVER
See Also:
Constant Field Values

demoMode

public static final boolean demoMode

MAJOR_VERSION

protected static String MAJOR_VERSION

BUILD_NUMBER

protected static String BUILD_NUMBER

log

protected Logger log
Constructor Detail

Emulator

public Emulator()
Constructor.

Method Detail

noGUI

public void noGUI()

init

public ConfigFileParser init(String hwConfigFile,
                             String pid,
                             String eid,
                             String emuConfigFile,
                             boolean validate)
                      throws IOException
Initializes the emulator by invoking the parser to parse the config file. This method creates and initializes all the objects and threads required by the system.

Parameters:
hwConfigFile - Hardware configuration file. XXX undocumented!
pid - What is this? Nobody knows! XXX undocumented!
eid - What is this? Nobody knows! XXX undocumented!
emuconfigFile - The XML config file that defines the emulator and node properties and the user class files that need to be loaded.
Throws:
IOException

start

public void start()

getEmuWorld

public EmuWorld getEmuWorld()
Helper API for user code to obtain access to EmuWorld object in the emulator.

Returns:
The EmuWorld object

getSignalEnvironment

public SignalEnvironment getSignalEnvironment()

getEmuEventQueue

public EmuEventQueue getEmuEventQueue()

getWorldDef

public WorldDef getWorldDef()

getHWConfig

public EmuHWConfiguration getHWConfig()

getDaemonCommunicator

public DaemonCommunicator getDaemonCommunicator()

getGUISettings

public GUISettings getGUISettings()

shutdown

public void shutdown()
Shuts down the emulator. Called after the EventQueue exits. Stops the various threads running in the system.


shutdownAndExit

public void shutdownAndExit(int exitCode)

getCommSender

public CommSender getCommSender()
Part of EmuControlInterface Implementation.


getWorldViewer

public WorldViewer getWorldViewer()
This should not be used within the core emulator code. This may be safely used by user applications which require custom visualization.


main

public static void main(String[] args)


Copyright © 2013. All Rights Reserved.