Ethernet.py revision 1647
17927SN/Afrom Device import DmaDevice
27927SN/Afrom Pci import PciDevice
37927SN/A
410036SAli.Saidi@ARM.comsimobj EtherInt(SimObject):
58835SAli.Saidi@ARM.com    type = 'EtherInt'
610036SAli.Saidi@ARM.com    abstract = True
77927SN/A    peer = Param.EtherInt(NULL, "peer interface")
87927SN/A
97927SN/Asimobj EtherLink(SimObject):
107927SN/A    type = 'EtherLink'
117927SN/A    int1 = Param.EtherInt("interface 1")
127927SN/A    int2 = Param.EtherInt("interface 2")
1310315Snilay@cs.wisc.edu    delay = Param.Latency('0us', "packet transmit delay")
147927SN/A    speed = Param.NetworkBandwidth('100Mbps', "link speed")
157927SN/A    dump = Param.EtherDump(NULL, "dump object")
169885Sstever@gmail.com
179885Sstever@gmail.comsimobj EtherBus(SimObject):
187927SN/A    type = 'EtherBus'
1910036SAli.Saidi@ARM.com    loopback = Param.Bool(True, "send packet back to the sending interface")
207927SN/A    dump = Param.EtherDump(NULL, "dump object")
217927SN/A    speed = Param.NetworkBandwidth('100Mbps', "bus speed in bits per second")
227927SN/A
2311167Sjthestness@gmail.comsimobj EtherTap(EtherInt):
2410315Snilay@cs.wisc.edu    type = 'EtherTap'
257927SN/A    bufsz = Param.Int(10000, "tap buffer size")
2610315Snilay@cs.wisc.edu    dump = Param.EtherDump(NULL, "dump object")
277927SN/A    port = Param.UInt16(3500, "tap port")
289474Snilay@cs.wisc.edu
298673SN/Asimobj EtherDump(SimObject):
3010736Snilay@cs.wisc.edu    type = 'EtherDump'
3111167Sjthestness@gmail.com    file = Param.String("dump file")
328673SN/A
3311167Sjthestness@gmail.comsimobj EtherDev(DmaDevice):
347927SN/A    type = 'EtherDev'
357927SN/A    hardware_address = Param.EthernetAddr(NextEthernetAddr,
367927SN/A        "Ethernet Hardware Address")
377927SN/A
387927SN/A    dma_data_free = Param.Bool(False, "DMA of Data is free")
397927SN/A    dma_desc_free = Param.Bool(False, "DMA of Descriptors is free")
407927SN/A    dma_read_delay = Param.Latency('0us', "fixed delay for dma reads")
417927SN/A    dma_read_factor = Param.Latency('0us', "multiplier for dma reads")
427927SN/A    dma_write_delay = Param.Latency('0us', "fixed delay for dma writes")
438983Snate@binkert.org    dma_write_factor = Param.Latency('0us', "multiplier for dma writes")
447927SN/A    dma_no_allocate = Param.Bool(True, "Should we allocate cache on read")
457927SN/A
467927SN/A    rx_filter = Param.Bool(True, "Enable Receive Filter")
477927SN/A    rx_delay = Param.Latency('1us', "Receive Delay")
4810036SAli.Saidi@ARM.com    tx_delay = Param.Latency('1us', "Transmit Delay")
497927SN/A
507927SN/A    intr_delay = Param.Latency('0us', "Interrupt Delay")
517927SN/A    payload_bus = Param.Bus(NULL, "The IO Bus to attach to for payload")
527927SN/A    physmem = Param.PhysicalMemory(parent.any, "Physical Memory")
537927SN/A    tlaser = Param.Turbolaser(parent.any, "Turbolaser")
547927SN/A
557927SN/Asimobj NSGigE(PciDevice):
567927SN/A    type = 'NSGigE'
577927SN/A    hardware_address = Param.EthernetAddr(NextEthernetAddr,
587927SN/A        "Ethernet Hardware Address")
5910036SAli.Saidi@ARM.com
607927SN/A    cycle_time = Param.Frequency('100MHz', "State machine processor frequency")
617927SN/A
627927SN/A    dma_data_free = Param.Bool(False, "DMA of Data is free")
637927SN/A    dma_desc_free = Param.Bool(False, "DMA of Descriptors is free")
648835SAli.Saidi@ARM.com    dma_read_delay = Param.Latency('0us', "fixed delay for dma reads")
658835SAli.Saidi@ARM.com    dma_read_factor = Param.Latency('0us', "multiplier for dma reads")
669885Sstever@gmail.com    dma_write_delay = Param.Latency('0us', "fixed delay for dma writes")
678835SAli.Saidi@ARM.com    dma_write_factor = Param.Latency('0us', "multiplier for dma writes")
6810036SAli.Saidi@ARM.com    dma_no_allocate = Param.Bool(True, "Should we allocate cache on read")
698835SAli.Saidi@ARM.com
708835SAli.Saidi@ARM.com
718835SAli.Saidi@ARM.com    rx_filter = Param.Bool(True, "Enable Receive Filter")
728983Snate@binkert.org    rx_delay = Param.Latency('1us', "Receive Delay")
738983Snate@binkert.org    tx_delay = Param.Latency('1us', "Transmit Delay")
748835SAli.Saidi@ARM.com
757927SN/A    rx_fifo_size = Param.MemorySize('128kB', "max size in bytes of rxFifo")
767927SN/A    tx_fifo_size = Param.MemorySize('128kB', "max size in bytes of txFifo")
779885Sstever@gmail.com
787927SN/A    m5reg = Param.UInt32(0, "Register for m5 usage")
7910036SAli.Saidi@ARM.com
8010451Snilay@cs.wisc.edu    intr_delay = Param.Latency('0us', "Interrupt Delay in microseconds")
818721SN/A    payload_bus = Param.Bus(NULL, "The IO Bus to attach to for payload")
828721SN/A    physmem = Param.PhysicalMemory(parent.any, "Physical Memory")
838983Snate@binkert.org
849885Sstever@gmail.comsimobj EtherDevInt(EtherInt):
859885Sstever@gmail.com    type = 'EtherDevInt'
869885Sstever@gmail.com    device = Param.EtherDev("Ethernet device of this interface")
879885Sstever@gmail.com
889885Sstever@gmail.comsimobj NSGigEInt(EtherInt):
8910315Snilay@cs.wisc.edu    type = 'NSGigEInt'
9010036SAli.Saidi@ARM.com    device = Param.NSGigE("Ethernet device of this interface")
9110315Snilay@cs.wisc.edu
929885Sstever@gmail.com
937927SN/A