Ethernet.py revision 1369
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.Tick(0, "transmit delay of packets in us") 14 speed = Param.Tick(100000000, "link speed in bits per second") 15 dump = Param.EtherDump(NULL, "dump object") 16 17simobj EtherBus(SimObject): 18 type = 'EtherBus' 19 loopback = Param.Bool(True, 20 "send packet back to the interface from which it came") 21 dump = Param.EtherDump(NULL, "dump object") 22 speed = Param.UInt64(100000000, "bus speed in bits per second") 23 24simobj EtherTap(EtherInt): 25 type = 'EtherTap' 26 bufsz = Param.Int(10000, "tap buffer size") 27 dump = Param.EtherDump(NULL, "dump object") 28 port = Param.UInt16(3500, "tap port") 29 30simobj EtherDump(SimObject): 31 type = 'EtherDump' 32 file = Param.String("dump file") 33 34simobj EtherDev(DmaDevice): 35 type = 'EtherDev' 36 hardware_address = Param.EthernetAddr(NextEthernetAddr, 37 "Ethernet Hardware Address") 38 39 dma_data_free = Param.Bool(False, "DMA of Data is free") 40 dma_desc_free = Param.Bool(False, "DMA of Descriptors is free") 41 dma_read_delay = Param.Tick(0, "fixed delay for dma reads") 42 dma_read_factor = Param.Tick(0, "multiplier for dma reads") 43 dma_write_delay = Param.Tick(0, "fixed delay for dma writes") 44 dma_write_factor = Param.Tick(0, "multiplier for dma writes") 45 46 rx_filter = Param.Bool(True, "Enable Receive Filter") 47 rx_delay = Param.Tick(1000, "Receive Delay") 48 tx_delay = Param.Tick(1000, "Transmit Delay") 49 50 intr_delay = Param.Tick(0, "Interrupt Delay in microseconds") 51 payload_bus = Param.Bus(NULL, "The IO Bus to attach to for payload") 52 physmem = Param.PhysicalMemory(Super, "Physical Memory") 53 tlaser = Param.Turbolaser(Super, "Turbolaser") 54 55simobj NSGigE(PciDevice): 56 type = 'NSGigE' 57 hardware_address = Param.EthernetAddr(NextEthernetAddr, 58 "Ethernet Hardware Address") 59 60 dma_data_free = Param.Bool(False, "DMA of Data is free") 61 dma_desc_free = Param.Bool(False, "DMA of Descriptors is free") 62 dma_read_delay = Param.Tick(0, "fixed delay for dma reads") 63 dma_read_factor = Param.Tick(0, "multiplier for dma reads") 64 dma_write_delay = Param.Tick(0, "fixed delay for dma writes") 65 dma_write_factor = Param.Tick(0, "multiplier for dma writes") 66 67 rx_filter = Param.Bool(True, "Enable Receive Filter") 68 rx_delay = Param.Tick(1000, "Receive Delay") 69 tx_delay = Param.Tick(1000, "Transmit Delay") 70 71 rx_fifo_size = Param.Int(131072, "max size in bytes of rxFifo") 72 tx_fifo_size = Param.Int(131072, "max size in bytes of txFifo") 73 74 intr_delay = Param.Tick(0, "Interrupt Delay in microseconds") 75 payload_bus = Param.Bus(NULL, "The IO Bus to attach to for payload") 76 physmem = Param.PhysicalMemory(Super, "Physical Memory") 77 78simobj EtherDevInt(EtherInt): 79 type = 'EtherDevInt' 80 device = Param.EtherDev("Ethernet device of this interface") 81 82simobj NSGigEInt(EtherInt): 83 type = 'NSGigEInt' 84 device = Param.NSGigE("Ethernet device of this interface") 85 86 87