|
||||||||||
| 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.ARC700
public class ARC700
This is an AutoModel implementation of the ARC700 processor.
Copyright (c) 2006 Cmpware, Inc. All Rights Reserved.
| Nested Class Summary | |
|---|---|
static class |
ARC700.BRCC
|
static class |
ARC700.CC
|
static class |
ARC700.OP
|
static class |
ARC700.REG
This class defines some Register indicies |
static class |
ARC700.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 |
a
|
protected static AutoModel.Field |
a16
|
protected static AutoModel.Field |
aa1
|
protected static AutoModel.Field |
aa2
|
protected static AutoModel.Field |
aa3
|
protected static AutoModel.Symbol[] |
aaSymbols
The Load write-back mode (.aa) Symbols |
protected static AutoModel.Field |
all32
|
protected static AutoModel.Format |
allbits
|
protected static AutoModel.Field |
b
|
protected static AutoModel.Field |
b16
|
protected static AutoModel.Field |
bhi
|
protected static AutoModel.Field |
bit15
|
protected static AutoModel.Field |
bit16
|
protected static AutoModel.Field |
bit17
|
protected static AutoModel.Field |
bit4
|
protected static AutoModel.Field |
bit5
|
protected static AutoModel.Field |
c
|
protected int |
c_flag
Shadow C (carry) flag |
protected static AutoModel.Field |
c16
|
protected int |
cc
The condition code |
protected static AutoModel.Symbol[] |
ccSymbols
The condition code symbols |
static java.lang.String |
copyright
Copyright string |
protected int |
dest
The destination (typically an index into a register set) |
protected static AutoModel.Field |
di1
|
protected static AutoModel.Field |
di2
|
protected static AutoModel.Field |
di3
|
protected static AutoModel.Symbol[] |
diSymbols
The Data Cache mode (.di) Symbols |
protected int |
e1_flag
Shadow E1 (interrupt mask) flag |
protected int |
e2_flag
Shadow E2 (interrupt mask) flag |
protected static AutoModel.Field |
f
|
protected static AutoModel.Format |
fmt_abc
|
protected static AutoModel.Format |
fmt_abu6
|
protected static AutoModel.Format |
fmt_bbc
|
protected static AutoModel.Format |
fmt_bbs12
|
protected static AutoModel.Format |
fmt_bbu6
|
protected static AutoModel.Format |
fmt_bc
|
protected static AutoModel.Format |
fmt_bcs9
|
protected static AutoModel.Format |
fmt_bs12
|
protected static AutoModel.Format |
fmt_bu6
|
protected static AutoModel.Format |
fmt_bu6s9
|
protected static AutoModel.Format |
fmt_c
|
protected static AutoModel.Format |
fmt_cbs9
|
protected static AutoModel.Format |
fmt_dbc
|
protected static AutoModel.Format |
fmt_dbu6
|
protected static AutoModel.Format |
fmt_jc
|
protected static AutoModel.Format |
fmt_ju6
|
protected static AutoModel.Format |
fmt_ldabc
|
protected static AutoModel.Format |
fmt_ldabs9
|
protected static AutoModel.Format |
fmt_qbc
|
protected static AutoModel.Format |
fmt_qbu6
|
protected static AutoModel.Format |
fmt_s12
|
protected static AutoModel.Format |
fmt_s13
|
protected static AutoModel.Format |
fmt_s21
|
protected static AutoModel.Format |
fmt_s25
|
protected static AutoModel.Format |
fmt_u6
|
protected static AutoModel.Format |
fmt_u7
|
protected static AutoModel.Format |
fmt16
|
protected static AutoModel.Format |
fmt16_abc
|
protected static AutoModel.Format |
fmt16_bbh
|
protected static AutoModel.Format |
fmt16_bc
|
protected static AutoModel.Format |
fmt16_bspu7
|
protected static AutoModel.Format |
fmt16_cbu3
|
protected static AutoModel.Symbol[] |
fSymbols
The Flags update flag |
protected static AutoModel.Field |
h16
|
protected static AutoModel.Field |
h16hi
|
protected static AutoModel.Field |
ldop2
|
protected int |
n_flag
Shadow N (negative) flag |
protected static AutoModel.Field |
nd
|
protected static AutoModel.Symbol[] |
ndSymbols
The Delay Slot flag (.nd) Symbols |
protected static AutoModel.Field |
op
|
protected static AutoModel.Field |
op16
|
protected static AutoModel.Field |
op16_2
|
protected static AutoModel.Field |
op2
|
protected static AutoModel.Field |
op2b
|
protected static AutoModel.Field |
op3
|
protected static AutoModel.Field |
p
|
protected static AutoModel.Field |
q
|
protected int |
rd
The relative displacement |
protected static AutoModel.Symbol[] |
regSymbols
The General Purpose Register Symbols |
protected int |
s1_flag
Shadow S1 (saturate) flag |
protected static AutoModel.Field |
s10hi
|
protected static AutoModel.Field |
s11lo
|
protected static AutoModel.Field |
s12
|
protected static AutoModel.Field |
s13
|
protected int |
s2_flag
Shadow S2 (saturate) flag |
protected static AutoModel.Field |
s21
|
protected static AutoModel.Field |
s25
|
protected static AutoModel.Field |
s3_4
|
protected static AutoModel.Field |
s5_7
|
protected static AutoModel.Field |
s6hi
|
protected static AutoModel.Field |
s6lo
|
protected static AutoModel.Field |
s7
|
protected static AutoModel.Field |
s8lo
|
protected static AutoModel.Field |
s9_10
|
protected static AutoModel.Field |
s9hi
|
protected static AutoModel.Field |
sp16
|
protected int |
src1
The first source parameter |
protected int |
src2
The second source parameter |
static int[][] |
SREG_MAP
This maps the index used by the simulator to represent the special register address to the address used by hardware. |
protected static AutoModel.Symbol[] |
sregSymbols
The Special Purpose Register Symbols |
protected static AutoModel.Field |
t
|
protected static AutoModel.Field |
u3_16
|
protected static AutoModel.Field |
u6
|
protected static AutoModel.Field |
u7
|
protected static AutoModel.Field |
u7_16
|
protected int |
v_flag
Shadow V (overflow) flag |
protected static AutoModel.Field |
x1
|
protected static AutoModel.Field |
x2
|
protected static AutoModel.Symbol[] |
xSymbols
The Sign Extend flag (.x) Symbols |
protected int |
z_flag
Shadow Z (Zero) flag |
protected static AutoModel.Field |
zz1
|
protected static AutoModel.Field |
zz2
|
protected static AutoModel.Field |
zz3
|
protected static AutoModel.Symbol[] |
zzSymbols
The Data Size flag (.zz) Symbols |
| Fields inherited from class com.cmpware.tools.AutoModel |
|---|
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 | |
|---|---|
ARC700()
The constructor |
|
| Method Summary | |
|---|---|
static int |
addCarry(int src1,
int src2,
int result)
This method is used to determine if an add carry has occurred. |
static int |
addOverflow(int src1,
int src2,
int result)
This method is used to determine if an add overflow has occurred. |
protected static AutoModel.Decode |
bbit(int _op2b)
This is a helper function used in decoding the BBIT |
protected static AutoModel.Decode |
blcc()
This is a helper function used in decoding the BLcc ARC700 instructions. |
protected static AutoModel.Decode |
brcc()
This is a helper function used in decoding the BRcc ARC700 instructions. |
void |
dasmFixup(long instrData,
AutoModel.Instruction instr)
This method can be overloaded to fix up any problems or to do any clean-up in the disassembler. |
long |
fetch(int addr,
int bytes)
This method returns a long (64-bit) value based on the data at 'bytes' bytes of memory at address 'addr'. |
int |
getPC()
This method returns the current Program Counter. |
protected static AutoModel.Decode |
ld2()
This is a helper function used in decoding the LD ARC700 instructions. |
static void |
main(java.lang.String[] args)
This enables the stand-alone assembler and disassembler. |
protected static AutoModel.Decode |
op(int _op)
This is a helper function used in decoding simple one opcode ARC700 instructions. |
protected static AutoModel.Decode |
op(int _op,
int _op2)
This is a helper function used in decoding simple two opcode ARC700 instructions. |
protected static AutoModel.Decode |
op(int _op,
int _op2,
int _a)
This is a helper function used in decoding three opcode ARC700 instructions. |
protected static AutoModel.Decode |
op16(int _op)
This is a helper function used in decoding ARC700 16-bit instructions with a single decode field. |
protected static AutoModel.Decode |
op16(int _op,
int _op2)
This is a helper function used in decoding ARC700 16-bit instructions with two decode fields. |
protected static AutoModel.Decode |
op16(int _op,
int _a,
int _b,
int _c)
This is a helper function used in decoding ARC700 16-bit instructions with four decode fields. |
protected static AutoModel.Decode |
op3(int _op,
int _op2,
int _p)
This is a helper function used in decoding simple three opcode ARC700 instructions. |
protected static AutoModel.Decode |
op3(int _op,
int _op2,
int _p,
int _bit5)
This is a helper function used in decoding simple three opcode ARC700 instructions. |
protected static AutoModel.Decode |
opAll(int a)
This is a helper function used in decoding the special no parameter ARC700 instructions. |
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. |
void |
reset()
This method resets the processor. |
void |
setPC(int pc)
This method sets the current Program Counter. |
static int |
sign(int a)
This method returns the sign bit for 32 bit value. |
static int |
subCarry(int src1,
int src2,
int result)
This method is used to determine if a sub carry has occurred. |
static int |
subOverflow(int src1,
int src2,
int result)
This method is used to determine if a sub overflow has occurred. |
static int |
zero(int a)
This method returns '1' if the parameter 'a' is a zero and '0' otherwise. |
| Methods inherited from class com.cmpware.tools.AutoModel |
|---|
advancePC, asmFixup, bitsToBytes, concatenate, dasm, dasm, decode, defineInstructions, execute, fetch, getInstruction, getInstructions, getInstructionSizes, getSymbolNames, instrMatch, main, 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 |
|---|
public static final java.lang.String copyright
protected int dest
protected int src1
protected int src2
protected int rd
protected int cc
protected int z_flag
protected int n_flag
protected int c_flag
protected int v_flag
protected int s1_flag
protected int s2_flag
protected int e1_flag
protected int e2_flag
public static final int[][] SREG_MAP
protected static final AutoModel.Symbol[] regSymbols
protected static final AutoModel.Symbol[] sregSymbols
protected static final AutoModel.Symbol[] ccSymbols
protected static final AutoModel.Symbol[] fSymbols
protected static final AutoModel.Symbol[] zzSymbols
protected static final AutoModel.Symbol[] xSymbols
protected static final AutoModel.Symbol[] ndSymbols
protected static final AutoModel.Symbol[] aaSymbols
protected static final AutoModel.Symbol[] diSymbols
protected static final AutoModel.Field op
protected static final AutoModel.Field op2
protected static final AutoModel.Field p
protected static final AutoModel.Field a
protected static final AutoModel.Field op3
protected static final AutoModel.Field b
protected static final AutoModel.Field bhi
protected static final AutoModel.Field c
protected static final AutoModel.Field u6
protected static final AutoModel.Field u7
protected static final AutoModel.Field f
protected static final AutoModel.Field bit4
protected static final AutoModel.Field s6hi
protected static final AutoModel.Field s6lo
protected static final AutoModel.Field s10hi
protected static final AutoModel.Field s9hi
protected static final AutoModel.Field s11lo
protected static final AutoModel.Field s8lo
protected static final AutoModel.Field op2b
protected static final AutoModel.Field q
protected static final AutoModel.Field t
protected static final AutoModel.Field nd
protected static final AutoModel.Field bit5
protected static final AutoModel.Field bit15
protected static final AutoModel.Field bit16
protected static final AutoModel.Field bit17
protected static final AutoModel.Field zz1
protected static final AutoModel.Field x1
protected static final AutoModel.Field aa1
protected static final AutoModel.Field di1
protected static final AutoModel.Field zz2
protected static final AutoModel.Field x2
protected static final AutoModel.Field aa2
protected static final AutoModel.Field di2
protected static final AutoModel.Field ldop2
protected static final AutoModel.Field zz3
protected static final AutoModel.Field aa3
protected static final AutoModel.Field di3
protected static final AutoModel.Field all32
protected static final AutoModel.Field op16
protected static final AutoModel.Field a16
protected static final AutoModel.Field b16
protected static final AutoModel.Field c16
protected static final AutoModel.Field op16_2
protected static final AutoModel.Field u3_16
protected static final AutoModel.Field u7_16
protected static final AutoModel.Field h16
protected static final AutoModel.Field h16hi
protected static final AutoModel.Field sp16
protected static final AutoModel.Field s3_4
protected static final AutoModel.Field s5_7
protected static final AutoModel.Field s7
protected static final AutoModel.Field s9_10
protected static final AutoModel.Field s12
protected static final AutoModel.Field s13
protected static final AutoModel.Field s21
protected static final AutoModel.Field s25
protected static final AutoModel.Format fmt_bc
protected static final AutoModel.Format fmt_bu6
protected static final AutoModel.Format fmt_bs12
protected static final AutoModel.Format fmt_abc
protected static final AutoModel.Format fmt_abu6
protected static final AutoModel.Format fmt_bbs12
protected static final AutoModel.Format fmt_bbc
protected static final AutoModel.Format fmt_bbu6
protected static final AutoModel.Format fmt_s21
protected static final AutoModel.Format fmt_s25
protected static final AutoModel.Format fmt_bcs9
protected static final AutoModel.Format fmt_bu6s9
protected static final AutoModel.Format fmt_qbc
protected static final AutoModel.Format fmt_qbu6
protected static final AutoModel.Format fmt_dbc
protected static final AutoModel.Format fmt_dbu6
protected static final AutoModel.Format fmt_c
protected static final AutoModel.Format fmt_u6
protected static final AutoModel.Format fmt_s12
protected static final AutoModel.Format fmt_jc
protected static final AutoModel.Format fmt_ju6
protected static final AutoModel.Format fmt_ldabs9
protected static final AutoModel.Format fmt_ldabc
protected static final AutoModel.Format fmt_u7
protected static final AutoModel.Format fmt_s13
protected static final AutoModel.Format fmt_cbs9
protected static final AutoModel.Format allbits
protected static final AutoModel.Format fmt16
protected static final AutoModel.Format fmt16_bc
protected static final AutoModel.Format fmt16_abc
protected static final AutoModel.Format fmt16_cbu3
protected static final AutoModel.Format fmt16_bbh
protected static final AutoModel.Format fmt16_bspu7
| Constructor Detail |
|---|
public ARC700()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - the command line arguments.public int getPC()
Processor
getPC in class AutoModelpublic void setPC(int pc)
Processor
setPC in class AutoModelpublic void reset()
reset in class Processor
public long fetch(int addr,
int bytes)
throws MemoryAccessException
AutoModel
fetch in class AutoModeladdr - The address of the fetch.bytes - The number of bytes in the fetch.
MemoryAccessException - when an attempt is
made to access an illegal memory address.
public void preExecute(int instr)
throws MemoryAccessException
AutoModel
preExecute in class AutoModelinstr - The instruction
MemoryAccessException - A Memory Access
Exception is thrown is an illegal memory
access is attempted.public void postExecute(int instr)
AutoModel
postExecute in class AutoModelinstr - The instruction
public void dasmFixup(long instrData,
AutoModel.Instruction instr)
AutoModel
dasmFixup in class AutoModelinstrData - The instruction to be diassembled.instr - The description of the instruction to
be diassembled.
public static int addOverflow(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.
public static int subOverflow(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.
public 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.
public 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.
public static int sign(int a)
a - The 32 bit value.
public static int zero(int a)
a - The parameter to be tested for zero.
protected static AutoModel.Decode op(int _op)
_op - The code for the op field.
protected static AutoModel.Decode op(int _op,
int _op2)
_op - The code for the op field (I[31:26])._op2 - The code for the op2 field.
protected static AutoModel.Decode op(int _op,
int _op2,
int _a)
_op - The code for the op field (I[31:26])._op2 - The code for the op2 field._a - The code for the a field.
protected static AutoModel.Decode bbit(int _op2b)
_op2b - The code for the bop2 field (I[3:0]).
protected static AutoModel.Decode blcc()
protected static AutoModel.Decode brcc()
protected static AutoModel.Decode ld2()
protected static AutoModel.Decode opAll(int a)
a - The 32-bit opcode.
protected static AutoModel.Decode op16(int _op)
_op - The 5-bit primary opcode for 16-bit
instructions.
protected static AutoModel.Decode op16(int _op,
int _op2)
_op - The 5-bit primary opcode for 16-bit
instructions._op2 - The 5-bit secondary opcode for 16-bit
instructions.
protected static AutoModel.Decode op16(int _op,
int _a,
int _b,
int _c)
_op - The 5-bit primary opcode for 16-bit
instructions._a - The 5-bit secondary opcode / 'a' field
for 16-bit instructions._b - The 3-bit 'b' field for 16-bit
instructions._c - The 3-bit 'c' field for 16-bit
instructions.
protected static AutoModel.Decode op3(int _op,
int _op2,
int _p)
_op - The code for the op field (I[31:26])._op2 - The code for the op2 field._p - The code for the p field.
protected static AutoModel.Decode op3(int _op,
int _op2,
int _p,
int _bit5)
_op - The code for the op field (I[31:26])._op2 - The code for the op2 field._p - The code for the p field._bit5 - The code for the bit5 field. Usually
only used when p = 3.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||