com.github.croesch.micro_debug.mic1.controlstore
Class MicroInstruction

java.lang.Object
  extended by com.github.croesch.micro_debug.mic1.controlstore.MicroInstruction

public final class MicroInstruction
extends Object

Represents an instruction in the micro code. Based on the implementation of Ray Ontko.

MicroInstruction This class represents an instruction which might appear in the Mic-1 control store.
Ray Ontko
1998.09.01 Created


Constructor Summary
MicroInstruction(int addr, JMPSignalSet jmpSet, ALUSignalSet aluSet, CBusSignalSet cBusSet, MemorySignalSet memSet, Register b)
          Constructs a single mic1-instruction.
 
Method Summary
 boolean equals(Object obj)
           
 ALUSignalSet getAluSignals()
          Returns the ALUSignalSet of this instruction.
 Register getbBusSelect()
          Returns the value that defines the register that'll be written on the B-Bus.
 CBusSignalSet getCBusSignals()
          Returns the CBusSignalSet of this instruction.
 JMPSignalSet getJmpSignals()
          Returns the JMPSignalSet of this instruction.
 MemorySignalSet getMemorySignals()
          Returns the MemorySignalSet of this instruction.
 int getNextAddress()
          Returns the next address of this instruction.
 int hashCode()
           
 boolean isNopOrHalt()
          Returns whether this instruction simply points to another one without changing something.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MicroInstruction

public MicroInstruction(int addr,
                        JMPSignalSet jmpSet,
                        ALUSignalSet aluSet,
                        CBusSignalSet cBusSet,
                        MemorySignalSet memSet,
                        Register b)
Constructs a single mic1-instruction.

Parameters:
addr - contains the MIR[35:27]. Only the lowest nine bits are fetched, it contains the value that is used to calculate next value of MPC.
jmpSet - MIR[26:24]: set of bits that are basic for calculation of next MPC
aluSet - MIR[23:16]: set of bits that are responsible for the behavior of the ALU and the shifter
cBusSet - MIR[15:7]: set of bits that are responsible for the registers that are filled with the C-Bus value
memSet - MIR[6:4]: set of bits that are responsible for communication with external memory (main memory and program memory) details see the comments of the fields or the script of Karl Stroetmann.
b - contains the MIR[3:0]. Only the lowest four bits are fetched, it contains the bits that are used to define which register's value is written to the B-Bus.
Since:
Date: Nov 13, 2011
Method Detail

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getJmpSignals

public JMPSignalSet getJmpSignals()
Returns the JMPSignalSet of this instruction.

Returns:
a copy of the JMPSignalSet of this instruction.
Since:
Date: Nov 13, 2011

getAluSignals

public ALUSignalSet getAluSignals()
Returns the ALUSignalSet of this instruction.

Returns:
a copy of the ALUSignalSet of this instruction.
Since:
Date: Nov 13, 2011

getCBusSignals

public CBusSignalSet getCBusSignals()
Returns the CBusSignalSet of this instruction.

Returns:
a copy of the CBusSignalSet of this instruction.
Since:
Date: Nov 13, 2011

getMemorySignals

public MemorySignalSet getMemorySignals()
Returns the MemorySignalSet of this instruction.

Returns:
a copy of the MemorySignalSet of this instruction.
Since:
Date: Nov 13, 2011

getNextAddress

public int getNextAddress()
Returns the next address of this instruction.

Returns:
the address that is basic for calculation of next MPC address.
Since:
Date: Nov 13, 2011

getbBusSelect

public Register getbBusSelect()
Returns the value that defines the register that'll be written on the B-Bus.

Returns:
the Mic1BBusRegister that defines the register being written on the B-Bus.
Since:
Date: Nov 13, 2011

isNopOrHalt

public boolean isNopOrHalt()
Returns whether this instruction simply points to another one without changing something.

Returns:
true, if this instruction is simply like goto 0x..
Since:
Date: Jan 14, 2012


Copyright © 2012. All Rights Reserved.