Emulator.Global
Class Processor

java.lang.Object
  extended by Emulator.Global.Processor
All Implemented Interfaces:
Constants

public class Processor
extends java.lang.Object
implements Constants

********************** Created By: Yuval Tzur Date: 15/12/12 Time: 18:43 Description: The system class defines the CPU architecture. The system manages the Components and runs the cycle timer. This class provides the API to the main function, which implements the instruction set. ***********************


Field Summary
static java.util.HashMap<java.lang.String,java.lang.Integer> constantTable
           
 DataComponent[] mComponentsList
           
 
Fields inherited from interface Emulator.Global.Constants
_0, _1, AC, ADDR_REGISTER_SIZE, ALU, ALU_IN0, ALU_IN1, ALU_OUT, AR, BUS, BUS_SIZE, DATA_COMPONENTS, DATA_REGISTER_SIZE, DATA_TABLE_SIZE, DR, E, FGI, FGO, I, IEN, INPR, IO_REGISTER_SIZE, IR, M, MEMORY_SIZE, OUTR, PC, R, S, TARGET_REACHED, TIMEOUT, TIMER, TIMER_LIMIT, TR, TR0, TR1, UNREACHABLE
 
Constructor Summary
Processor()
           
 
Method Summary
 boolean checkOpCode(int opCode)
           
 int get_cycleNum()
           
 int get_opCode()
           
 void halt()
           
 void loadProgram(Program program)
           
 void moveData(int fromID, int toID)
           
 void moveData(Value value, int toID)
           
 void nextCycle()
           
 void resetTimer()
           
 void set_opCode(int opCode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constantTable

public static final java.util.HashMap<java.lang.String,java.lang.Integer> constantTable

mComponentsList

public DataComponent[] mComponentsList
Constructor Detail

Processor

public Processor()
Method Detail

set_opCode

public void set_opCode(int opCode)

get_opCode

public int get_opCode()

get_cycleNum

public int get_cycleNum()

loadProgram

public void loadProgram(Program program)
                 throws java.lang.NullPointerException
Throws:
java.lang.NullPointerException

resetTimer

public void resetTimer()

halt

public void halt()

checkOpCode

public boolean checkOpCode(int opCode)

nextCycle

public void nextCycle()

moveData

public void moveData(int fromID,
                     int toID)

moveData

public void moveData(Value value,
                     int toID)