Significant revamp of Port code.
Some cleanup of SimObject code too, particularly to
make the SimObject and MetaSimObject implementations of
__setattr__ more consistent.
Unproxy code split out of print_ini().
src/python/m5/multidict.py:
Make get() return None by default, to match semantics
of built-in dictionary objects.
--HG--
extra : convert_revision : db73b6cdd004a82a08b2402afd1e16544cb902a4
22 lines
661 B
Python
22 lines
661 B
Python
from m5.params import *
|
|
from m5.proxy import *
|
|
from MemObject import MemObject
|
|
|
|
class PioDevice(MemObject):
|
|
type = 'PioDevice'
|
|
abstract = True
|
|
pio = Port("Programmed I/O port")
|
|
platform = Param.Platform(Parent.any, "Platform this device is part of")
|
|
system = Param.System(Parent.any, "System this device is part of")
|
|
|
|
class BasicPioDevice(PioDevice):
|
|
type = 'BasicPioDevice'
|
|
abstract = True
|
|
pio_addr = Param.Addr("Device Address")
|
|
pio_latency = Param.Latency('1ns', "Programmed IO latency in simticks")
|
|
|
|
class DmaDevice(PioDevice):
|
|
type = 'DmaDevice'
|
|
abstract = True
|
|
dma = Port(Self.pio.peerObj.port, "DMA port")
|