|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthicosim.components.backend.processor.Processor
public class Processor
This class simulates the HICOVEC processor.
| Nested Class Summary | |
|---|---|
static class |
Processor.ScalarRegister
Enumaration of a ScalarRegister. |
| Field Summary | |
|---|---|
static Engine |
engine
|
| Constructor Summary | |
|---|---|
Processor(ProcessorConfig newConfig,
Engine engine1)
|
|
| Method Summary | |
|---|---|
java.lang.String |
decodeInstruction(int instr,
boolean isdisas,
boolean stepping,
int progCounter)
This method decodes the given 32 bit instruction "instr" and executes the decoded command. |
void |
deleteBreakpoint(int address)
this method deletes a breakpoint |
java.util.Vector<java.lang.Integer> |
getBreakpoints()
|
int |
getCarryFlag()
|
java.lang.String |
getConfiguration()
|
int |
getIP()
|
int |
getRegA()
|
java.lang.String |
getRegs()
String representation of the Registers. |
int |
getRegX()
|
int |
getRegY()
|
IStatistic |
getStatistics()
|
int[][] |
getVectorRegisters()
|
int |
getVRegsValue(int i,
int j)
This method is used to get the content of a vecReg. |
int |
getZeroFlag()
|
void |
incIP()
|
void |
interrupt()
|
boolean |
isHALT()
|
boolean |
isObjectFileLoaded()
|
boolean |
isRunning()
|
void |
reset()
This method resets the progCounter, all breakpoints, registers and the statistics. |
void |
resetBr()
this method deletes ALL breakpoints |
void |
setBreakpoint(int address)
setBreakpoint - only if the address is available/used in the instructionRegister |
void |
setConfig(ProcessorConfig newConfig)
|
void |
setHALT(boolean HALT)
|
void |
setIP(int newIP)
|
void |
setIsRunning(boolean isRunning)
|
void |
setOFileNotLoaded()
|
void |
setScalarValue(char reg,
int value)
|
void |
setStatusRegs(boolean zero,
int carry)
To set the new value of the statusregister. |
void |
setStepping(boolean stepping)
|
void |
setUp(IMemory memory,
int progCounter)
Everytime when a new objectfile was loaded, call setUp() |
void |
setVRegsValue(int i,
int j,
int value)
This method is used so set a value in the vectorregister and show that change in GUI if GUI-App is launched. |
void |
step()
execute one single instruction |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static Engine engine
| Constructor Detail |
|---|
public Processor(ProcessorConfig newConfig,
Engine engine1)
newConfig - engine1 - | Method Detail |
|---|
public IStatistic getStatistics()
public void setUp(IMemory memory,
int progCounter)
setUp in interface IProcessor
public void setVRegsValue(int i,
int j,
int value)
setVRegsValue in interface IProcessori - j - value -
public int getVRegsValue(int i,
int j)
getVRegsValue in interface IProcessori - j -
public void setStatusRegs(boolean zero,
int carry)
setStatusRegs in interface IProcessorzero - carry - public void setIP(int newIP)
setIP in interface IProcessorpublic void incIP()
public void setScalarValue(char reg,
int value)
setScalarValue in interface IProcessorpublic void setIsRunning(boolean isRunning)
setIsRunning in interface IProcessorpublic boolean isRunning()
isRunning in interface IProcessorpublic void setOFileNotLoaded()
setOFileNotLoaded in interface IProcessorpublic boolean isObjectFileLoaded()
isObjectFileLoaded in interface IProcessorpublic void setConfig(ProcessorConfig newConfig)
setConfig in interface IProcessorpublic void setStepping(boolean stepping)
setStepping in interface IProcessor
public void interrupt()
throws java.lang.Exception
interrupt in interface IProcessorjava.lang.Exceptionpublic void reset()
reset in interface IProcessorpublic java.lang.String getRegs()
getRegs in interface IProcessorpublic int getRegA()
getRegA in interface IProcessorpublic int getRegX()
getRegX in interface IProcessorpublic int getRegY()
getRegY in interface IProcessorpublic int[][] getVectorRegisters()
getVectorRegisters in interface IProcessorpublic int getZeroFlag()
getZeroFlag in interface IProcessorpublic int getCarryFlag()
getCarryFlag in interface IProcessorpublic int getIP()
getIP in interface IProcessorpublic java.util.Vector<java.lang.Integer> getBreakpoints()
getBreakpoints in interface IProcessorpublic void resetBr()
resetBr in interface IProcessorpublic void deleteBreakpoint(int address)
deleteBreakpoint in interface IProcessorpublic void setHALT(boolean HALT)
setHALT in interface IProcessorpublic boolean isHALT()
isHALT in interface IProcessorpublic java.lang.String getConfiguration()
getConfiguration in interface IProcessor
public void setBreakpoint(int address)
throws java.lang.Exception
setBreakpoint in interface IProcessorjava.lang.Exceptionpublic void step()
step in interface IProcessor
public java.lang.String decodeInstruction(int instr,
boolean isdisas,
boolean stepping,
int progCounter)
throws java.lang.Exception
instr - - the instruction to decodeisdisas - - because this method is used by the disassembler, and the processorstepping - - if breakpoints are set, the user should see the executed instructionsprogCounter - - programCounter(because this is used also by Disassembler)
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||