com.cmpware.cmp.models
Class HardNodeDemo
java.lang.Object
com.cmpware.cmp.Memory
com.cmpware.cmp.Processor
com.cmpware.cmp.HardNode
com.cmpware.cmp.models.HardNodeDemo
- All Implemented Interfaces:
- ReadWriteInterface
public class HardNodeDemo
- extends HardNode
This gives an example of a HardNode. It simply
takes data from the "east" input, increments it,
then sends it to the "west" output.
Copyright (c) 2004 Cmpware, Inc. All Rights Reserved.
- Author:
- SAG
|
Field Summary |
static java.lang.String |
copyright
Copyright string |
static int |
east
The East MMIO port |
static int |
west
THe West MMIO port |
| Fields inherited from class com.cmpware.cmp.Processor |
bkpt, branchAddr, branchDelay, breakpointHit, currentBranchDelay, currentInstr, currentInstrCode, cycleCount, elf, idlePower, iMix, instructionSize, name, noop, pc, prevInstr, prevInstrCode, r, runningPower, sr, stall, stallCount |
|
Method Summary |
void |
execute(int instr)
This method is called after the fetch() and decode()
and represents the execution phase of the instruction. |
| 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, reset, 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 |
copyright
public static final java.lang.String copyright
- Copyright string
- See Also:
- Constant Field Values
east
public static final int east
- The East MMIO port
- See Also:
- Constant Field Values
west
public static final int west
- THe West MMIO port
- See Also:
- Constant Field Values
HardNodeDemo
public HardNodeDemo()
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.