hades.models.mips.instr
Class BaseInstr

java.lang.Object
  extended byhades.models.mips.instr.BaseInstr
All Implemented Interfaces:
Resetable
Direct Known Subclasses:
AluBaseInstr, AluImmBaseInstr, AluSpecialBaseInstr, BranchBaseInstr, BranchLinkBaseInstr, BreakInstr, CoprocInstr, IllegalInstr, JumpAndLinkInstr, JumpInstr, JumpRegAndLinkInstr, JumpRegInstr, LoadBaseInstr, MoveFromHiInstr, MoveFromLoInstr, MoveToHiInstr, MoveToLoInstr, NopInstr, StoreBaseInstr, SysCallInstr

public class BaseInstr
extends java.lang.Object
implements Resetable

This is the base class to all instructions implementing an interface usable for the Core. BaseInstr is like the NopInstr and does nothing real


Field Summary
protected  boolean breakpoint
           
protected  int dataMmuAdr
           
protected  int dataRealAdr
           
protected  int dataValue
           
protected  int instrFrameNumber
           
protected  java.lang.String instrLongFormat
           
protected  java.lang.String instrName
           
protected  java.lang.String instrShortFormat
           
protected  boolean isJump
           
protected  PartHandler partHandler
           
protected  Registers reg
           
protected  int regWritten
           
protected  int result
           
protected  Splitter splitter
           
 
Constructor Summary
BaseInstr(PartHandler newPartHandler, Splitter newSplitter)
           
 
Method Summary
 int calcAlu()
          Calculate ALU, return result for visualization
 boolean getBreakpoint()
          This instruction produced a breakpoint
 java.lang.String getInstrLongFormat()
           
 java.lang.String getInstrName()
          Access to disassemble information
 java.lang.String getInstrShortFormat()
           
 boolean getIsJump()
          This instruction jumps
 int giveDataAdr()
          Drive busses for data access, return real address
 void init()
          Has to be called after the instruction has been decoded
 int operateData()
          Wait until memory access is finished, return value to be written
 void por()
          Power on reset or hardware reset
 void reset()
          software reset
 void setBreakpoint(boolean newBreakpoint)
          Produce an internal breakpoint
 void setInstrFrameNumber(int newInstrFrameNumber)
          Has to be called after initialization
 int translateDataAdr()
          MMU-Translation for data access, return virtual address
 int writeRegister()
          Write resulting value into register, return register written into
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

partHandler

protected PartHandler partHandler

reg

protected Registers reg

splitter

protected Splitter splitter

instrFrameNumber

protected int instrFrameNumber

instrName

protected java.lang.String instrName

instrLongFormat

protected java.lang.String instrLongFormat

instrShortFormat

protected java.lang.String instrShortFormat

result

protected int result

regWritten

protected int regWritten

dataMmuAdr

protected int dataMmuAdr

dataRealAdr

protected int dataRealAdr

dataValue

protected int dataValue

isJump

protected boolean isJump

breakpoint

protected boolean breakpoint
Constructor Detail

BaseInstr

public BaseInstr(PartHandler newPartHandler,
                 Splitter newSplitter)
Method Detail

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

init

public void init()
Has to be called after the instruction has been decoded


setInstrFrameNumber

public void setInstrFrameNumber(int newInstrFrameNumber)
Has to be called after initialization


getInstrName

public java.lang.String getInstrName()
Access to disassemble information


getInstrLongFormat

public java.lang.String getInstrLongFormat()

getInstrShortFormat

public java.lang.String getInstrShortFormat()

getIsJump

public boolean getIsJump()
This instruction jumps


getBreakpoint

public boolean getBreakpoint()
This instruction produced a breakpoint


setBreakpoint

public void setBreakpoint(boolean newBreakpoint)
Produce an internal breakpoint


calcAlu

public int calcAlu()
Calculate ALU, return result for visualization


translateDataAdr

public int translateDataAdr()
MMU-Translation for data access, return virtual address


giveDataAdr

public int giveDataAdr()
Drive busses for data access, return real address


operateData

public int operateData()
Wait until memory access is finished, return value to be written


writeRegister

public int writeRegister()
Write resulting value into register, return register written into