com.cmpware.cmp.models
Class MicroBlaze_old

java.lang.Object
  extended by com.cmpware.cmp.Memory
      extended by com.cmpware.cmp.Processor
          extended by com.cmpware.cmp.models.MicroBlaze_old
All Implemented Interfaces:
ReadWriteInterface

public class MicroBlaze_old
extends Processor

This implements the Xilinx Microblaze according to the specification: "MicroBlaze Processor Reference Guide", Embedded Development Kit EDK 6.3.i (UG081 August 24, 2004)

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

Author:
SAG

Field Summary
static int BE
           
static int BIP
           
static int C
           
static java.lang.String copyright
          Copyright string
static int DCE
           
static int DZ
           
static int EAR
           
static int EE
           
static int EIP
           
static int ESR
           
static int FSL
           
static int ICE
           
static int IE
           
static int MSR
           
static int PC
           
 
Fields inherited from class com.cmpware.cmp.Processor
bkpt, branchAddr, branchDelay, breakpointHit, currentBranchDelay, currentInstr, currentInstrCode, cycleCount, elf, idlePower, iMix, instructionSize, name, noop, prevInstr, prevInstrCode, r, runningPower, sr, stall, stallCount
 
Fields inherited from class com.cmpware.cmp.Memory
BIG, LITTLE
 
Constructor Summary
MicroBlaze_old()
          The constructor
 
Method Summary
 java.lang.String dasm(byte[] instr)
          This method disassembles an instruction.
 int decode(int instr)
          A unique code identifying the instruction is returned by this method.
 void execute(int instr)
          This method is called after the fetch() and decode() and represents the execution phase of the instruction.
 int getPC()
          This method returns the current Program Counter.
 void reset()
          This method resets the MicroBlaze processor.
 void setPC(int pc)
          This method sets the current Program Counter.
 
Methods inherited from class com.cmpware.cmp.Processor
advancePC, branch, branchNoDelay, defineBranchDelay, defineBreakpoint, defineInstructionSize, defineName, defineNoop, defineOpcodeNames, defineRegisterNames, defineRegisters, defineSpecialRegisterNames, defineSpecialRegisters, fetch, get, getBreakpoint, getBreakpointData, getBreakpoints, getCycleCount, getDebugRegisters, getElf, getIdlePower, getInstruction, 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

PC

public static final int PC
See Also:
Constant Field Values

MSR

public static final int MSR
See Also:
Constant Field Values

EAR

public static final int EAR
See Also:
Constant Field Values

ESR

public static final int ESR
See Also:
Constant Field Values

BE

public static final int BE
See Also:
Constant Field Values

IE

public static final int IE
See Also:
Constant Field Values

C

public static final int C
See Also:
Constant Field Values

BIP

public static final int BIP
See Also:
Constant Field Values

FSL

public static final int FSL
See Also:
Constant Field Values

ICE

public static final int ICE
See Also:
Constant Field Values

DZ

public static final int DZ
See Also:
Constant Field Values

DCE

public static final int DCE
See Also:
Constant Field Values

EE

public static final int EE
See Also:
Constant Field Values

EIP

public static final int EIP
See Also:
Constant Field Values
Constructor Detail

MicroBlaze_old

public MicroBlaze_old()
The constructor

Method Detail

decode

public int decode(int instr)
           throws IllegalOpcodeException
Description copied from class: Processor
A unique code identifying the instruction is returned by this method. In some processors with simple fixed-field opcodes this may be a very simple method to define. Other architectures with more complex decoding will require a more complex implementation.

Specified by:
decode in class Processor
Parameters:
instr - The instruction to be decoded.
Returns:
A unique code identifying the instruction is returned by this method.
Throws:
IllegalOpcodeException - if an illegal opcode is encountered.

execute

public void execute(int instr)
             throws MemoryAccessException,
                    IllegalRegisterException
Description copied from class: Processor
This method is called after the fetch() and decode() and represents the execution phase of the instruction. All update of processor state occurs in this method. This is where most of the processor definition will occur. See examples for suggestions on implementation of this method.

Specified by:
execute in class Processor
Parameters:
instr - The instruction to be executed.
Throws:
MemoryAccessException - A Memory Access Exception is thrown is an illegal memory access is attempted.
IllegalRegisterException - if an attempt is made to access a register illegally.

getPC

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

Specified by:
getPC in class Processor
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.

Specified by:
setPC in class Processor

dasm

public java.lang.String dasm(byte[] instr)
Description copied from class: Processor
This method disassembles an instruction. Note that a byte array is provided as the interface. This is to make this method as generic as possible.

Specified by:
dasm in class Processor
Parameters:
instr - The instruction to be disassembled.
Returns:
This method returns the disassembled instruction.

reset

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

Overrides:
reset in class Processor