changeset ac39e3421c34 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=ac39e3421c34
description:
System: Push boot_cpu_frequency down into the subclasses that actually
use it.
This parameter depends on a number of coincidences to work properly.
First,
there must be an array assigned to system called "cpu" even though
there's no
parameter called that. Second, the items in the "cpu" array have to
have a
"clock" parameter which has a "frequency" member. This is true of the
normal
CPUs, but isn't true of the memory tester CPUs. This happened to work
before
because the memory tester CPUs were only used in SE mode where this
parameter
was being excluded. Since everything is being pulled into a common
binary,
this won't work any more. Since the boot_cpu_frequency parameter is
only used
by Alpha's Linux System object (and Mips's through copy and paste), the
definition of that parameter is moved down to those objects
specifically.
diffstat:
src/arch/alpha/AlphaSystem.py | 4 ++++
src/arch/mips/MipsSystem.py | 3 +++
src/sim/System.py | 2 --
3 files changed, 7 insertions(+), 2 deletions(-)
diffs (46 lines):
diff -r a5a83fc04972 -r ac39e3421c34 src/arch/alpha/AlphaSystem.py
--- a/src/arch/alpha/AlphaSystem.py Sun Oct 30 03:55:24 2011 -0700
+++ b/src/arch/alpha/AlphaSystem.py Sun Oct 30 17:38:09 2011 -0700
@@ -27,6 +27,7 @@
# Authors: Nathan Binkert
from m5.params import *
+from m5.proxy import *
from System import System
class AlphaSystem(System):
@@ -42,6 +43,9 @@
system_type = 34
system_rev = 1 << 10
+ boot_cpu_frequency = Param.Frequency(Self.cpu[0].clock.frequency,
+ "boot processor frequency")
+
class FreebsdAlphaSystem(AlphaSystem):
type = 'FreebsdAlphaSystem'
system_type = 34
diff -r a5a83fc04972 -r ac39e3421c34 src/arch/mips/MipsSystem.py
--- a/src/arch/mips/MipsSystem.py Sun Oct 30 03:55:24 2011 -0700
+++ b/src/arch/mips/MipsSystem.py Sun Oct 30 17:38:09 2011 -0700
@@ -49,6 +49,9 @@
system_type = 34
system_rev = 1 << 10
+ boot_cpu_frequency = Param.Frequency(Self.cpu[0].clock.frequency,
+ "boot processor frequency")
+
class BareIronMipsSystem(MipsSystem):
type = 'BareIronMipsSystem'
bare_iron = True
diff -r a5a83fc04972 -r ac39e3421c34 src/sim/System.py
--- a/src/sim/System.py Sun Oct 30 03:55:24 2011 -0700
+++ b/src/sim/System.py Sun Oct 30 17:38:09 2011 -0700
@@ -62,8 +62,6 @@
work_cpus_ckpt_count = Param.Counter(0,
"create checkpoint when active cpu count value is reached")
- boot_cpu_frequency = Param.Frequency(Self.cpu[0].clock.frequency,
- "boot processor frequency")
init_param = Param.UInt64(0, "numerical value to pass into simulator")
boot_osflags = Param.String("a", "boot flags to pass to the kernel")
kernel = Param.String("", "file that contains the kernel code")
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev