com.cmpware.cmp.models
Class ARC700

java.lang.Object
  extended by com.cmpware.cmp.Memory
      extended by com.cmpware.cmp.Processor
          extended by com.cmpware.tools.AutoModel
              extended by com.cmpware.cmp.models.ARC700
All Implemented Interfaces:
ReadWriteInterface
Direct Known Subclasses:
ARC700EX

public class ARC700
extends AutoModel

This is an AutoModel implementation of the ARC700 processor.

Copyright (c) 2006 Cmpware, Inc. All Rights Reserved.

Author:
SAG

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 ARC700 instructions.
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.Processor
branch, branchNoDelay, defineBranchDelay, defineBreakpoint, defineInstructionSize, defineName, defineNoop, defineOpcodeNames, defineRegisterNames, defineRegisters, defineSpecialRegisterNames, defineSpecialRegisters, get, getBreakpoint, getBreakpointData, getBreakpoints, getCycleCount, getDebugRegisters, getElf, getIdlePower, getInstructionMix, getInstructionSize, getName, getNoop, getOpcodeNames, getRegister, getRegisterNames, getRegisters, getRunningPower, getSpecialRegister, getSpecialRegisterNames, getSpecialRegisters, getStallCount, isBreakpoint, isStalled, load, postLoad, removeAllBreakpoints, removeBreakpoint, setBreakpoint, setIdlePower, setRegister, setRunningPower, setSpecialRegister, stall, statistics, step
 
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

copyright

public static final java.lang.String copyright
Copyright string

See Also:
Constant Field Values

dest

protected int dest
The destination (typically an index into a register set)


src1

protected int src1
The first source parameter


src2

protected int src2
The second source parameter


rd

protected int rd
The relative displacement


cc

protected int cc
The condition code


z_flag

protected int z_flag
Shadow Z (Zero) flag


n_flag

protected int n_flag
Shadow N (negative) flag


c_flag

protected int c_flag
Shadow C (carry) flag


v_flag

protected int v_flag
Shadow V (overflow) flag


s1_flag

protected int s1_flag
Shadow S1 (saturate) flag


s2_flag

protected int s2_flag
Shadow S2 (saturate) flag


e1_flag

protected int e1_flag
Shadow E1 (interrupt mask) flag


e2_flag

protected int e2_flag
Shadow E2 (interrupt mask) flag


SREG_MAP

public static final int[][] SREG_MAP
This maps the index used by the simulator to represent the special register address to the address used by hardware. This is done because the address map of the special registers is so sparsely populated.


regSymbols

protected static final AutoModel.Symbol[] regSymbols
The General Purpose Register Symbols


sregSymbols

protected static final AutoModel.Symbol[] sregSymbols
The Special Purpose Register Symbols


ccSymbols

protected static final AutoModel.Symbol[] ccSymbols
The condition code symbols


fSymbols

protected static final AutoModel.Symbol[] fSymbols
The Flags update flag


zzSymbols

protected static final AutoModel.Symbol[] zzSymbols
The Data Size flag (.zz) Symbols


xSymbols

protected static final AutoModel.Symbol[] xSymbols
The Sign Extend flag (.x) Symbols


ndSymbols

protected static final AutoModel.Symbol[] ndSymbols
The Delay Slot flag (.nd) Symbols


aaSymbols

protected static final AutoModel.Symbol[] aaSymbols
The Load write-back mode (.aa) Symbols


diSymbols

protected static final AutoModel.Symbol[] diSymbols
The Data Cache mode (.di) Symbols


op

protected static final AutoModel.Field op

op2

protected static final AutoModel.Field op2

p

protected static final AutoModel.Field p

a

protected static final AutoModel.Field a

op3

protected static final AutoModel.Field op3

b

protected static final AutoModel.Field b

bhi

protected static final AutoModel.Field bhi

c

protected static final AutoModel.Field c

u6

protected static final AutoModel.Field u6

u7

protected static final AutoModel.Field u7

f

protected static final AutoModel.Field f

bit4

protected static final AutoModel.Field bit4

s6hi

protected static final AutoModel.Field s6hi

s6lo

protected static final AutoModel.Field s6lo

s10hi

