Merge ktlim@zizzer.eecs.umich.edu:/bk/m5
[gem5.git] / python / m5 / objects / Device.mpy
1 from FunctionalMemory import FunctionalMemory
2
3 # This device exists only because there are some devices that I don't
4 # want to have a Platform parameter because it would cause a cycle in
5 # the C++ that cannot be easily solved.
6 #
7 # The real solution to this problem is to pass the ParamXXX structure
8 # to the constructor, but with the express condition that SimObject
9 # parameter values are not to be available at construction time. If
10 # some further configuration must be done, it must be done during the
11 # initialization phase at which point all SimObject pointers will be
12 # valid.
13 simobj FooPioDevice(FunctionalMemory):
14 type = 'PioDevice'
15 abstract = True
16 addr = Param.Addr("Device Address")
17 mmu = Param.MemoryController(Super, "Memory Controller")
18 io_bus = Param.Bus(NULL, "The IO Bus to attach to")
19 pio_latency = Param.Tick(1, "Programmed IO latency in bus cycles")
20
21 simobj FooDmaDevice(FooPioDevice):
22 type = 'DmaDevice'
23 abstract = True
24
25 simobj PioDevice(FooPioDevice):
26 type = 'PioDevice'
27 abstract = True
28 platform = Param.Platform(Super, "Platform")
29
30 simobj DmaDevice(PioDevice):
31 type = 'DmaDevice'
32 abstract = True
33