Example #1
0
        public void ReceiveControlSignal(string microInstruction)
        {
            view.HighLightLine(ExternalMemory.GetActualCommand());

            char[] instArray = microInstruction.ToCharArray();
            if (InstructionIsValid(instArray))
            {
                SendControlSignal(instArray);
                SendPortSignal(instArray);
            }
        }
Example #2
0
 public ComputerUnit(UC controlUnit, Interface view)
 {
     ControlUnit                  = controlUnit;
     Memory                       = new ExternalMemory();
     PortMapping                  = new PortSignalMapping(this);
     InstructionRegister          = new Register("IR");
     InstructionRegisterOpSource1 = new Register("IR OP1");
     InstructionRegisterOpSource2 = new Register("IR OP2");
     InstructionRegisterOpDestiny = new Register("IR OP3");
     MemoryAddressRegister        = new Register("MAR");
     ProgramCounter               = new Register("PC");
     MemoryBufferRegister         = new Register("MBR");
     S1Register                   = new Register("S1");
     S2Register                   = new Register("S2");
     S3Register                   = new Register("S3");
     S4Register                   = new Register("S4");
     ULAXRegister                 = new Register("X");
     ACRegister                   = new Register("AC");
     ULA       = new ArithmeticLogicUnit(this, view);
     this.view = view;
 }
Example #3
0
        private void SendControlSignal(char[] instArray)
        {
            view.HighLightLine(ExternalMemory.GetActualCommand());

            ULA.ReceiveOpCode(instArray[(ExternalControlPortNumberLimit + 1)..(ExternalControlPortNumberLimit + 4)]);
Example #4
0
 public PortSignalMapping(ComputerUnit CPU)
 {
     Cpu    = CPU;
     Memory = CPU.Memory;
 }
Example #5
0
 internal void Initialize()
 {
     View.OnPlay += View_OnPlay;
     Memory       = new ExternalMemory();
 }