public void ReceiveControlSignal(string microInstruction) { view.HighLightLine(ExternalMemory.GetActualCommand()); char[] instArray = microInstruction.ToCharArray(); if (InstructionIsValid(instArray)) { SendControlSignal(instArray); SendPortSignal(instArray); } }
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; }
private void SendControlSignal(char[] instArray) { view.HighLightLine(ExternalMemory.GetActualCommand()); ULA.ReceiveOpCode(instArray[(ExternalControlPortNumberLimit + 1)..(ExternalControlPortNumberLimit + 4)]);
public PortSignalMapping(ComputerUnit CPU) { Cpu = CPU; Memory = CPU.Memory; }
internal void Initialize() { View.OnPlay += View_OnPlay; Memory = new ExternalMemory(); }