config: Add a check for fastmem only used with Atomic CPU
authorAndreas Hansson <andreas.hansson@arm.com>
Fri, 26 Oct 2012 10:42:45 +0000 (06:42 -0400)
committerAndreas Hansson <andreas.hansson@arm.com>
Fri, 26 Oct 2012 10:42:45 +0000 (06:42 -0400)
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
configs/example/se.py

index 10bed7499851da1e1b5489d3c663b076da259ed7..f1b8acedff619afb6df14fde77de39b036878c1c 100644 (file)
@@ -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:
index adebab1e21d942f2951b9e1a558de12886667434..c4c6daedfc7455993a3e557eb1a522527a9563d4 100644 (file)
@@ -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: