|
||||||||||
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 IProcessor
i
- j
- value
- public int getVRegsValue(int i, int j)
getVRegsValue
in interface IProcessor
i
- j
-
public void setStatusRegs(boolean zero, int carry)
setStatusRegs
in interface IProcessor
zero
- carry
- public void setIP(int newIP)
setIP
in interface IProcessor
public void incIP()
public void setScalarValue(char reg, int value)
setScalarValue
in interface IProcessor
public void setIsRunning(boolean isRunning)
setIsRunning
in interface IProcessor
public boolean isRunning()
isRunning
in interface IProcessor
public void setOFileNotLoaded()
setOFileNotLoaded
in interface IProcessor
public boolean isObjectFileLoaded()
isObjectFileLoaded
in interface IProcessor
public void setConfig(ProcessorConfig newConfig)
setConfig
in interface IProcessor
public void setStepping(boolean stepping)
setStepping
in interface IProcessor
public void interrupt() throws java.lang.Exception
interrupt
in interface IProcessor
java.lang.Exception
public void reset()
reset
in interface IProcessor
public java.lang.String getRegs()
getRegs
in interface IProcessor
public int getRegA()
getRegA
in interface IProcessor
public int getRegX()
getRegX
in interface IProcessor
public int getRegY()
getRegY
in interface IProcessor
public int[][] getVectorRegisters()
getVectorRegisters
in interface IProcessor
public int getZeroFlag()
getZeroFlag
in interface IProcessor
public int getCarryFlag()
getCarryFlag
in interface IProcessor
public int getIP()
getIP
in interface IProcessor
public java.util.Vector<java.lang.Integer> getBreakpoints()
getBreakpoints
in interface IProcessor
public void resetBr()
resetBr
in interface IProcessor
public void deleteBreakpoint(int address)
deleteBreakpoint
in interface IProcessor
public void setHALT(boolean HALT)
setHALT
in interface IProcessor
public boolean isHALT()
isHALT
in interface IProcessor
public java.lang.String getConfiguration()
getConfiguration
in interface IProcessor
public void setBreakpoint(int address) throws java.lang.Exception
setBreakpoint
in interface IProcessor
java.lang.Exception
public 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 |