changeset 240969297314 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=240969297314
description:
        configs: use SimpleMemory when using ruby in se mode
        A recent changeset altered the default memory class to DRAMCtrl.  In se 
mode,
        ruby uses the physical memory to check if a given address is within the 
bounds
        of the physical memory.  SimpleMemory is enough for this.  Moreover,
        SimpleMemory does not check whether it is connected or not, something 
which
        DRAMCtrl does.

diffstat:

 configs/example/se.py |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 45a67d84fd4a -r 240969297314 configs/example/se.py
--- a/configs/example/se.py     Tue Mar 25 13:15:04 2014 -0500
+++ b/configs/example/se.py     Tue Apr 01 11:17:46 2014 -0500
@@ -157,8 +157,6 @@
 (CPUClass, test_mem_mode, FutureClass) = Simulation.setCPUClass(options)
 CPUClass.numThreads = numThreads
 
-MemClass = Simulation.setMemClass(options)
-
 # Check -- do not allow SMT with multiple CPUs
 if options.smt and options.num_cpus > 1:
     fatal("You cannot use SMT with multiple CPUs!")
@@ -228,8 +226,10 @@
         print >> sys.stderr, "Ruby requires TimingSimpleCPU or O3CPU!!"
         sys.exit(1)
 
-    # Set the option for physmem so that it is not allocated any space
-    system.physmem = MemClass(range=AddrRange(options.mem_size),
+    # Use SimpleMemory with the null option since this memory is only used
+    # for determining which addresses are within the range of the memory.
+    # No space allocation is required.
+    system.physmem = SimpleMemory(range=AddrRange(options.mem_size),
                               null = True)
     options.use_map = True
     Ruby.create_system(options, system)
@@ -253,6 +253,7 @@
             system.cpu[i].itb.walker.port = ruby_port.slave
             system.cpu[i].dtb.walker.port = ruby_port.slave
 else:
+    MemClass = Simulation.setMemClass(options)
     system.membus = CoherentBus()
     system.system_port = system.membus.slave
     CacheConfig.config_cache(options, system)
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to