# Attach off-chip devices
self.realview.attachIO(self.iobus)
- for dev_id, dev in enumerate(pci_devices):
- dev.pci_bus, dev.pci_dev, dev.pci_func = (0, dev_id + 1, 0)
+ for dev in pci_devices:
self.realview.attachPciDevice(
dev, self.iobus,
dma_ports=self._dma_ports if ruby else None)
self.dmabridge = Bridge(delay='50ns',
ranges=[self.mem_ranges[0]])
- self._pci_devices = 0
self._clusters = []
self._num_cpus = 0
def attach_pci(self, dev):
- dev.pci_bus, dev.pci_dev, dev.pci_func = \
- (0, self._pci_devices + 1, 0)
- self._pci_devices += 1
self.realview.attachPciDevice(dev, self.iobus)
def connect(self):
cxx_header = "dev/arm/realview.hh"
system = Param.System(Parent.any, "system")
_mem_regions = [ AddrRange(0, size='256MB') ]
+ _num_pci_dev = 0
def _on_chip_devices(self):
return []
def attachPciDevice(self, device, *args, **kwargs):
device.host = self.pci_host
+ self._num_pci_dev += 1
+ device.pci_bus = 0
+ device.pci_dev = self._num_pci_dev
+ device.pci_func = 0
self._attach_device(device, *args, **kwargs)
def attachSmmu(self, devices, bus):