From a4d8996fd9224212ab042fd15316ba451201a11f Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Fri, 26 Oct 2012 06:42:45 -0400 Subject: config: Add a check for fastmem only used with Atomic CPU This patch adds an additional check to ensure that the fastmem option is only used if the system is using the Atomic CPU. --- configs/example/fs.py | 7 +++++-- configs/example/se.py | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'configs') diff --git a/configs/example/fs.py b/configs/example/fs.py index 10bed7499..f1b8acedf 100644 --- a/configs/example/fs.py +++ b/configs/example/fs.py @@ -128,8 +128,11 @@ else: test_sys.iobridge.master = test_sys.membus.slave # Sanity check -if options.fastmem and (options.caches or options.l2cache): - fatal("You cannot use fastmem in combination with caches!") +if options.fastmem: + if TestCPUClass != AtomicSimpleCPU: + fatal("Fastmem can only be used with atomic CPU!") + if (options.caches or options.l2cache): + fatal("You cannot use fastmem in combination with caches!") for i in xrange(np): if options.fastmem: diff --git a/configs/example/se.py b/configs/example/se.py index adebab1e2..c4c6daedf 100644 --- a/configs/example/se.py +++ b/configs/example/se.py @@ -160,8 +160,11 @@ system = System(cpu = [CPUClass(cpu_id=i) for i in xrange(np)], membus = CoherentBus(), mem_mode = test_mem_mode) # Sanity check -if options.fastmem and (options.caches or options.l2cache): - fatal("You cannot use fastmem in combination with caches!") +if options.fastmem: + if CPUClass != AtomicSimpleCPU: + fatal("Fastmem can only be used with atomic CPU!") + if (options.caches or options.l2cache): + fatal("You cannot use fastmem in combination with caches!") for i in xrange(np): if options.smt: -- cgit v1.2.3