Exemple #1
0
        /// <summary>
        /// Resets the CPU into a known state.
        /// </summary>
        public void Reset()
        {
            //CPU Reset logic
            mGpRegisters.Reset(0xffffffff);
            mSpRegisters.Reset(0x00000000);

            mSpRegisters[RegisterFile.SpRegister.cctrl] = 0x00000008;

            //PC = 0; //Run user program, assuming its entrypoint is the default of 0.
            PC = 0x00080000; //Run monitor

            mInterruptStatus = 0;
        }
        /// <summary>
        /// Resets the CPU into a known state.
        /// </summary>
        public void Reset()
        {
            //CPU Reset logic
            mGpRegisters.Reset(0xffffffff);
            mSpRegisters.Reset(0x00000000);

            mSpRegisters[RegisterFile.SpRegister.cctrl] = 0x00000008;

            //mIR.Reset();
            //mPC = 1; //Run user program (assumes the start address is 1; not always the case!)
            mPC = 0x00080000; //Run monitor

            mInterruptStatus = 0;
        }