public override int GetHashCode()
                {
                    int hash = 1;

                    if (CoreId.Length != 0)
                    {
                        hash ^= CoreId.GetHashCode();
                    }
                    if (WoodId.Length != 0)
                    {
                        hash ^= WoodId.GetHashCode();
                    }
                    if (FlexibilityId.Length != 0)
                    {
                        hash ^= FlexibilityId.GetHashCode();
                    }
                    if (LengthId.Length != 0)
                    {
                        hash ^= LengthId.GetHashCode();
                    }
                    if (_unknownFields != null)
                    {
                        hash ^= _unknownFields.GetHashCode();
                    }
                    return(hash);
                }
Exemple #2
0
        public Core GetCore(CoreId id)
        {
            if (id.Row >= Grid.Count)
                return null;

            var list = Grid[id.Row];

            return id.Column >= list.Count ? null : list[id.Column];
        }
Exemple #3
0
 internal Core(Machine machine, CoreId id)
 {
     Machine = machine;
     Id = id;
     Registers = new RegisterFile(this);
     Interrupts = new InterruptController(this);
     Timer = new EventTimer(this);
     DirectAccess = new DirectAccessEngine(this);
     Debugger = new DebugUnit(this);
     Memory = new byte[Satori.Memory.LocalMemorySize];
     MemoryLock = new object();
     MainTask = Task.Run(async () => await CoreLoop());
 }