|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mars.mips.hardware.Coprocessor0
Represents Coprocessor 0. We will use only its interrupt/exception registers.
Field Summary | |
static int |
CAUSE
|
static int |
DEFAULT_STATUS_VALUE
|
static int |
EPC
|
static int |
EXCEPTION_LEVEL
|
static int |
STATUS
|
static int |
VADDR
Coprocessor register names |
Constructor Summary | |
Coprocessor0()
|
Method Summary | |
static void |
addRegistersObserver(java.util.Observer observer)
Each individual register is a separate object and Observable. |
static int |
getNumber(java.lang.String n)
For getting the number representation of the register. |
static Register |
getRegister(java.lang.String rname)
Get register object corresponding to given name. |
static Register[] |
getRegisters()
For returning the set of registers. |
static int |
getValue(int num)
Returns the value of the register who's number is num. |
static void |
resetRegisters()
Method to reinitialize the values of the registers. |
static void |
showRegisters()
Method for displaying the register values for debugging. |
static int |
updateRegister(int num,
int val)
This method updates the register value who's number is num. |
static int |
updateRegister(java.lang.String n,
int val)
Sets the value of the register given to the value given. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int VADDR
public static final int STATUS
public static final int CAUSE
public static final int EPC
public static final int EXCEPTION_LEVEL
public static final int DEFAULT_STATUS_VALUE
Constructor Detail |
public Coprocessor0()
Method Detail |
public static void showRegisters()
public static int updateRegister(java.lang.String n, int val)
n
- name of register to set the value of ($n, where n is reg number).val
- The desired value for the register.
public static int updateRegister(int num, int val)
num
- Number of register to set the value of.val
- The desired value for the register.
public static int getValue(int num)
num
- The register number.
public static int getNumber(java.lang.String n)
n
- The string formatted register name to look for.
public static Register[] getRegisters()
public static Register getRegister(java.lang.String rname)
rname
- The register name, in $0 format.
public static void resetRegisters()
public static void addRegistersObserver(java.util.Observer observer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |