Beispiel #1
0
 private void silence()
 {
     sample = 0;
     m_context.cancel(sampleEvent);
     m_context.cancel(galwayEvent);
     m_context.schedule(m_xsid.xsidEvent, 0, m_phase);
 }
Beispiel #2
0
        // Component Standard Calls

        public virtual void reset()
        {
            ta           = ta_latch = 0xffff;
            tb           = tb_latch = 0xffff;
            ta_underflow = tb_underflow = false;
            cra          = crb = sdr_out = 0;
            sdr_count    = 0;
            sdr_buffered = false;
            // Clear off any IRQs
            trigger(0);
            cnt_high    = true;
            icr         = idr = 0;
            m_accessClk = 0;
            dpa         = 0xf0;
            for (int i = 0; i < regs.Length; i++)
            {
                regs[i] = 0;
            }

            // Reset tod
            for (int i = 0; i < m_todclock.Length; i++)
            {
                m_todclock[i] = 0;
            }
            for (int i = 0; i < m_todalarm.Length; i++)
            {
                m_todalarm[i] = 0;
            }
            for (int i = 0; i < m_todlatch.Length; i++)
            {
                m_todlatch[i] = 0;
            }

            m_todlatched = false;
            m_todstopped = true;
            m_todclock[TOD_HR - TOD_TEN] = 1; // the most common value
            m_todCycles = 0;

            // Remove outstanding events
            event_context.cancel(event_ta);
            event_context.cancel(event_tb);
            event_context.schedule(event_tod, 0, m_phase);
        }
Beispiel #3
0
        public void reset(bool seed)
        {
            locked = false;
            ta     = ta_latch = m_count;
            cra    = 0;
            // Initialise random number generator
            if (seed)
            {
                rnd = 0;
            }
            else
            {
#if DEBUG
                rnd = 1;
#else
                rnd += DateTime.Now.Millisecond & 0xff;
#endif
            }
            m_accessClk = 0;
            // Remove outstanding events
            m_eventContext.cancel(m_taEvent);
        }