Ethernet.py revision 1647
1from Device import DmaDevice 2from Pci import PciDevice 3 4simobj EtherInt(SimObject): 5 type = 'EtherInt' 6 abstract = True 7 peer = Param.EtherInt(NULL, "peer interface") 8 9simobj EtherLink(SimObject): 10 type = 'EtherLink' 11 int1 = Param.EtherInt("interface 1") 12 int2 = Param.EtherInt("interface 2") 13 delay = Param.Latency('0us', "packet transmit delay") 14 speed = Param.NetworkBandwidth('100Mbps', "link speed") 15 dump = Param.EtherDump(NULL, "dump object") 16 17simobj EtherBus(SimObject): 18 type = 'EtherBus' 19 loopback = Param.Bool(True, "send packet back to the sending interface") 20 dump = Param.EtherDump(NULL, "dump object") 21 speed = Param.NetworkBandwidth('100Mbps', "bus speed in bits per second") 22 23simobj EtherTap(EtherInt): 24 type = 'EtherTap' 25 bufsz = Param.Int(10000, "tap buffer size") 26 dump = Param.EtherDump(NULL, "dump object") 27 port = Param.UInt16(3500, "tap port") 28 29simobj EtherDump(SimObject): 30 type = 'EtherDump' 31 file = Param.String("dump file") 32 33simobj EtherDev(DmaDevice): 34 type = 'EtherDev' 35 hardware_address = Param.EthernetAddr(NextEthernetAddr, 36 "Ethernet Hardware Address") 37 38 dma_data_free = Param.Bool(False, "DMA of Data is free") 39 dma_desc_free = Param.Bool(False, "DMA of Descriptors is free") 40 dma_read_delay = Param.Latency('0us', "fixed delay for dma reads") 41 dma_read_factor = Param.Latency('0us', "multiplier for dma reads") 42 dma_write_delay = Param.Latency('0us', "fixed delay for dma writes") 43 dma_write_factor = Param.Latency('0us', "multiplier for dma writes") 44 dma_no_allocate = Param.Bool(True, "Should we allocate cache on read") 45 46 rx_filter = Param.Bool(True, "Enable Receive Filter") 47 rx_delay = Param.Latency('1us', "Receive Delay") 48 tx_delay = Param.Latency('1us', "Transmit Delay") 49 50 intr_delay = Param.Latency('0us', "Interrupt Delay") 51 payload_bus = Param.Bus(NULL, "The IO Bus to attach to for payload") 52 physmem = Param.PhysicalMemory(parent.any, "Physical Memory") 53 tlaser = Param.Turbolaser(parent.any, "Turbolaser") 54 55simobj NSGigE(PciDevice): 56 type = 'NSGigE' 57 hardware_address = Param.EthernetAddr(NextEthernetAddr, 58 "Ethernet Hardware Address") 59 60 cycle_time = Param.Frequency('100MHz', "State machine processor frequency") 61 62 dma_data_free = Param.Bool(False, "DMA of Data is free") 63 dma_desc_free = Param.Bool(False, "DMA of Descriptors is free") 64 dma_read_delay = Param.Latency('0us', "fixed delay for dma reads") 65 dma_read_factor = Param.Latency('0us', "multiplier for dma reads") 66 dma_write_delay = Param.Latency('0us', "fixed delay for dma writes") 67 dma_write_factor = Param.Latency('0us', "multiplier for dma writes") 68 dma_no_allocate = Param.Bool(True, "Should we allocate cache on read") 69 70 71 rx_filter = Param.Bool(True, "Enable Receive Filter") 72 rx_delay = Param.Latency('1us', "Receive Delay") 73 tx_delay = Param.Latency('1us', "Transmit Delay") 74 75 rx_fifo_size = Param.MemorySize('128kB', "max size in bytes of rxFifo") 76 tx_fifo_size = Param.MemorySize('128kB', "max size in bytes of txFifo") 77 78 m5reg = Param.UInt32(0, "Register for m5 usage") 79 80 intr_delay = Param.Latency('0us', "Interrupt Delay in microseconds") 81 payload_bus = Param.Bus(NULL, "The IO Bus to attach to for payload") 82 physmem = Param.PhysicalMemory(parent.any, "Physical Memory") 83 84simobj EtherDevInt(EtherInt): 85 type = 'EtherDevInt' 86 device = Param.EtherDev("Ethernet device of this interface") 87 88simobj NSGigEInt(EtherInt): 89 type = 'NSGigEInt' 90 device = Param.NSGigE("Ethernet device of this interface") 91 92 93