summaryrefslogtreecommitdiff
path: root/configs/common/MemConfig.py
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-03-05 22:51:34 -0800
committerGabe Black <gabeblack@google.com>2018-03-06 23:39:43 +0000
commit659900aedd1b4fc69b61b5dbaee39dba26848637 (patch)
tree586dcfc17855c54a4985f596a145730cdeab7309 /configs/common/MemConfig.py
parent0bb50e6745b35c785c4d8051eb43f6bc419fb924 (diff)
downloadgem5-659900aedd1b4fc69b61b5dbaee39dba26848637.tar.xz
config: Switch from the print statement to the print function.
Change-Id: I701fa58cfcfa2767ce9ad24da314a053889878d0 Reviewed-on: https://gem5-review.googlesource.com/8762 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'configs/common/MemConfig.py')
-rw-r--r--configs/common/MemConfig.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/configs/common/MemConfig.py b/configs/common/MemConfig.py
index 475bbeb32..36035800f 100644
--- a/configs/common/MemConfig.py
+++ b/configs/common/MemConfig.py
@@ -36,6 +36,8 @@
# Authors: Andreas Sandberg
# Andreas Hansson
+from __future__ import print_function
+
import m5.objects
import inspect
import sys
@@ -64,23 +66,23 @@ def get(name):
mem_class = _mem_classes[name]
return mem_class
except KeyError:
- print "%s is not a valid memory controller." % (name,)
+ print("%s is not a valid memory controller." % (name,))
sys.exit(1)
def print_mem_list():
"""Print a list of available memory classes."""
- print "Available memory classes:"
+ print("Available memory classes:")
doc_wrapper = TextWrapper(initial_indent="\t\t", subsequent_indent="\t\t")
for name, cls in _mem_classes.items():
- print "\t%s" % name
+ print("\t%s" % name)
# Try to extract the class documentation from the class help
# string.
doc = inspect.getdoc(cls)
if doc:
for line in doc_wrapper.wrap(doc):
- print line
+ print(line)
def mem_names():
"""Return a list of valid memory names."""
@@ -223,8 +225,8 @@ def config_mem(options, system):
if opt_elastic_trace_en:
mem_ctrl.latency = '1ns'
- print "For elastic trace, over-riding Simple Memory " \
- "latency to 1ns."
+ print("For elastic trace, over-riding Simple Memory "
+ "latency to 1ns.")
mem_ctrls.append(mem_ctrl)