Beispiel #1
0
 private void UpdateIo(PinStates pinStates)
 {
     Io.Clk.Enable  = pinStates.IoClk.Enable;
     Io.Clk.Set     = pinStates.IoClk.Set;
     Io.DataAddress = pinStates.IoDataAddress;
     Io.InputOutput = pinStates.IoInputOutput;
 }
Beispiel #2
0
 public void UpdatePins(PinStates pinStates)
 {
     UpdatePins(GeneralPurposeRegisters, pinStates.GeneralPurposeRegisters);
     UpdatePins(Ir, pinStates.Ir);
     UpdatePins(Iar, pinStates.Iar);
     UpdatePins(Acc, pinStates.Acc);
     UpdatePins(Ram, pinStates.Ram);
     UpdatePins(Tmp, pinStates.Tmp);
     Ram.MemoryAddressRegister.Set = pinStates.Mar;
     Bus1.Set       = pinStates.Bus1;
     Alu.Op         = pinStates.Op;
     Flags.Set      = pinStates.Flags;
     CarryInTmp.Set = pinStates.CarryInTmp;
     UpdateIo(pinStates);
 }
        public PinStates Step()
        {
            // reset the pin states so nothing is from previous state
            PinStates = new PinStates();

            PinStates.ClockOutput   = _clock.Cycle();
            PinStates.StepperOutput = _stepper.Step(PinStates.ClockOutput.Clk);

            Update3X8();

            UpdateStep1Pins();
            UpdateStep2Pins();
            UpdateStep3Pins();
            UpdateStep4Pins();
            UpdateStep5Pins();
            UpdateStep6Pins();

            UpdateGeneralPurposeRegisters(PinStates.RegA.Enable, PinStates.RegB.Enable, PinStates.RegB.Set);
            UpdateIoAllSteps();

            return(PinStates);
        }