Device.py (8714:cd48e2802644) Device.py (8742:9df38d259935)
1# Copyright (c) 2005-2007 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 20 unchanged lines hidden (view full) ---

29from m5.params import *
30from m5.proxy import *
31from MemObject import MemObject
32
33class PioDevice(MemObject):
34 type = 'PioDevice'
35 abstract = True
36 pio = Port("Programmed I/O port")
1# Copyright (c) 2005-2007 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 20 unchanged lines hidden (view full) ---

29from m5.params import *
30from m5.proxy import *
31from MemObject import MemObject
32
33class PioDevice(MemObject):
34 type = 'PioDevice'
35 abstract = True
36 pio = Port("Programmed I/O port")
37 platform = Param.Platform(Parent.any, "Platform this device is part of")
38 system = Param.System(Parent.any, "System this device is part of")
39
40class BasicPioDevice(PioDevice):
41 type = 'BasicPioDevice'
42 abstract = True
43 pio_addr = Param.Addr("Device Address")
44 pio_latency = Param.Latency('1ns', "Programmed IO latency in simticks")
45
46class DmaDevice(PioDevice):
47 type = 'DmaDevice'
48 abstract = True
37 system = Param.System(Parent.any, "System this device is part of")
38
39class BasicPioDevice(PioDevice):
40 type = 'BasicPioDevice'
41 abstract = True
42 pio_addr = Param.Addr("Device Address")
43 pio_latency = Param.Latency('1ns', "Programmed IO latency in simticks")
44
45class DmaDevice(PioDevice):
46 type = 'DmaDevice'
47 abstract = True
49 dma = Port("DMA port")
48 dma = Port(Self.pio.peerObj.port, "DMA port")
50 min_backoff_delay = Param.Latency('4ns',
51 "min time between a nack packet being received and the next request made by the device")
52 max_backoff_delay = Param.Latency('10us',
53 "max time between a nack packet being received and the next request made by the device")
54
55
56
57class IsaFake(BasicPioDevice):

--- 17 unchanged lines hidden ---
49 min_backoff_delay = Param.Latency('4ns',
50 "min time between a nack packet being received and the next request made by the device")
51 max_backoff_delay = Param.Latency('10us',
52 "max time between a nack packet being received and the next request made by the device")
53
54
55
56class IsaFake(BasicPioDevice):

--- 17 unchanged lines hidden ---