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>
procdir = joinpath(fsdir, 'proc')
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
if hasattr(options, 'cpu_clock'):