hades.models.mips.core
Class Registers
java.lang.Object
hades.models.mips.memory.BreakPointMemory
hades.models.mips.core.Registers
- All Implemented Interfaces:
- Memory, Resetable
- public class Registers
- extends BreakPointMemory
- implements Resetable
35 Registers with 32 bits, accessable with the Memory interface.
Regster 0 always contains 0, 31 registers are for general purpose
use and pc, lo and hi are the program counter, lo and hi registers
for multiplication/division.
Fields inherited from class hades.models.mips.memory.BreakPointMemory |
BP_IDLE, BP_READALL, BP_READVAL, BP_WRITEALL, BP_WRITEVAL, bpHandler, bpHandlerInstalled, debug, mem, readBP, readVal, writeBP, writeVal |
Methods inherited from class hades.models.mips.memory.BreakPointMemory |
getLog, getMemory, getMemorySize, getReadBPMemory, getReadValMemory, getWordWidth, getWriteBPMemory, getWriteValMemory, installBreakPointHandler, installEntryHandler, setEntry, setLog, setReadBP, setWriteBP |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PC
public static final int PC
- See Also:
- Constant Field Values
LO
public static final int LO
- See Also:
- Constant Field Values
HI
public static final int HI
- See Also:
- Constant Field Values
partHandler
protected PartHandler partHandler
Registers
public Registers(PartHandler newPartHandler)
por
public void por()
- Power on reset or hardware reset
- Specified by:
por
in interface Resetable
reset
public void reset()
- software reset
- Specified by:
reset
in interface Resetable
readMemory
public int readMemory(int address)
- Read a word from the memory
- Specified by:
readMemory
in interface Memory
- Overrides:
readMemory
in class BreakPointMemory
writeMemory
public void writeMemory(int address,
int word)
- Write a word into the memory
- Specified by:
writeMemory
in interface Memory
- Overrides:
writeMemory
in class BreakPointMemory
readRegister
public int readRegister(int register)
writeRegister
public void writeRegister(int register,
int value)
readPC
public int readPC()
incAndReadPC
public int incAndReadPC()
writePC
public void writePC(int newValue)
readLO
public int readLO()
writeLO
public void writeLO(int newValue)
readHI
public int readHI()
writeHI
public void writeHI(int newValue)