|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mars.simulator.Simulator
Used to simulate the execution of an assembled MIPS program.
Field Summary | |
static int |
BREAKPOINT
various reasons for simulate to end... |
static int |
EXCEPTION
|
static int |
MAX_STEPS
|
static int |
NORMAL_TERMINATION
|
static int |
PAUSE_OR_STOP
|
Method Summary | |
static Simulator |
getInstance()
Returns the Simulator object |
boolean |
simulate(MIPSprogram p,
int pc,
int maxSteps,
int[] breakPoints,
javax.swing.AbstractAction actor)
Simulate execution of given MIPS program. |
void |
stopExecution(javax.swing.AbstractAction actor)
Set the volatile stop boolean variable checked by the execution thread at the end of each MIPS instruction execution. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int BREAKPOINT
public static final int EXCEPTION
public static final int MAX_STEPS
public static final int NORMAL_TERMINATION
public static final int PAUSE_OR_STOP
Method Detail |
public static Simulator getInstance()
public boolean simulate(MIPSprogram p, int pc, int maxSteps, int[] breakPoints, javax.swing.AbstractAction actor) throws ProcessingException
p
- The MIPSprogram to be simulated.pc
- address of first instruction to simulate; this goes into program countermaxSteps
- maximum number of steps to perform before returning false (0 or less means no max)breakPoints
- array of breakpoint program counter values, use null if noneactor
- the GUI component responsible for this call, usually GO or STEP. null if none.
ProcessingException
- Throws exception if run-time exception occurs.public void stopExecution(javax.swing.AbstractAction actor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |