|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cmpware.cmp.Memory
com.cmpware.cmp.Processor
com.cmpware.tools.AutoModel
com.cmpware.cmp.models.MIPS32
public class MIPS32
This is an AutoModel implementation of the MIPS32 processor.
Copyright (c) 2006 Cmpware, Inc. All Rights Reserved.
| Nested Class Summary | |
|---|---|
(package private) static class |
MIPS32.SREG
This class defines the Special Register indicies |
| Nested classes/interfaces inherited from class com.cmpware.tools.AutoModel |
|---|
AutoModel.Asm, AutoModel.Decode, AutoModel.Field, AutoModel.Format, AutoModel.Function, AutoModel.Instruction, AutoModel.Symbol |
| Field Summary | |
|---|---|
protected static AutoModel.Field |
f_imm16
|
protected static AutoModel.Field |
f_imm26
|
protected static AutoModel.Field |
f_rd
|
protected static AutoModel.Field |
f_rs
|
protected static AutoModel.Field |
f_rt
|
protected static AutoModel.Field |
f_sa
|
protected int |
imm16
The zero-extended 16-bit immediate data |
protected static AutoModel.Format |
immediate
|
protected int |
instrIndex
The lower 28-bits of jump target address (shifted right 2) |
protected static AutoModel.Format |
jump
|
protected static AutoModel.Field |
op
|
protected static AutoModel.Field |
op2
|
protected int |
rd
The value in the 'd' register |
protected static AutoModel.Format |
regToReg
|
protected static AutoModel.Format |
regToReg2
|
protected int |
rs
The value in the 's' register |
protected int |
rt
The value in the 't' register |
protected int |
sa
The value in the 'sa' value |
protected int |
simm16
The sign-extended 16-bit immediate data |
| Fields inherited from class com.cmpware.tools.AutoModel |
|---|
copyright, currentInstr, currentInstrType, instructionSizes, TRACE |
| Fields inherited from class com.cmpware.cmp.Processor |
|---|
bkpt, branchAddr, branchDelay, breakpointHit, currentBranchDelay, currentInstrCode, cycleCount, elf, idlePower, iMix, instructionSize, name, noop, opcodeName, pc, prevInstr, prevInstrCode, r, regName, runningPower, sr, sregName, stall, stallCount |
| Fields inherited from class com.cmpware.cmp.Memory |
|---|
BIG, LITTLE |
| Constructor Summary | |
|---|---|
MIPS32()
The constructor |
|
| Method Summary | |
|---|---|
protected static int |
addCarry(int src1,
int src2,
int result)
This method is used to determine if an add carry has occurred. |
protected static boolean |
isAddOverflow(int result,
int src1,
int src2)
This method is used to determine if an add overflow has occurred. |
protected static boolean |
isSubOverflow(int src1,
int src2,
int result)
This method is used to determine if a sub overflow has occurred. |
static void |
main(java.lang.String[] args)
This enables the stand-alone assembler and disassembler. |
void |
postExecute(int instr)
This method is called immediately after execution and may be overloaded to do things like save instruction field values to locals. |
void |
preExecute(int instr)
This method is called immediately before execution and may be overloaded to do things like save instruction field values to locals. |
protected static AutoModel.Decode |
regimm(int a)
This is just a simple helper function used in decoding 'Regimm' instructions. |
void |
reset()
This method resets the processor. |
protected static int |
sign(int a)
This method returns the sign bit for 32 bit value. |
protected static AutoModel.Decode |
simple(int a)
This is a helper function used in decoding simple instructions. |
protected static AutoModel.Decode |
special(int a)
This is just a simple helper function used in decoding 'Special' instructions. |
protected static AutoModel.Decode |
special2(int a)
This is just a simple helper function used in decoding 'Special2' instructions. |
protected static int |
subCarry(int src1,
int src2,
int result)
This method is used to determine if a sub carry has occurred. |
| Methods inherited from class com.cmpware.tools.AutoModel |
|---|
advancePC, asmFixup, bitsToBytes, concatenate, dasm, dasm, dasmFixup, decode, defineInstructions, execute, fetch, fetch, getInstruction, getInstructions, getInstructionSizes, getPC, getSymbolNames, instrMatch, main, setPC, signExtend, signExtend, toHexString, toHexString, toLong, traceOff, traceOn |
| Methods inherited from class com.cmpware.cmp.Memory |
|---|
addInput, addMemory, addOutput, getEndian, getLocalMemory, getMemoryManager, getMmio, getProfile, hexDump, hexDump, isReadable, isValidAddress, isWriteable, profile, read, read, read16, read24, read32, read64, removeMemory, resize, setEndian, size, toInt, toShort, write, write, write16, write24, write32, write64 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int rs
protected int rd
protected int rt
protected int sa
protected int imm16
protected int simm16
protected int instrIndex
protected static final AutoModel.Field op
protected static final AutoModel.Field f_sa
protected static final AutoModel.Field f_rd
protected static final AutoModel.Field f_rt
protected static final AutoModel.Field f_rs
protected static final AutoModel.Field f_imm16
protected static final AutoModel.Field op2
protected static final AutoModel.Field f_imm26
protected static final AutoModel.Format regToReg
protected static final AutoModel.Format regToReg2
protected static final AutoModel.Format immediate
protected static final AutoModel.Format jump
| Constructor Detail |
|---|
public MIPS32()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - the command line arguments.public void reset()
reset in class Processorpublic void preExecute(int instr)
AutoModel
preExecute in class AutoModelinstr - The instructionpublic void postExecute(int instr)
AutoModel
postExecute in class AutoModelinstr - The instruction
protected static boolean isAddOverflow(int result,
int src1,
int src2)
result - The result of the operation on
the src1 and src2 parameters.src1 - The first source operand.src2 - The second source operand.
protected static boolean isSubOverflow(int src1,
int src2,
int result)
src1 - The first source operand.src2 - The second source operand.result - The result of the operation on
the src1 and src2 parameters.
protected static int addCarry(int src1,
int src2,
int result)
src1 - The first source operand.src2 - The second source operand.result - The result of the operation on
the src1 and src2 parameters.
protected static int subCarry(int src1,
int src2,
int result)
src1 - The first source operand.src2 - The second source operand.result - The result of the operation on
the src1 and src2 parameters.
protected static int sign(int a)
a - The 32 bit value.
protected static AutoModel.Decode simple(int a)
a - The code for the op field.
protected static AutoModel.Decode special(int a)
a - The code for the op2 field.
protected static AutoModel.Decode special2(int a)
a - The code for the op2 field.
protected static AutoModel.Decode regimm(int a)
a - The code for the rt field.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||