From a8e6adb0b1284e89a63bcb14fe1fdace2b89e0c8 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 3 Apr 2012 03:50:14 -0400 Subject: Atomic: Remove the physmem_port and access memory directly This patch removes the physmem_port from the Atomic CPU and instead uses the system pointer to access the physmem when using the fastmem option. The system already keeps track of the physmem and the valid memory address ranges, and with this patch we merely make use of that existing functionality. As a result of this change, the overloaded getMasterPort in the Atomic CPU can be removed, thus unifying the CPUs. --- configs/example/se.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'configs/example/se.py') diff --git a/configs/example/se.py b/configs/example/se.py index a6cf1ec19..a2f8a09dc 100644 --- a/configs/example/se.py +++ b/configs/example/se.py @@ -155,11 +155,15 @@ system = System(cpu = [CPUClass(cpu_id=i) for i in xrange(np)], physmem = PhysicalMemory(range=AddrRange("512MB")), membus = Bus(), 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!") + for i in xrange(np): system.cpu[i].workload = multiprocesses[i] if options.fastmem: - system.cpu[0].physmem_port = system.physmem.port + system.cpu[0].fastmem = True if options.checker: system.cpu[i].addCheckerCpu() -- cgit v1.2.3