configs: Fix undefined BaseCPU
When using NULL ISA BaseCPU is undefined, and therefore the isinstance call generates a NameError. Change-Id: Ia4582606b775cdb20829966f8e312a333a55b6f3 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21959 Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
f96d25fb74
commit
467b49992a
@@ -77,7 +77,12 @@ def config_filesystem(system, options = None):
|
|||||||
procdir = joinpath(fsdir, 'proc')
|
procdir = joinpath(fsdir, 'proc')
|
||||||
mkdir(procdir)
|
mkdir(procdir)
|
||||||
|
|
||||||
cpus = [obj for obj in system.descendants() if isinstance(obj, BaseCPU)]
|
try:
|
||||||
|
cpus = \
|
||||||
|
[obj for obj in system.descendants() if isinstance(obj, BaseCPU)]
|
||||||
|
except NameError:
|
||||||
|
# BaseCPU is not defined for the NULL ISA
|
||||||
|
cpus = []
|
||||||
|
|
||||||
cpu_clock = 0
|
cpu_clock = 0
|
||||||
if hasattr(options, 'cpu_clock'):
|
if hasattr(options, 'cpu_clock'):
|
||||||
|
|||||||
Reference in New Issue
Block a user