|
||||||||||
| 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.cmp.models.Sparc
public class Sparc
This is the model for the SPARC 8 processor. Currently there is no support for: - floating point - alternate memory spaces - traps although most of the definitions are included.
Copyright (c) 2004, 2005, 2006 Cmpware, Inc. All Rights Reserved.
| Nested Class Summary | |
|---|---|
(package private) static class |
Sparc.COND
This class defines the bit filed constants for the COND (condition code) opcode field |
(package private) static class |
Sparc.OP
This class defines the bit field constants for the OP3 opcode field |
(package private) static class |
Sparc.OP2
This class defines the bit field constants for the OP2 opcode field |
(package private) static class |
Sparc.OP3
This class defines the bit filed constants for the OP3 opcode field |
(package private) static class |
Sparc.PSR
This class defines Processor Status Register (PSR) fields. |
(package private) static class |
Sparc.SR
This class defines the Special Registers |
| Field Summary | |
|---|---|
static java.lang.String |
copyright
Copyright string |
(package private) int |
cwp
The Current Window Pointer |
static int |
TCS
|
| 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 |
| Fields inherited from class com.cmpware.cmp.Memory |
|---|
BIG, LITTLE |
| Constructor Summary | |
|---|---|
Sparc()
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 Sparc processor. |
void |
setPC(int pc)
This method sets the current Program Counter. |
| 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
public static final int TCS
int cwp
| Constructor Detail |
|---|
public Sparc()
| Method Detail |
|---|
public void reset()
reset in class Processor
public int decode(int instr)
throws IllegalOpcodeException
Processor
decode in class Processorinstr - The instruction to be decoded.
IllegalOpcodeException - if an illegal opcode
is encountered.
public void execute(int instr)
throws MemoryAccessException,
IllegalRegisterException
Processor
execute in class Processorinstr - The instruction to be executed.
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.public int getPC()
Processor
getPC in class Processorpublic void setPC(int pc)
Processor
setPC in class Processorpublic java.lang.String dasm(byte[] instr)
Processor
dasm in class Processorinstr - The instruction to be disassembled.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||