protected static final AutoModel.Field s10hi

s9hi

protected static final AutoModel.Field s9hi

s11lo

protected static final AutoModel.Field s11lo

s8lo

protected static final AutoModel.Field s8lo

op2b

protected static final AutoModel.Field op2b

q

protected static final AutoModel.Field q

t

protected static final AutoModel.Field t

nd

protected static final AutoModel.Field nd

bit5

protected static final AutoModel.Field bit5

bit15

protected static final AutoModel.Field bit15

bit16

protected static final AutoModel.Field bit16

bit17

protected static final AutoModel.Field bit17

zz1

protected static final AutoModel.Field zz1

x1

protected static final AutoModel.Field x1

aa1

protected static final AutoModel.Field aa1

di1

protected static final AutoModel.Field di1

zz2

protected static final AutoModel.Field zz2

x2

protected static final AutoModel.Field x2

aa2

protected static final AutoModel.Field aa2

di2

protected static final AutoModel.Field di2

ldop2

protected static final AutoModel.Field ldop2

zz3

protected static final AutoModel.Field zz3

aa3

protected static final AutoModel.Field aa3

di3

protected static final AutoModel.Field di3

all32

protected static final AutoModel.Field all32

op16

protected static final AutoModel.Field op16

a16

protected static final AutoModel.Field a16

b16

protected static final AutoModel.Field b16

c16

protected static final AutoModel.Field c16

op16_2

protected static final AutoModel.Field op16_2

u3_16

protected static final AutoModel.Field u3_16

u7_16

protected static final AutoModel.Field u7_16

h16

protected static final AutoModel.Field h16

h16hi

protected static final AutoModel.Field h16hi

sp16

protected static final AutoModel.Field sp16

s3_4

protected static final AutoModel.Field s3_4

s5_7

protected static final AutoModel.Field s5_7

s7

protected static final AutoModel.Field s7

s9_10

protected static final AutoModel.Field s9_10

s12

protected static final AutoModel.Field s12

s13

protected static final AutoModel.Field s13

s21

protected static final AutoModel.Field s21

s25

protected static final AutoModel.Field s25

fmt_bc

protected static final AutoModel.Format fmt_bc

fmt_bu6

protected static final AutoModel.Format fmt_bu6

fmt_bs12

protected static final AutoModel.Format fmt_bs12

fmt_abc

protected static final AutoModel.Format fmt_abc

fmt_abu6

protected static final AutoModel.Format fmt_abu6

fmt_bbs12

protected static final AutoModel.Format fmt_bbs12

fmt_bbc

protected static final AutoModel.Format fmt_bbc

fmt_bbu6

protected static final AutoModel.Format fmt_bbu6

fmt_s21

protected static final AutoModel.Format fmt_s21

fmt_s25

protected static final AutoModel.Format fmt_s25

fmt_bcs9

protected static final AutoModel.Format fmt_bcs9

fmt_bu6s9

protected static final AutoModel.Format fmt_bu6s9

fmt_qbc

protected static final AutoModel.Format fmt_qbc

fmt_qbu6

protected static final AutoModel.Format fmt_qbu6

fmt_dbc

protected static final AutoModel.Format fmt_dbc

fmt_dbu6

protected static final AutoModel.Format fmt_dbu6

fmt_c

protected static final AutoModel.Format fmt_c

fmt_u6

protected static final AutoModel.Format fmt_u6

fmt_s12

protected static final AutoModel.Format fmt_s12

fmt_jc

protected static final AutoModel.Format fmt_jc

fmt_ju6

protected static final AutoModel.Format fmt_ju6

fmt_ldabs9

protected static final AutoModel.Format fmt_ldabs9

fmt_ldabc

protected static final AutoModel.Format fmt_ldabc

fmt_u7

protected static final AutoModel.Format fmt_u7

fmt_s13

protected static final AutoModel.Format fmt_s13

fmt_cbs9

protected static final AutoModel.Format fmt_cbs9

allbits

protected static final AutoModel.Format allbits

fmt16

protected static final AutoModel.Format fmt16

fmt16_bc

protected static final AutoModel.Format fmt16_bc

fmt16_abc

protected static final AutoModel.Format fmt16_abc

