style: Strip newline when checking lines
[gem5.git] / tests / configs / t1000-simple-atomic.py
index 217135bf050949b16cd03183f937d6d31d75a1b8..209cb28131a1b0838e660be652df9a47862b5727 100644 (file)
@@ -31,11 +31,29 @@ from m5.objects import *
 m5.util.addToPath('../configs/common')
 import FSConfig
 
-cpu = AtomicSimpleCPU(cpu_id=0)
-system = FSConfig.makeSparcSystem('atomic')
+try:
+    system = FSConfig.makeSparcSystem('atomic')
+except IOError as e:
+    skip_test(reason=str(e))
+
+system.voltage_domain = VoltageDomain()
+system.clk_domain = SrcClockDomain(clock = '1GHz',
+                                   voltage_domain = system.voltage_domain)
+system.cpu_clk_domain = SrcClockDomain(clock = '1GHz',
+                                       voltage_domain = system.voltage_domain)
+cpu = AtomicSimpleCPU(cpu_id=0, clk_domain = system.cpu_clk_domain)
 system.cpu = cpu
+# create the interrupt controller
+cpu.createInterruptController()
 cpu.connectAllPorts(system.membus)
 
+# create the memory controllers and connect them, stick with
+# the physmem name to avoid bumping all the reference stats
+system.physmem = [SimpleMemory(range = r)
+                  for r in system.mem_ranges]
+for i in xrange(len(system.physmem)):
+    system.physmem[i].port = system.membus.master
+
 root = Root(full_system=True, system=system)
 
 m5.ticks.setGlobalFrequency('2GHz')