private void cacheRecords()
        {
            var recordsFound = machine.SystemBus.Children.Where(x => x.Peripheral is IGaislerAPB);

            foreach (var record in recordsFound)
            {
                var peripheral    = (IGaislerAPB)record.Peripheral;
                var registration  = record.RegistrationPoint;
                var recordEntry   = new GaislerAPBPlugAndPlayRecord();
                var deviceAddress = registration.Range.StartAddress;
                recordEntry.ConfigurationWord.Vendor = peripheral.GetVendorID();
                recordEntry.ConfigurationWord.Device = peripheral.GetDeviceID();
                recordEntry.BankAddressRegister.Type = peripheral.GetSpaceType();
                recordEntry.ConfigurationWord.Irq    = peripheral.GetInterruptNumber();
                if (recordEntry.BankAddressRegister.Type == GaislerAPBPlugAndPlayRecord.SpaceType.APBIOSpace)
                {
                    recordEntry.BankAddressRegister.Address = (uint)((deviceAddress >> 8) & 0xfff);
                }
                recordEntry.BankAddressRegister.Mask = 0xfff;
                records.Add(recordEntry);
            }
        }
 public void Reset()
 {
     emptyRecord   = new GaislerAPBPlugAndPlayRecord();
     recordsCached = false;
     records       = new List <GaislerAPBPlugAndPlayRecord>();
 }