Device.py revision 4439
11689SN/Afrom m5.params import *
27783SGiacomo.Gabrielli@arm.comfrom m5.proxy import *
37783SGiacomo.Gabrielli@arm.comfrom MemObject import MemObject
47783SGiacomo.Gabrielli@arm.com
57783SGiacomo.Gabrielli@arm.comclass PioDevice(MemObject):
67783SGiacomo.Gabrielli@arm.com    type = 'PioDevice'
77783SGiacomo.Gabrielli@arm.com    abstract = True
87783SGiacomo.Gabrielli@arm.com    pio = Port("Programmed I/O port")
97783SGiacomo.Gabrielli@arm.com    platform = Param.Platform(Parent.any, "Platform this device is part of")
107783SGiacomo.Gabrielli@arm.com    system = Param.System(Parent.any, "System this device is part of")
117783SGiacomo.Gabrielli@arm.com
127783SGiacomo.Gabrielli@arm.comclass BasicPioDevice(PioDevice):
137783SGiacomo.Gabrielli@arm.com    type = 'BasicPioDevice'
142316SN/A    abstract = True
151689SN/A    pio_addr = Param.Addr("Device Address")
161689SN/A    pio_latency = Param.Latency('1ns', "Programmed IO latency in simticks")
171689SN/A
181689SN/Aclass DmaDevice(PioDevice):
191689SN/A    type = 'DmaDevice'
201689SN/A    abstract = True
211689SN/A    dma = Port(Self.pio.peerObj.port, "DMA port")
221689SN/A    min_backoff_delay = Param.Latency('4ns',
231689SN/A      "min time between a nack packet being received and the next request made by the device")
241689SN/A    max_backoff_delay = Param.Latency('10us',
251689SN/A      "max time between a nack packet being received and the next request made by the device")
261689SN/A
271689SN/A
281689SN/A
291689SN/Aclass IsaFake(BasicPioDevice):
301689SN/A    type = 'IsaFake'
311689SN/A    pio_size = Param.Addr(0x8, "Size of address range")
321689SN/A    ret_data8 = Param.UInt8(0xFF, "Default data to return")
331689SN/A    ret_data16 = Param.UInt16(0xFFFF, "Default data to return")
341689SN/A    ret_data32 = Param.UInt32(0xFFFFFFFF, "Default data to return")
351689SN/A    ret_data64 = Param.UInt64(0xFFFFFFFFFFFFFFFF, "Default data to return")
361689SN/A    ret_bad_addr = Param.Bool(False, "Return pkt status bad address on access")
371689SN/A    update_data = Param.Bool(False, "Update the data that is returned on writes")
381689SN/A    warn_access = Param.String("", "String to print when device is accessed")
392665Ssaidi@eecs.umich.edu
402665Ssaidi@eecs.umich.educlass BadAddr(IsaFake):
412965Sksewell@umich.edu    ret_bad_addr = Param.Bool(True, "Return pkt status bad address on access")
421689SN/A
431689SN/A
442292SN/A