Daniel Carvalho has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/21959 )

Change subject: configs: Fix undefined BaseCPU
......................................................................

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 <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21959
Reviewed-by: Bobby R. Bruce <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M configs/common/FileSystemConfig.py
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/configs/common/FileSystemConfig.py b/configs/common/FileSystemConfig.py
index a9c7c92..67e3801 100644
--- a/configs/common/FileSystemConfig.py
+++ b/configs/common/FileSystemConfig.py
@@ -77,7 +77,12 @@
     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'):

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/21959
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Ia4582606b775cdb20829966f8e312a333a55b6f3
Gerrit-Change-Number: 21959
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to