diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2019-01-25 14:26:21 +0000 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2019-02-12 09:43:00 +0000 |
commit | ef71a987c1987f7543d3bf76ed9e5ce62f4d1daa (patch) | |
tree | c672aa096c0088820c7ffa341b2d603cef6f66d6 /src/dev/arm | |
parent | 9fbfb45e51e657b364334a1c96ba23698d181edb (diff) | |
download | gem5-ef71a987c1987f7543d3bf76ed9e5ce62f4d1daa.tar.xz |
python: Don't assume SimObjects live in the global namespace
The importer in Python 3 doesn't like the way we import SimObjects
from the global namespace. Convert the existing SimObject declarations
to import from m5.objects. As a side-effect, this makes these files
consistent with configuration files.
Change-Id: I11153502b430822130722839e1fa767b82a027aa
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15981
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Diffstat (limited to 'src/dev/arm')
-rw-r--r-- | src/dev/arm/EnergyCtrl.py | 2 | ||||
-rw-r--r-- | src/dev/arm/FlashDevice.py | 3 | ||||
-rw-r--r-- | src/dev/arm/Gic.py | 4 | ||||
-rw-r--r-- | src/dev/arm/NoMali.py | 5 | ||||
-rw-r--r-- | src/dev/arm/RealView.py | 41 | ||||
-rw-r--r-- | src/dev/arm/UFSHostDevice.py | 4 | ||||
-rw-r--r-- | src/dev/arm/VirtIOMMIO.py | 6 |
7 files changed, 34 insertions, 31 deletions
diff --git a/src/dev/arm/EnergyCtrl.py b/src/dev/arm/EnergyCtrl.py index 571f94178..d007ea7b4 100644 --- a/src/dev/arm/EnergyCtrl.py +++ b/src/dev/arm/EnergyCtrl.py @@ -39,7 +39,7 @@ from m5.params import * from m5.SimObject import SimObject -from Device import BasicPioDevice +from m5.objects.Device import BasicPioDevice from m5.proxy import * from m5.util.fdthelper import * diff --git a/src/dev/arm/FlashDevice.py b/src/dev/arm/FlashDevice.py index ed3b9d04d..a4f2e34ed 100644 --- a/src/dev/arm/FlashDevice.py +++ b/src/dev/arm/FlashDevice.py @@ -38,7 +38,8 @@ from m5.params import * from m5.proxy import * -from AbstractNVM import * + +from m5.objects.AbstractNVM import * #Distribution of the data. #sequential: sequential (address n+1 is likely to be on the same plane as n) diff --git a/src/dev/arm/Gic.py b/src/dev/arm/Gic.py index 0e0aa89fe..29535e4e9 100644 --- a/src/dev/arm/Gic.py +++ b/src/dev/arm/Gic.py @@ -40,8 +40,8 @@ from m5.proxy import * from m5.util.fdthelper import * from m5.SimObject import SimObject -from Device import PioDevice -from Platform import Platform +from m5.objects.Device import PioDevice +from m5.objects.Platform import Platform class BaseGic(PioDevice): type = 'BaseGic' diff --git a/src/dev/arm/NoMali.py b/src/dev/arm/NoMali.py index 4272f90d0..31509e62d 100644 --- a/src/dev/arm/NoMali.py +++ b/src/dev/arm/NoMali.py @@ -36,8 +36,9 @@ # Authors: Andreas Sandberg from m5.params import * -from Device import BasicPioDevice -from Gic import * + +from m5.objects.Device import BasicPioDevice +from m5.objects.Gic import * class NoMaliGpuType(Enum): vals = [ 'T60x', diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py index d7ce9eba0..af19f3bbd 100644 --- a/src/dev/arm/RealView.py +++ b/src/dev/arm/RealView.py @@ -45,31 +45,32 @@ from m5.defines import buildEnv from m5.params import * from m5.proxy import * from m5.util.fdthelper import * -from ClockDomain import ClockDomain -from VoltageDomain import VoltageDomain -from Device import BasicPioDevice, PioDevice, IsaFake, BadAddr, DmaDevice -from PciHost import * -from Ethernet import NSGigE, IGbE_igb, IGbE_e1000 -from Ide import * -from Platform import Platform -from Terminal import Terminal -from Uart import Uart -from SimpleMemory import SimpleMemory -from Gic import * -from EnergyCtrl import EnergyCtrl -from ClockedObject import ClockedObject -from ClockDomain import SrcClockDomain -from SubSystem import SubSystem -from Graphics import ImageFormat -from ClockedObject import ClockedObject -from PS2 import * -from VirtIOMMIO import MmioVirtIO +from m5.objects.ClockDomain import ClockDomain +from m5.objects.VoltageDomain import VoltageDomain +from m5.objects.Device import \ + BasicPioDevice, PioDevice, IsaFake, BadAddr, DmaDevice +from m5.objects.PciHost import * +from m5.objects.Ethernet import NSGigE, IGbE_igb, IGbE_e1000 +from m5.objects.Ide import * +from m5.objects.Platform import Platform +from m5.objects.Terminal import Terminal +from m5.objects.Uart import Uart +from m5.objects.SimpleMemory import SimpleMemory +from m5.objects.Gic import * +from m5.objects.EnergyCtrl import EnergyCtrl +from m5.objects.ClockedObject import ClockedObject +from m5.objects.ClockDomain import SrcClockDomain +from m5.objects.SubSystem import SubSystem +from m5.objects.Graphics import ImageFormat +from m5.objects.ClockedObject import ClockedObject +from m5.objects.PS2 import * +from m5.objects.VirtIOMMIO import MmioVirtIO # Platforms with KVM support should generally use in-kernel GIC # emulation. Use a GIC model that automatically switches between # gem5's GIC model and KVM's GIC model if KVM is available. try: - from KvmGic import MuxingKvmGic + from m5.objects.KvmGic import MuxingKvmGic kvm_gicv2_class = MuxingKvmGic except ImportError: # KVM support wasn't compiled into gem5. Fallback to a diff --git a/src/dev/arm/UFSHostDevice.py b/src/dev/arm/UFSHostDevice.py index f9369ebc9..3c7dda722 100644 --- a/src/dev/arm/UFSHostDevice.py +++ b/src/dev/arm/UFSHostDevice.py @@ -38,8 +38,8 @@ import sys from m5.params import * from m5.proxy import * -from Device import DmaDevice -from AbstractNVM import * +from m5.objects.Device import DmaDevice +from m5.objects.AbstractNVM import * class UFSHostDevice(DmaDevice): type = 'UFSHostDevice' diff --git a/src/dev/arm/VirtIOMMIO.py b/src/dev/arm/VirtIOMMIO.py index 2c95ef3ce..e91fb8156 100644 --- a/src/dev/arm/VirtIOMMIO.py +++ b/src/dev/arm/VirtIOMMIO.py @@ -41,9 +41,9 @@ from m5.SimObject import SimObject from m5.params import * from m5.proxy import * -from Device import BasicPioDevice -from Gic import ArmInterruptPin -from VirtIO import VirtIODeviceBase, VirtIODummyDevice +from m5.objects.Device import BasicPioDevice +from m5.objects.Gic import ArmInterruptPin +from m5.objects.VirtIO import VirtIODeviceBase, VirtIODummyDevice class MmioVirtIO(BasicPioDevice): type = 'MmioVirtIO' |