|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cmpware.ide.MpModel
public class MpModel
This class implements the Eclipse IDE model.
Copyright (c) 2004, 2005, 2006, 2007 Cmpware, Inc. All Rights Reserved.
| Nested Class Summary | |
|---|---|
(package private) class |
MpModel.Go
This class steps the simulation using the Display.syncExec() method to run in the Eclipse IDE thread. |
(package private) class |
MpModel.Step
This inner class is used to step in a Timer, Because this is in a differnt thread, it will have to be run under Display syncExec(). |
| Field Summary | |
|---|---|
static int |
ALLOCATE_EVENT
An array re-allocate event |
static int |
BREAKPOINT_EVENT
A breakpoint event |
static java.lang.String |
copyright
Copyright string |
static int |
MEMORY_CHANGE_EVENT
A memory change event |
static int |
PROCESSOR_SELECT_EVENT
A processor selection event |
static int |
PROFILE_CHANGE_EVENT
A Profile Change event |
static int |
PROFILE_CLEAR_EVENT
A Profile Clear event |
static int |
RESET_EVENT
An array reset event |
static int |
STEP_EVENT
A clock step event |
static int |
UNDEFINED_EVENT
An undefined event |
| Constructor Summary | |
|---|---|
MpModel()
|
|
| Method Summary | |
|---|---|
static void |
addStateChangeListener(IListener l)
This method adds a state change listener to the model. |
static void |
allocate()
This method allocates the processor from information stored from the preference pages. |
static Processor |
getCurrentProcessor()
This method returns the current processor. |
static Multiprocessor |
getMultiprocessor()
Returns the model's multiprocessor object. |
void |
go()
This method starts the simulation. |
static void |
load(Elf elf)
This method loads an ELF (or binary) file into the memory of the current processor and fires a state change event. |
static void |
loadAll(Elf elf)
This method loads an ELF (or binary) file into the memory of all of the processors and fires a state change event. |
static void |
notifyStateChangeListeners(int eventType)
This method is called whenever a state change event occurs. |
void |
propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
|
static void |
reloadAll()
This method reloads the most recently loaded ELF (or binary) file into the memory of all of the processors and fires a state change event. |
static void |
removeStateChangeListener(IListener l)
This method removes a state change listener to the model. |
static void |
reset()
This method resets the multiprocessor and notifies the state change listeners. |
static void |
setCurrentProcessor(int row,
int col)
This method sets the current processor. |
static int |
step(boolean msg)
This method steps the multiprocessor by at least the number of cycles in the stepSize parameter. |
static void |
stop(boolean msg)
This method stops a running simulation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String copyright
public static final int UNDEFINED_EVENT
public static final int ALLOCATE_EVENT
public static final int RESET_EVENT
public static final int STEP_EVENT
public static final int MEMORY_CHANGE_EVENT
public static final int PROCESSOR_SELECT_EVENT
public static final int BREAKPOINT_EVENT
public static final int PROFILE_CLEAR_EVENT
public static final int PROFILE_CHANGE_EVENT
| Constructor Detail |
|---|
public MpModel()
| Method Detail |
|---|
public static int step(boolean msg)
msg - Determines whether or not to print
a status message. Sometimes you want to step
quietly, other times you want to announce
a step.
public static void reset()
public static void load(Elf elf)
throws MemoryAccessException
elf - The ELF file to be loaded.
MemoryAccessException - if an attempt is made
to write to invalid processor memory.
public static void loadAll(Elf elf)
throws MemoryAccessException
elf - The ELF file to be loaded.
MemoryAccessException - if an attempt is made
to write to invalid processor memory.
public static void reloadAll()
throws MemoryAccessException
MemoryAccessException - if an attempt is made
to write to invalid processor memory.public static Processor getCurrentProcessor()
public static void setCurrentProcessor(int row,
int col)
row - the processor row.col - the processor column.public static void addStateChangeListener(IListener l)
l - The state change listener.public static void removeStateChangeListener(IListener l)
l - The state change listener.public static Multiprocessor getMultiprocessor()
public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
propertyChange in interface org.eclipse.jface.util.IPropertyChangeListener
public static void allocate()
throws ProcessorException,
NetworkException,
LinkException,
CustomArrayException,
SystemMemoryException
ProcessorException
NetworkException
LinkException
CustomArrayException
SystemMemoryExceptionpublic static void notifyStateChangeListeners(int eventType)
eventType - a code indicating the event type.public static void stop(boolean msg)
msg - Determines whether or not to print
a status message. Sometimes you want to stop
quietly, other times you want to announce
a halt.public void go()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||