Exemplo n.º 1
0
            protected override void ExecuteSpecialFunction1(MicroInstruction instruction)
            {
                EthernetF1 ef1 = (EthernetF1)instruction.F1;

                switch (ef1)
                {
                case EthernetF1.EILFCT:
                    // Nothing; handled in Early handler.
                    break;

                case EthernetF1.EPFCT:
                    // Post Function. Gates interface status to BUS[8-15]. Resets the interface at
                    // the end of the cycle and removes wakeup for this task.
                    _busData &= _ethernetController.Status;
                    _ethernetController.ResetInterface();
                    _wakeup = false;
                    Log.Write(LogComponent.EthernetController, "EPFCT: Status {0}, bus now {1}",
                              Conversion.ToOctal(_ethernetController.Status),
                              Conversion.ToOctal(_busData));
                    break;

                case EthernetF1.EWFCT:
                    // Countdown Wakeup Function. Sets a flip flop in the interface that will
                    // cause a wakeup to the Ether task on the next tick of SWAKMRT. This
                    // function must be issued in the instruction after a TASK. The resulting
                    // wakeup is cleared when the Ether task next runs.
                    Log.Write(LogComponent.EthernetController, "Enabling countdown wakeups.");
                    _ethernetController.CountdownWakeup = true;
                    break;

                default:
                    throw new NotImplementedException(String.Format("Unimplemented Ethernet F1 {0}", ef1));
                }
            }
Exemplo n.º 2
0
            protected override void ExecuteSpecialFunction1Early(MicroInstruction instruction)
            {
                EthernetF1 ef1 = (EthernetF1)instruction.F1;

                switch (ef1)
                {
                case EthernetF1.EILFCT:
                    // Early: Input Look Function. Gates the contents of the FIFO to BUS[0-15] but does
                    // not increment the read pointer.
                    _busData &= _ethernetController.ReadInputFifo(true /* do not increment read pointer */);
                    break;
                }
            }