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