From bba265ccd8f50376ac2f148c4dd85b9eca30e8da Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Thu, 16 Aug 2007 16:49:05 -0400 Subject: PCI: Move PCI Configuration data into devices now that we can inherit parameters. --HG-- extra : convert_revision : bd2214b28fb46a9a9e9e204e0539be33acb548ad --- src/dev/Ethernet.py | 52 +++++++++++++++++++++++----------------------------- 1 file changed, 23 insertions(+), 29 deletions(-) (limited to 'src/dev/Ethernet.py') diff --git a/src/dev/Ethernet.py b/src/dev/Ethernet.py index bef9a0a20..2beb0d537 100644 --- a/src/dev/Ethernet.py +++ b/src/dev/Ethernet.py @@ -29,7 +29,7 @@ from m5.SimObject import SimObject from m5.params import * from m5.proxy import * -from Pci import PciDevice, PciConfigData +from Pci import PciDevice class EtherObject(SimObject): type = 'EtherObject' @@ -79,8 +79,6 @@ class IGbE(EtherDevice): tx_desc_cache_size = Param.Int(64, "Number of enteries in the rx descriptor cache") clock = Param.Clock('500MHz', "Clock speed of the device") - -class IGbEPciData(PciConfigData): VendorID = 0x8086 DeviceID = 0x1075 SubsystemID = 0x1008 @@ -125,7 +123,13 @@ class EtherDevBase(EtherDevice): tx_thread = Param.Bool(False, "dedicated kernel threads for receive") rss = Param.Bool(False, "Receive Side Scaling") -class NSGigEPciData(PciConfigData): +class NSGigE(EtherDevBase): + type = 'NSGigE' + + dma_data_free = Param.Bool(False, "DMA of Data is free") + dma_desc_free = Param.Bool(False, "DMA of Descriptors is free") + dma_no_allocate = Param.Bool(True, "Should we allocate cache on read") + VendorID = 0x100B DeviceID = 0x0022 Status = 0x0290 @@ -145,17 +149,25 @@ class NSGigEPciData(PciConfigData): BAR0Size = '256B' BAR1Size = '4kB' -class NSGigE(EtherDevBase): - type = 'NSGigE' - dma_data_free = Param.Bool(False, "DMA of Data is free") - dma_desc_free = Param.Bool(False, "DMA of Descriptors is free") - dma_no_allocate = Param.Bool(True, "Should we allocate cache on read") - configdata = NSGigEPciData() +class Sinic(EtherDevBase): + type = 'Sinic' + cxx_namespace = 'Sinic' + cxx_class = 'Device' + rx_max_copy = Param.MemorySize('1514B', "rx max copy") + tx_max_copy = Param.MemorySize('16kB', "tx max copy") + rx_max_intr = Param.UInt32(10, "max rx packets per interrupt") + rx_fifo_threshold = Param.MemorySize('384kB', "rx fifo high threshold") + rx_fifo_low_mark = Param.MemorySize('128kB', "rx fifo low threshold") + tx_fifo_high_mark = Param.MemorySize('384kB', "tx fifo high threshold") + tx_fifo_threshold = Param.MemorySize('128kB', "tx fifo low threshold") + virtual_count = Param.UInt32(1, "Virtualized SINIC") + zero_copy = Param.Bool(False, "Zero copy receive") + delay_copy = Param.Bool(False, "Delayed copy transmit") + virtual_addr = Param.Bool(False, "Virtual addressing") -class SinicPciData(PciConfigData): VendorID = 0x1291 DeviceID = 0x1293 Status = 0x0290 @@ -174,22 +186,4 @@ class SinicPciData(PciConfigData): InterruptPin = 0x01 BAR0Size = '64kB' -class Sinic(EtherDevBase): - type = 'Sinic' - cxx_namespace = 'Sinic' - cxx_class = 'Device' - - rx_max_copy = Param.MemorySize('1514B', "rx max copy") - tx_max_copy = Param.MemorySize('16kB', "tx max copy") - rx_max_intr = Param.UInt32(10, "max rx packets per interrupt") - rx_fifo_threshold = Param.MemorySize('384kB', "rx fifo high threshold") - rx_fifo_low_mark = Param.MemorySize('128kB', "rx fifo low threshold") - tx_fifo_high_mark = Param.MemorySize('384kB', "tx fifo high threshold") - tx_fifo_threshold = Param.MemorySize('128kB', "tx fifo low threshold") - virtual_count = Param.UInt32(1, "Virtualized SINIC") - zero_copy = Param.Bool(False, "Zero copy receive") - delay_copy = Param.Bool(False, "Delayed copy transmit") - virtual_addr = Param.Bool(False, "Virtual addressing") - - configdata = SinicPciData() -- cgit v1.2.3