示例#1
0
        public Core( Cpu cpu, int coreId, string coreName, CoreAttributes attributes )
        {
            Debug.Assert( cpu != null );
            Debug.Assert( coreId >= 0 );
            Debug.Assert( coreName != null );

            Cpu = cpu;
            _coreId = coreId;
            _coreName = coreName;

            Cp0 = new Coprocessor0( _coreId );
            Cp1 = new Coprocessor1();

            bool hasCp2 = ( attributes & CoreAttributes.HasCp2 ) == CoreAttributes.HasCp2;
            if( hasCp2 )
                Cp2 = new Coprocessor2();

            Registers = new int[ 32 ];

            this.Clear();
        }
示例#2
0
        public Core(Cpu cpu, int coreId, string coreName, CoreAttributes attributes)
        {
            Debug.Assert(cpu != null);
            Debug.Assert(coreId >= 0);
            Debug.Assert(coreName != null);

            Cpu       = cpu;
            _coreId   = coreId;
            _coreName = coreName;

            Cp0 = new Coprocessor0(_coreId);
            Cp1 = new Coprocessor1();

            bool hasCp2 = (attributes & CoreAttributes.HasCp2) == CoreAttributes.HasCp2;

            if (hasCp2)
            {
                Cp2 = new Coprocessor2();
            }

            Registers = new int[32];

            this.Clear();
        }