0da1c5dcca
First commit of the 4.5 version (latest version available)
544 lines
25 KiB
HTML
544 lines
25 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc (build 1.6.0_33) on Tue Aug 20 12:20:42 EDT 2013 -->
|
|
<TITLE>
|
|
Simulator
|
|
</TITLE>
|
|
|
|
<META NAME="date" CONTENT="2013-08-20">
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
|
|
|
|
<SCRIPT type="text/javascript">
|
|
function windowTitle()
|
|
{
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="Simulator";
|
|
}
|
|
}
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
</NOSCRIPT>
|
|
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
<HR>
|
|
|
|
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<A NAME="navbar_top"><!-- --></A>
|
|
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../mars/simulator/ProgramArgumentList.html" title="class in mars.simulator"><B>PREV CLASS</B></A>
|
|
<A HREF="../../mars/simulator/Simulator.StopListener.html" title="interface in mars.simulator"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../index.html?mars/simulator/Simulator.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="Simulator.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_top"></A>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
|
|
<HR>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<H2>
|
|
<FONT SIZE="-1">
|
|
mars.simulator</FONT>
|
|
<BR>
|
|
Class Simulator</H2>
|
|
<PRE>
|
|
<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
|
|
<IMG SRC="../../resources/inherit.gif" ALT="extended by "><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Observable.html?is-external=true" title="class or interface in java.util">java.util.Observable</A>
|
|
<IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>mars.simulator.Simulator</B>
|
|
</PRE>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public class <B>Simulator</B><DT>extends <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Observable.html?is-external=true" title="class or interface in java.util">Observable</A></DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
Used to simulate the execution of an assembled MIPS program.
|
|
<P>
|
|
|
|
<P>
|
|
<DL>
|
|
<DT><B>Author:</B></DT>
|
|
<DD>Pete Sanderson</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<P>
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
|
|
<A NAME="nested_class_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Nested Class Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static interface</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.StopListener.html" title="interface in mars.simulator">Simulator.StopListener</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
|
|
<A NAME="field_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Field Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.html#BREAKPOINT">BREAKPOINT</A></B></CODE>
|
|
|
|
<BR>
|
|
various reasons for simulate to end...</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.html#CLIFF_TERMINATION">CLIFF_TERMINATION</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.html#EXCEPTION">EXCEPTION</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.html#externalInterruptingDevice">externalInterruptingDevice</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.html#MAX_STEPS">MAX_STEPS</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.html#NO_DEVICE">NO_DEVICE</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.html#NORMAL_TERMINATION">NORMAL_TERMINATION</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.html#PAUSE_OR_STOP">PAUSE_OR_STOP</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<A NAME="method_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Method Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.html#addStopListener(mars.simulator.Simulator.StopListener)">addStopListener</A></B>(<A HREF="../../mars/simulator/Simulator.StopListener.html" title="interface in mars.simulator">Simulator.StopListener</A> l)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static <A HREF="../../mars/simulator/Simulator.html" title="class in mars.simulator">Simulator</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.html#getInstance()">getInstance</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the Simulator object</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>static boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.html#inDelaySlot()">inDelaySlot</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Determine whether or not the next instruction to be executed is in a
|
|
"delay slot".</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.html#removeStopListener(mars.simulator.Simulator.StopListener)">removeStopListener</A></B>(<A HREF="../../mars/simulator/Simulator.StopListener.html" title="interface in mars.simulator">Simulator.StopListener</A> l)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.html#simulate(mars.MIPSprogram, int, int, int[], javax.swing.AbstractAction)">simulate</A></B>(<A HREF="../../mars/MIPSprogram.html" title="class in mars">MIPSprogram</A> p,
|
|
int pc,
|
|
int maxSteps,
|
|
int[] breakPoints,
|
|
<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/javax/swing/AbstractAction.html?is-external=true" title="class or interface in javax.swing">AbstractAction</A> actor)</CODE>
|
|
|
|
<BR>
|
|
Simulate execution of given MIPS program.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../mars/simulator/Simulator.html#stopExecution(javax.swing.AbstractAction)">stopExecution</A></B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/javax/swing/AbstractAction.html?is-external=true" title="class or interface in javax.swing">AbstractAction</A> actor)</CODE>
|
|
|
|
<BR>
|
|
Set the volatile stop boolean variable checked by the execution
|
|
thread at the end of each MIPS instruction execution.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="methods_inherited_from_class_java.util.Observable"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
|
<TH ALIGN="left"><B>Methods inherited from class java.util.<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Observable.html?is-external=true" title="class or interface in java.util">Observable</A></B></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Observable.html?is-external=true#addObserver(java.util.Observer)" title="class or interface in java.util">addObserver</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Observable.html?is-external=true#clearChanged()" title="class or interface in java.util">clearChanged</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Observable.html?is-external=true#countObservers()" title="class or interface in java.util">countObservers</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Observable.html?is-external=true#deleteObserver(java.util.Observer)" title="class or interface in java.util">deleteObserver</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Observable.html?is-external=true#deleteObservers()" title="class or interface in java.util">deleteObservers</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Observable.html?is-external=true#hasChanged()" title="class or interface in java.util">hasChanged</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Observable.html?is-external=true#notifyObservers()" title="class or interface in java.util">notifyObservers</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Observable.html?is-external=true#notifyObservers(java.lang.Object)" title="class or interface in java.util">notifyObservers</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Observable.html?is-external=true#setChanged()" title="class or interface in java.util">setChanged</A></CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
|
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
|
|
<A NAME="field_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Field Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="NO_DEVICE"><!-- --></A><H3>
|
|
NO_DEVICE</H3>
|
|
<PRE>
|
|
public static final int <B>NO_DEVICE</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#mars.simulator.Simulator.NO_DEVICE">Constant Field Values</A></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="externalInterruptingDevice"><!-- --></A><H3>
|
|
externalInterruptingDevice</H3>
|
|
<PRE>
|
|
public static volatile int <B>externalInterruptingDevice</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="BREAKPOINT"><!-- --></A><H3>
|
|
BREAKPOINT</H3>
|
|
<PRE>
|
|
public static final int <B>BREAKPOINT</B></PRE>
|
|
<DL>
|
|
<DD>various reasons for simulate to end...
|
|
<P>
|
|
<DL>
|
|
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#mars.simulator.Simulator.BREAKPOINT">Constant Field Values</A></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="EXCEPTION"><!-- --></A><H3>
|
|
EXCEPTION</H3>
|
|
<PRE>
|
|
public static final int <B>EXCEPTION</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#mars.simulator.Simulator.EXCEPTION">Constant Field Values</A></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="MAX_STEPS"><!-- --></A><H3>
|
|
MAX_STEPS</H3>
|
|
<PRE>
|
|
public static final int <B>MAX_STEPS</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#mars.simulator.Simulator.MAX_STEPS">Constant Field Values</A></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="NORMAL_TERMINATION"><!-- --></A><H3>
|
|
NORMAL_TERMINATION</H3>
|
|
<PRE>
|
|
public static final int <B>NORMAL_TERMINATION</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#mars.simulator.Simulator.NORMAL_TERMINATION">Constant Field Values</A></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="CLIFF_TERMINATION"><!-- --></A><H3>
|
|
CLIFF_TERMINATION</H3>
|
|
<PRE>
|
|
public static final int <B>CLIFF_TERMINATION</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#mars.simulator.Simulator.CLIFF_TERMINATION">Constant Field Values</A></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="PAUSE_OR_STOP"><!-- --></A><H3>
|
|
PAUSE_OR_STOP</H3>
|
|
<PRE>
|
|
public static final int <B>PAUSE_OR_STOP</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#mars.simulator.Simulator.PAUSE_OR_STOP">Constant Field Values</A></DL>
|
|
</DL>
|
|
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
|
|
<A NAME="method_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Method Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="getInstance()"><!-- --></A><H3>
|
|
getInstance</H3>
|
|
<PRE>
|
|
public static <A HREF="../../mars/simulator/Simulator.html" title="class in mars.simulator">Simulator</A> <B>getInstance</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the Simulator object
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>the Simulator object in use</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="inDelaySlot()"><!-- --></A><H3>
|
|
inDelaySlot</H3>
|
|
<PRE>
|
|
public static boolean <B>inDelaySlot</B>()</PRE>
|
|
<DL>
|
|
<DD>Determine whether or not the next instruction to be executed is in a
|
|
"delay slot". This means delayed branching is enabled, the branch
|
|
condition has evaluated true, and the next instruction executed will
|
|
be the one following the branch. It is said to occupy the "delay slot."
|
|
Normally programmers put a nop instruction here but it can be anything.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>true if next instruction is in delay slot, false otherwise.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="simulate(mars.MIPSprogram, int, int, int[], javax.swing.AbstractAction)"><!-- --></A><H3>
|
|
simulate</H3>
|
|
<PRE>
|
|
public boolean <B>simulate</B>(<A HREF="../../mars/MIPSprogram.html" title="class in mars">MIPSprogram</A> p,
|
|
int pc,
|
|
int maxSteps,
|
|
int[] breakPoints,
|
|
<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/javax/swing/AbstractAction.html?is-external=true" title="class or interface in javax.swing">AbstractAction</A> actor)
|
|
throws <A HREF="../../mars/ProcessingException.html" title="class in mars">ProcessingException</A></PRE>
|
|
<DL>
|
|
<DD>Simulate execution of given MIPS program. It must have already been assembled.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>p</CODE> - The MIPSprogram to be simulated.<DD><CODE>pc</CODE> - address of first instruction to simulate; this goes into program counter<DD><CODE>maxSteps</CODE> - maximum number of steps to perform before returning false (0 or less means no max)<DD><CODE>breakPoints</CODE> - array of breakpoint program counter values, use null if none<DD><CODE>actor</CODE> - the GUI component responsible for this call, usually GO or STEP. null if none.
|
|
<DT><B>Returns:</B><DD>true if execution completed, false otherwise
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../mars/ProcessingException.html" title="class in mars">ProcessingException</A></CODE> - Throws exception if run-time exception occurs.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="stopExecution(javax.swing.AbstractAction)"><!-- --></A><H3>
|
|
stopExecution</H3>
|
|
<PRE>
|
|
public void <B>stopExecution</B>(<A HREF="http://docs.oracle.com/javase/1.5.0/docs/api/javax/swing/AbstractAction.html?is-external=true" title="class or interface in javax.swing">AbstractAction</A> actor)</PRE>
|
|
<DL>
|
|
<DD>Set the volatile stop boolean variable checked by the execution
|
|
thread at the end of each MIPS instruction execution. If variable
|
|
is found to be true, the execution thread will depart
|
|
gracefully so the main thread handling the GUI can take over.
|
|
This is used by both STOP and PAUSE features.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="addStopListener(mars.simulator.Simulator.StopListener)"><!-- --></A><H3>
|
|
addStopListener</H3>
|
|
<PRE>
|
|
public void <B>addStopListener</B>(<A HREF="../../mars/simulator/Simulator.StopListener.html" title="interface in mars.simulator">Simulator.StopListener</A> l)</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="removeStopListener(mars.simulator.Simulator.StopListener)"><!-- --></A><H3>
|
|
removeStopListener</H3>
|
|
<PRE>
|
|
public void <B>removeStopListener</B>(<A HREF="../../mars/simulator/Simulator.StopListener.html" title="interface in mars.simulator">Simulator.StopListener</A> l)</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<HR>
|
|
|
|
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<A NAME="navbar_bottom"><!-- --></A>
|
|
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../mars/simulator/ProgramArgumentList.html" title="class in mars.simulator"><B>PREV CLASS</B></A>
|
|
<A HREF="../../mars/simulator/Simulator.StopListener.html" title="interface in mars.simulator"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../index.html?mars/simulator/Simulator.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="Simulator.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
|
|
</BODY>
|
|
</HTML>
|