configs: Port CPUConfig to use the common object list

Factor out ObjectList functionality from CPUConfig.

Change-Id: I34ca55142e14559e584d38b6cca3aa5c20923521
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20589
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
This commit is contained in:
Daniel R. Carvalho
2019-09-03 12:22:59 +02:00
committed by Daniel Carvalho
parent 3fee716f56
commit c957d00dfe
8 changed files with 78 additions and 104 deletions

View File

@@ -46,7 +46,8 @@ import sys
from os import getcwd
from os.path import join as joinpath
from . import CpuConfig
from common import CpuConfig
from . import ObjectList
from . import BPConfig
from . import MemConfig
@@ -59,7 +60,7 @@ addToPath('../common')
def getCPUClass(cpu_type):
"""Returns the required cpu class and the mode of operation."""
cls = CpuConfig.get(cpu_type)
cls = ObjectList.cpu_list.get(cpu_type)
return cls, cls.memory_mode()
def setCPUClass(options):