fmt16_cbu3

protected static final AutoModel.Format fmt16_cbu3

fmt16_bbh

protected static final AutoModel.Format fmt16_bbh

fmt16_bspu7

protected static final AutoModel.Format fmt16_bspu7
Constructor Detail

ARC700

public ARC700()
The constructor

Method Detail

main

public static void main(java.lang.String[] args)
This enables the stand-alone assembler and disassembler. The command line should be either: java ARC700 -dasm or java ARC700 -asm

Parameters:
args - the command line arguments.

getPC

public int getPC()
Description copied from class: Processor
This method returns the current Program Counter.

Overrides:
getPC in class AutoModel
Returns:
This method returns the current Program Counter.

setPC

public void setPC(int pc)
Description copied from class: Processor
This method sets the current Program Counter.

Overrides:
setPC in class AutoModel

reset

public void reset()
This method resets the processor. Note that super.reset() must me called to completely intialize the processor.

Overrides:
reset in class Processor

fetch

public long fetch(int addr,
                  int bytes)
           throws MemoryAccessException
Description copied from class: AutoModel
This method returns a long (64-bit) value based on the data at 'bytes' bytes of memory at address 'addr'. This takes into account endian. This is provided as a public function to permit overloading for processors that may need unusual functionality when fetching instructions (I'm talking about ARC here).

Overrides:
fetch in class AutoModel
Parameters:
addr - The address of the fetch.
bytes - The number of bytes in the fetch.
Returns:
This method returns a long (64-bit) value based on the data at 'bytes' bytes of memory at address 'addr'.
Throws:
MemoryAccessException - when an attempt is made to access an illegal memory address.

preExecute

public void preExecute(int instr)
                throws MemoryAccessException
Description copied from class: AutoModel
This method is called immediately before execution and may be overloaded to do things like save instruction field values to locals.

Overrides:
preExecute in class AutoModel
Parameters:
instr - The instruction
Throws:
MemoryAccessException - A Memory Access Exception is thrown is an illegal memory access is attempted.

postExecute

public void postExecute(int instr)
Description copied from class: AutoModel
This method is called immediately after execution and may be overloaded to do things like save instruction field values to locals.

Overrides:
postExecute in class AutoModel
Parameters:
instr - The instruction

dasmFixup

public void dasmFixup(long instrData,
                      AutoModel.Instruction instr)
Description copied from class: AutoModel
This method can be overloaded to fix up any problems or to do any clean-up in the disassembler. This method is called after the data from the instruction has been broken down into the fields in the instr object. Most of what is done here is to adjust the field.val values to take care of disjoint or shifted fields.

Overrides:
dasmFixup in class AutoModel
Parameters:
instrData - The instruction to be diassembled.
instr - The description of the instruction to be diassembled.

addOverflow

public static int addOverflow(int src1,
                              int src2,
                              int result)
This method is used to determine if an add overflow has occurred. This is done by checking the signs of the source operands against the sign of the result.

Parameters:
src1 - The first source operand.
src2 - The second source operand.
result - The result of the operation on the src1 and src2 parameters.
Returns:
This method returns a true if an overflow was detected and false otherwise.

subOverflow

public static int subOverflow(int src1,
                              int src2,
                              int result)
This method is used to determine if a sub overflow has occurred. This is done by checking the signs of the source operands against the sign of the result.

Parameters:
src1 - The first source operand.
src2 - The second source operand.
result - The result of the operation on the src1 and src2 parameters.
Returns:
This method returns a true if an overflow was detected and a false otherwise.

addCarry

public static int addCarry(int src1,
                           int src2,
                           int result)
This method is used to determine if an add carry has occurred. This is done by checking the signs of the source operands against the sign of the result.

Parameters:
src1 - The first source operand.
src2 - The second source operand.
result - The result of the operation on the src1 and src2 parameters.
Returns:
This method returns a one if a carry was detected and a zero otherwise.

subCarry

public static int subCarry(int src1,
                           int src2,
                           int result)
This method is used to determine if a sub carry has occurred. This is done by checking the signs of the source operands against the sign of the result.

Parameters:
src1 - The first source operand.
src2 - The second source operand.
result - The result of the operation on the src1 and src2 parameters.
Returns:
This method returns a one if a carry was detected and a zero otherwise.

sign

public static int sign(int a)
This method returns the sign bit for 32 bit value.

Parameters:
a - The 32 bit value.
Returns:
This method returns the sign bit for 32 bit value.

zero

public static int zero(int a)
This method returns '1' if the parameter 'a' is a zero and '0' otherwise. This is used to set the 'zero' flag.

Parameters:
a - The parameter to be tested for zero.
Returns:
This method returns the sign bit for 32 bit value.

op

protected static AutoModel.Decode op(int _op)
This is a helper function used in decoding simple one opcode ARC700 instructions. It mostly makes the Instruction table easier to read.

Parameters:
_op - The code for the op field.
Returns:
This method returns a decoder for a one opcode ARC700 instruction.

op

protected static AutoModel.Decode op(int _op,
                                     int _op2)
This is a helper function used in decoding simple two opcode ARC700 instructions. It mostly makes the Instruction table easier to read.

Parameters:
_op - The code for the op field (I[31:26]).
_op2 - The code for the op2 field.
Returns:
This method returns a decoder for a two opcode ARC700 instruction.

op

protected static AutoModel.Decode op(int _op,
                                     int _op2,
                                     int _a)
This is a helper function used in decoding three opcode ARC700 instructions. It mostly makes the Instruction table easier to read.

Parameters:
_op - The code for the op field (I[31:26]).
_op2 - The code for the op2 field.
_a - The code for the a field.
Returns:
This method returns a decodeer for a three opcode ARC700 instruction.

bbit

protected static AutoModel.Decode bbit(int _op2b)
This is a helper function used in decoding the BBIT ARC700 instructions. It mostly makes the Instruction table easier to read.

Parameters:
_op2b - The code for the bop2 field (I[3:0]).
Returns:
This method returns a decoder for a BBIT ARC700 instruction.

blcc

protected static AutoModel.Decode blcc()
This is a helper function used in decoding the BLcc ARC700 instructions. It mostly makes the Instruction table easier to read.

Returns:
This method returns a decoder for a BLcc ARC700 instruction.

brcc

protected static AutoModel.Decode brcc()
This is a helper function used in decoding the BRcc ARC700 instructions. It mostly makes the Instruction table easier to read.

Returns:
This method returns a decoder for a BRcc ARC700 instruction.

ld2

protected static AutoModel.Decode ld2()
This is a helper function used in decoding the LD ARC700 instructions. It mostly makes the Instruction table easier to read.

Returns:
This method returns a decoder for a LD ARC700 instruction.

opAll

protected static AutoModel.Decode opAll(int a)
This is a helper function used in decoding the special no parameter ARC700 instructions. This takes a single 32 bit field completely describing the instruction. It mostly makes the Instruction table easier to read.

Parameters:
a - The 32-bit opcode.
Returns:
This method returns a decoder for a no parameter ARC700 instruction.

op16

protected static AutoModel.Decode op16(int _op)
This is a helper function used in decoding ARC700 16-bit instructions with a single decode field.

Parameters:
_op - The 5-bit primary opcode for 16-bit instructions.
Returns:
This method returns a decoder for a 16-bit ARC700 instruction.

op16

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.

Parameters:
_op - The 5-bit primary opcode for 16-bit instructions.
_op2 - The 5-bit secondary opcode for 16-bit instructions.
Returns:
This method returns a decoder for a 16-bit ARC700 instruction.

op16

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.

Parameters:
_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.
Returns:
This method returns a decoder for a 16-bit ARC700 instruction.

op3

protected static AutoModel.Decode op3(int _op,
                                      int _op2,
                                      int _p)
This is a helper function used in decoding simple three opcode ARC700 instructions. It mostly makes the Instruction table easier to read.

Parameters:
_op - The code for the op field (I[31:26]).
_op2 - The code for the op2 field.
_p - The code for the p field.
Returns:
This method returns a decoder for a three opcode ARC700 instruction.

op3

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. It mostly makes the Instruction table easier to read.

Parameters:
_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.
Returns:
This method returns a decoder for a three opcode ARC700 instruction.