|
||||||||||
| 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(java.io.InputStream micAsm,
java.io.InputStream asm)
Constructs a new Mic1-processor, reading the given inputstreams as micro-program and assembler-program. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
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 |
getNextMacroAddress()
Returns the address of the code line that'll be executed next. |
int |
getNextMpc()
Returns the address of the micro code line that'll be executed by the next tick. |
int |
getOldMpc()
Returns the address of the last executed micro code line. |
int |
hashCode()
|
void |
interrupt()
Interrupts the processor. |
boolean |
isHaltInstruction()
Returns whether the current instruction is the halt-instruction. |
boolean |
isInterrupted()
Returns whether the processor is interrupted. |
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, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Mic1(java.io.InputStream micAsm,
java.io.InputStream asm)
throws MacroFileFormatException,
MicroFileFormatException
micAsm - the micro-assembler-programasm - the assembler-program
MacroFileFormatException - if the macro assembler program has invalid format
MicroFileFormatException - if the micro assembler program has invalid 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.
@NotNull public Memory getMemory()
Memory of this processor.public int getLastMacroAddress()
public int getNextMacroAddress()
public int getOldMpc()
public int getNextMpc()
@NotNull public MicroControlStore getControlStore()
MicroControlStore storing the micro code of the processorpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic void interrupt()
public boolean isInterrupted()
true, if the processor has been interrupted while executing ticks,false if the processor hasn't been interrupted while executing the last ticks.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||