Compiles now (with CPU_MODELS=SimpleCPU), but hangs
on execution. configs/test/test.py: Move test binary out of m5-test, don't depend on m5-test/Benchmarks. python/m5/objects/System.py: Split out full-system-only parameters (lost in merge). sim/system.cc: Need to be able to instantiate System directly in SE mode (lost in merge). sim/system.hh: A few more functions here are FS-only. configs/test/hello: Add in binary. --HG-- rename : configs/test.py => configs/test/test.py extra : convert_revision : 4051b18772e0a0dcb97eb591d4373683be9f4395
This commit is contained in:
parent
f102365bfe
commit
e3d96aa889
6 changed files with 50 additions and 17 deletions
|
@ -1,8 +0,0 @@
|
|||
from m5 import *
|
||||
AddToPath('/z/stever/bk/m5-test')
|
||||
import Benchmarks
|
||||
|
||||
mem = PhysicalMemory()
|
||||
cpu = SimpleCPU(workload=Benchmarks.HelloWorld(), mem=mem)
|
||||
system = System(physmem=mem, cpu=cpu)
|
||||
root = Root(system=system)
|
BIN
configs/test/hello
Executable file
BIN
configs/test/hello
Executable file
Binary file not shown.
10
configs/test/test.py
Normal file
10
configs/test/test.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
from m5 import *
|
||||
|
||||
class HelloWorld(LiveProcess):
|
||||
executable = '../configs/test/hello'
|
||||
cmd = 'hello'
|
||||
|
||||
mem = PhysicalMemory()
|
||||
cpu = SimpleCPU(workload=HelloWorld(), mem=mem)
|
||||
system = System(physmem=mem, cpu=cpu)
|
||||
root = Root(system=system)
|
|
@ -2,10 +2,11 @@ from m5 import *
|
|||
|
||||
class System(SimObject):
|
||||
type = 'System'
|
||||
physmem = Param.PhysicalMemory(Parent.any, "phsyical memory")
|
||||
if build_env['FULL_SYSTEM']:
|
||||
boot_cpu_frequency = Param.Frequency(Self.cpu[0].clock.frequency,
|
||||
"boot processor frequency")
|
||||
memctrl = Param.MemoryController(Parent.any, "memory controller")
|
||||
physmem = Param.PhysicalMemory(Parent.any, "phsyical memory")
|
||||
init_param = Param.UInt64(0, "numerical value to pass into simulator")
|
||||
bin = Param.Bool(False, "is this system binned")
|
||||
binned_fns = VectorParam.String([], "functions broken down and binned")
|
||||
|
|
|
@ -217,5 +217,35 @@ printSystems()
|
|||
System::printSystems();
|
||||
}
|
||||
|
||||
#if FULL_SYSTEM
|
||||
|
||||
// In full system mode, only derived classes (e.g. AlphaLinuxSystem)
|
||||
// can be created directly.
|
||||
|
||||
DEFINE_SIM_OBJECT_CLASS_NAME("System", System)
|
||||
|
||||
#else
|
||||
|
||||
BEGIN_DECLARE_SIM_OBJECT_PARAMS(System)
|
||||
|
||||
SimObjectParam<Memory *> physmem;
|
||||
|
||||
END_DECLARE_SIM_OBJECT_PARAMS(System)
|
||||
|
||||
BEGIN_INIT_SIM_OBJECT_PARAMS(System)
|
||||
|
||||
INIT_PARAM(physmem, "physical memory")
|
||||
|
||||
END_INIT_SIM_OBJECT_PARAMS(System)
|
||||
|
||||
CREATE_SIM_OBJECT(System)
|
||||
{
|
||||
System::Params *p = new System::Params;
|
||||
p->name = getInstanceName();
|
||||
p->physmem = physmem;
|
||||
return new System(p);
|
||||
}
|
||||
|
||||
REGISTER_SIM_OBJECT("System", System)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -101,6 +101,7 @@ class System : public SimObject
|
|||
|
||||
protected:
|
||||
|
||||
#if FULL_SYSTEM
|
||||
/**
|
||||
* Fix up an address used to match PCs for hooking simulator
|
||||
* events on to target function executions. See comment in
|
||||
|
@ -125,7 +126,6 @@ class System : public SimObject
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if FULL_SYSTEM
|
||||
/** Add a function-based event to kernel code. */
|
||||
template <class T>
|
||||
T *System::addKernelFuncEvent(const char *lbl)
|
||||
|
|
Loading…
Reference in a new issue