diff options
author | Daniel R. Carvalho <odanrc@yahoo.com.br> | 2019-10-19 15:10:04 +0200 |
---|---|---|
committer | Daniel Carvalho <odanrc@yahoo.com.br> | 2019-10-28 17:43:39 +0000 |
commit | 467b49992a2eee1cbf7a8d7c8b3d9333a1bba2dc (patch) | |
tree | 5f68e4790d220ea9394b941133f94c639d54d7e7 /configs/common/FileSystemConfig.py | |
parent | f96d25fb7430b56e3711dff92aff9cfaa75134be (diff) | |
download | gem5-467b49992a2eee1cbf7a8d7c8b3d9333a1bba2dc.tar.xz |
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>
Diffstat (limited to 'configs/common/FileSystemConfig.py')
-rw-r--r-- | configs/common/FileSystemConfig.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/configs/common/FileSystemConfig.py b/configs/common/FileSystemConfig.py index a9c7c92a5..67e380193 100644 --- a/configs/common/FileSystemConfig.py +++ b/configs/common/FileSystemConfig.py @@ -77,7 +77,12 @@ def config_filesystem(system, options = None): 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'): |