Esempio n. 1
0
        /// <summary>
        /// The constructor for the ALU to initalize some parameters
        /// </summary>
        /// <param name="_cpuBus">The CPU's bus reference to be held by the ALU</param>
        public ALU8b(Bus _cpuBus, VonNeumannCPU cpu) : base(cpu)
        {
            inputBus = _cpuBus;

            outputBus = new Bus(8);

            flags = new BitArray(4, false);

            InputBRegister             = new Register(8, inputBus, outputBus);
            InputBRegister.enableToBus = true;

            aluRegister = new Register(8, outputBus, inputBus);

            outputBus.BusUpdateEvent += (n) => InputB = new BitArray(n);
        }
Esempio n. 2
0
 public CPU8bBuilder()
 {
     cpu = new VonNeumannCPU();
 }
Esempio n. 3
0
 public ControlUnit8b(VonNeumannCPU _cpu) : base(_cpu)
 {
     cpu      = _cpu;
     inputBus = cpu.cpuBus;
 }