예제 #1
0
            protected override void ExecuteSpecialFunction2PostBusSource(MicroInstruction instruction)
            {
                TridentF2 tf2 = (TridentF2)instruction.F2;

                switch (tf2)
                {
                case TridentF2.ReadKDTA:
                    //
                    // <-KDTA is actually MD<- (SF 6), repurposed to gate disk data onto the bus
                    // iff BS is None.  Otherwise it behaves like a normal MD<-.  We'll let
                    // the normal Task implementation handle the actual MD<- operation.
                    //
                    if (instruction.BS == BusSource.None)
                    {
                        // _busData at this point should be 0xffff.  We could technically
                        // just directly assign the bits...
                        _busData &= _tridentController.KDTA;
                    }
                    break;

                case TridentF2.STATUS:
                    _busData &= _tridentController.STATUS;
                    break;

                case TridentF2.EMPTY:
                    _tridentController.WaitForEmpty();
                    break;
                }
            }
예제 #2
0
        private static string DisassembleTridentSpecialFunction2(MicroInstruction instruction)
        {
            TridentF2 tf2 = (TridentF2)instruction.F2;

            switch (tf2)
            {
            case TridentF2.EMPTY:
                return("EMPTY ");

            case TridentF2.KTAG:
                return("KTAG<- ");

            case TridentF2.ReadKDTA:
                return("<-KDTA ");

            case TridentF2.RESET:
                return("RESET ");

            case TridentF2.STATUS:
                return("STATUS ");

            case TridentF2.WAIT:
            case TridentF2.WAIT2:
                return("WAIT ");

            case TridentF2.WriteKDTA:
                return("KDTA<- ");

            default:
                return(String.Format("Trident F2 {0}", Conversion.ToOctal((int)tf2)));
            }
        }
예제 #3
0
            protected override void ExecuteSpecialFunction2(MicroInstruction instruction)
            {
                TridentF2 tf2 = (TridentF2)instruction.F2;

                switch (tf2)
                {
                case TridentF2.KTAG:
                    _tridentController.TagInstruction(_busData);
                    break;

                case TridentF2.WriteKDTA:
                    _tridentController.KDTA = _busData;
                    break;

                case TridentF2.WAIT:
                case TridentF2.WAIT2:
                    // Identical to BLOCK
                    this.BlockTask();
                    break;

                case TridentF2.RESET:
                    _tridentController.ControllerReset();
                    break;

                case TridentF2.STATUS:
                case TridentF2.EMPTY:
                    // Handled in PostBusSource override.
                    break;

                default:
                    throw new InvalidOperationException(String.Format("Unhandled trident special function 2 {0}", tf2));
                }
            }