com.cmpware.cmp.models
Class AutoSimple

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.AutoSimple
All Implemented Interfaces:
ReadWriteInterface

public class AutoSimple
extends AutoModel

This is the 'Simple' processor produced using the AutoModel data-driven interface.

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

Author:
SAG

Nested Class Summary
 
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 byte[] BREAKPOINT
          The Breakpoint code
static java.lang.String copyright
          Copyright string
protected  int dest
          The index of the destination register (c)
protected static byte[] NOOP
          The NOOP instruction
protected  int ra
          The value in the 'a' register
protected  int rb
          The value in the 'b' register
protected  int rc
          The value in the 'c' register
protected  int simm12
          The sign-extended 12-bit immediate data
protected  int simm8
          The sign-extended 8-bit immediate data
 
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
AutoSimple()
          The constructor
 
Method Summary
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.
 void reset()
          This method resets the processor.
 
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.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

ra

protected int ra
The value in the 'a' register


rb

protected int rb
The value in the 'b' register


rc

protected int rc
The value in the 'c' register


dest

protected int dest
The index of the destination register (c)


simm8

protected int simm8
The sign-extended 8-bit immediate data


simm12

protected int simm12
The sign-extended 12-bit immediate data


NOOP

protected static final byte[] NOOP
The NOOP instruction


BREAKPOINT

protected static final byte[] BREAKPOINT
The Breakpoint code

Constructor Detail

AutoSimple

public AutoSimple()
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 AutoSimple -dasm or java AutoSimple -asm

Parameters:
args - the command line arguments.

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

preExecute

public void preExecute(int instr)
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

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