|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.croesch.micro_debug.mic1.Mic1
public final class Mic1
This class represents the CISC-processor being debugged by this program.
| Constructor Summary | |
|---|---|
Mic1(InputStream micAsm,
InputStream asm)
Constructs a new Mic1-processor, reading the given inputstreams as micro-program and assembler-program. |
|
| Method Summary | |
|---|---|
MicroControlStore |
getControlStore()
Returns the control store of micro instructions. |
int |
getLastMacroAddress()
Returns the address of the last executed code line. |
Memory |
getMemory()
Returns the main memory. |
int |
getMemoryValue(int addr)
Returns the value of the memory at the given address. |
int |
getOldMpc()
Returns the address of the last executed micro code line. |
boolean |
isHaltInstruction()
Returns whether the current instruction is the halt-instruction. |
void |
microStep()
If the processor hasn't reached the halt instruction this executes one micro instruction. The number of effectively executed instructions is printed to the user. |
void |
microStep(int number)
Executes the given number of micro instructions. |
void |
reset()
Resets the processor to its start values, except the debugging options. |
int |
run()
Executes all instructions until the end of the program. |
void |
setMemoryValue(int addr,
int val)
Sets the value of the memory at the given address to the given value. |
void |
setProcessorInterpreter(IProcessorInterpreter ip)
Sets the interpreter of this processor. |
void |
step()
If the processor hasn't reached the halt instruction this executes one macro instruction. The number of effectively executed micro instructions is printed to the user. |
void |
step(int steps)
Executes the given number of macro instructions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Mic1(InputStream micAsm,
InputStream asm)
throws FileFormatException
micAsm - the micro-assembler-programasm - the assembler-program
FileFormatException - if one of the streams contains a file with the wrong file format| Method Detail |
|---|
public void setProcessorInterpreter(IProcessorInterpreter ip)
ip - the interpreter to store.public void reset()
Registers and current
instructions will be reset, but breakpoints or tracing options not.
public void microStep()
public void microStep(int number)
number - micro instructions to execute, if possible.public void step()
public void step(int steps)
steps - the number of macro instructions to executepublic int run()
public boolean isHaltInstruction()
true, if the current instruction causes the processor to halt
public void setMemoryValue(int addr,
int val)
addr - the address, where to set the new valueval - the new valuepublic int getMemoryValue(int addr)
addr - the address to read the value from the memory.
public Memory getMemory()
Memory of this processor.public int getLastMacroAddress()
public int getOldMpc()
public MicroControlStore getControlStore()
MicroControlStore storing the micro code of the processor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||