diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-08-16 16:49:05 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-08-16 16:49:05 -0400 |
commit | bba265ccd8f50376ac2f148c4dd85b9eca30e8da (patch) | |
tree | b2110d2ab1bef719bc60b6cd473ae18c6b3c1a36 /src/dev/Pci.py | |
parent | 773cb77656174b221c1e51b92a8af7d8e268b733 (diff) | |
download | gem5-bba265ccd8f50376ac2f148c4dd85b9eca30e8da.tar.xz |
PCI: Move PCI Configuration data into devices now that we can inherit parameters.
--HG--
extra : convert_revision : bd2214b28fb46a9a9e9e204e0539be33acb548ad
Diffstat (limited to 'src/dev/Pci.py')
-rw-r--r-- | src/dev/Pci.py | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/src/dev/Pci.py b/src/dev/Pci.py index b2c013f41..b50e1b15c 100644 --- a/src/dev/Pci.py +++ b/src/dev/Pci.py @@ -31,8 +31,23 @@ from m5.params import * from m5.proxy import * from Device import BasicPioDevice, DmaDevice, PioDevice -class PciConfigData(SimObject): - type = 'PciConfigData' +class PciConfigAll(PioDevice): + type = 'PciConfigAll' + pio_latency = Param.Tick(1, "Programmed IO latency in simticks") + bus = Param.UInt8(0x00, "PCI bus to act as config space for") + size = Param.MemorySize32('16MB', "Size of config space") + + +class PciDevice(DmaDevice): + type = 'PciDevice' + abstract = True + config = Port(Self.pio.peerObj.port, "PCI configuration space port") + pci_bus = Param.Int("PCI bus") + pci_dev = Param.Int("PCI device number") + pci_func = Param.Int("PCI function code") + pio_latency = Param.Latency('1ns', "Programmed IO latency in simticks") + config_latency = Param.Latency('20ns', "Config read or write latency") + VendorID = Param.UInt16("Vendor ID") DeviceID = Param.UInt16("Device ID") Command = Param.UInt16(0, "Command") @@ -68,20 +83,4 @@ class PciConfigData(SimObject): MaximumLatency = Param.UInt8(0x00, "Maximum Latency") MinimumGrant = Param.UInt8(0x00, "Minimum Grant") -class PciConfigAll(PioDevice): - type = 'PciConfigAll' - pio_latency = Param.Tick(1, "Programmed IO latency in simticks") - bus = Param.UInt8(0x00, "PCI bus to act as config space for") - size = Param.MemorySize32('16MB', "Size of config space") - -class PciDevice(DmaDevice): - type = 'PciDevice' - abstract = True - config = Port(Self.pio.peerObj.port, "PCI configuration space port") - pci_bus = Param.Int("PCI bus") - pci_dev = Param.Int("PCI device number") - pci_func = Param.Int("PCI function code") - pio_latency = Param.Latency('1ns', "Programmed IO latency in simticks") - configdata = Param.PciConfigData(Parent.any, "PCI Config data") - config_latency = Param.Latency('20ns', "Config read or write latency") |