Brandon Potter has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/18748 )
Change subject: config, sim-se: bugfix for 54c77aa0
......................................................................
config, sim-se: bugfix for 54c77aa0
The NULL ISA does not have some members for the options
class which are referenced by the FileSystemConfig
code.
Create default values for the members so that the
simulation does not fail during the configuration phase.
Change-Id: Ie65bf0e5550c964eae42d1df4c36c2c5bc4ea703
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18748
Reviewed-by: Daniel Carvalho <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Maintainer: Brandon Potter <[email protected]>
Tested-by: kokoro <[email protected]>
---
M configs/common/FileSystemConfig.py
1 file changed, 17 insertions(+), 3 deletions(-)
Approvals:
Daniel Carvalho: Looks good to me, approved
Jason Lowe-Power: Looks good to me, approved
Brandon Potter: Looks good to me, approved
kokoro: Regressions pass
diff --git a/configs/common/FileSystemConfig.py
b/configs/common/FileSystemConfig.py
index 8a6da52..e37fbd3 100644
--- a/configs/common/FileSystemConfig.py
+++ b/configs/common/FileSystemConfig.py
@@ -60,6 +60,20 @@
procdir = joinpath(fsdir, 'proc')
mkdir(procdir)
+ cpu_clock = '0'
+ if hasattr(options, 'cpu_clock'):
+ cpu_clock = options.cpu_clock
+ cpu_clock = toFrequency(cpu_clock)/mega
+
+ l2_size = '0'
+ if hasattr(options, 'l2_size'):
+ l2_size = options.l2_size
+ l2_size = toMemorySize(l2_size)/kibi
+
+ cacheline_size = '0'
+ if hasattr(options, 'cacheline_size'):
+ cacheline_size = options.cacheline_size
+
for i in xrange(options.num_cpus):
one_cpu = 'processor : %d\n' % (i) + \
'vendor_id : Generic\n' + \
@@ -68,9 +82,9 @@
'model name : Generic\n' + \
'stepping : 0\n' + \
'cpu MHz : %0.3d\n' \
- % (toFrequency(options.cpu_clock)/mega) + \
+ % cpu_clock + \
'cache size: : %dK\n' \
- % (toMemorySize(options.l2_size)/kibi) + \
+ % l2_size + \
'physical id : 0\n' + \
'siblings : %s\n' \
% options.num_cpus + \
@@ -84,7 +98,7 @@
'wp : yes\n' + \
'flags : fpu\n' + \
'cache alignment : %d\n' \
- % options.cacheline_size + \
+ % cacheline_size + \
'\n'
file_append((procdir, 'cpuinfo'), one_cpu)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/18748
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: Ie65bf0e5550c964eae42d1df4c36c2c5bc4ea703
Gerrit-Change-Number: 18748
Gerrit-PatchSet: 2
Gerrit-Owner: Brandon Potter <[email protected]>
Gerrit-Reviewer: Brandon Potter <[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