diff options
author | Andrew Schultz <alschult@umich.edu> | 2003-10-21 17:18:17 -0400 |
---|---|---|
committer | Andrew Schultz <alschult@umich.edu> | 2003-10-21 17:18:17 -0400 |
commit | f600cff5c265bc69048bfd71c31434de3f34b204 (patch) | |
tree | 5a6e38ca3cce20a2b28027be0542b3f4ca7608df /kern | |
parent | ae232a883abf5c5f9dadaec4ccaf0268469b383d (diff) | |
download | gem5-f600cff5c265bc69048bfd71c31434de3f34b204.tar.xz |
Created new M5 instruction to allow an integer parameter (init_param) to be specified in the INI and then read inside the simulator.
arch/alpha/isa_desc:
Added new M5FUNC instruction to put allow reading of init_param inside simulator
kern/tru64/tru64_system.cc:
kern/tru64/tru64_system.hh:
sim/system.cc:
sim/system.hh:
Added support for init_param
--HG--
extra : convert_revision : 8253f0b4239b194d4f04665c9deec1fcdf665c8a
Diffstat (limited to 'kern')
-rw-r--r-- | kern/tru64/tru64_system.cc | 18 | ||||
-rw-r--r-- | kern/tru64/tru64_system.hh | 1 |
2 files changed, 11 insertions, 8 deletions
diff --git a/kern/tru64/tru64_system.cc b/kern/tru64/tru64_system.cc index b31b82644..0a4f8ae4e 100644 --- a/kern/tru64/tru64_system.cc +++ b/kern/tru64/tru64_system.cc @@ -43,11 +43,11 @@ using namespace std; -Tru64System::Tru64System(const string _name, MemoryController *_memCtrl, - PhysicalMemory *_physmem, const string &kernel_path, - const string &console_path, const string &palcode, - const string &boot_osflags) - : System(_name, _memCtrl, _physmem) +Tru64System::Tru64System(const string _name, const int _init_param, + MemoryController *_memCtrl, PhysicalMemory *_physmem, + const string &kernel_path, const string &console_path, + const string &palcode, const string &boot_osflags) + : System(_name, _init_param, _memCtrl, _physmem) { kernelSymtab = new SymbolTable; consoleSymtab = new SymbolTable; @@ -208,6 +208,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(Tru64System) SimObjectParam<MemoryController *> mem_ctl; SimObjectParam<PhysicalMemory *> physmem; + Param<int> init_param; Param<string> kernel_code; Param<string> console_code; @@ -220,6 +221,7 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(Tru64System) INIT_PARAM(mem_ctl, "memory controller"), INIT_PARAM(physmem, "phsyical memory"), + INIT_PARAM_DFLT(init_param, "numerical value to pass into simulator", 0), INIT_PARAM(kernel_code, "file that contains the kernel code"), INIT_PARAM(console_code, "file that contains the console code"), INIT_PARAM(pal_code, "file that contains palcode"), @@ -230,9 +232,9 @@ END_INIT_SIM_OBJECT_PARAMS(Tru64System) CREATE_SIM_OBJECT(Tru64System) { - Tru64System *sys = new Tru64System(getInstanceName(), mem_ctl, physmem, - kernel_code, console_code, pal_code, - boot_osflags); + Tru64System *sys = new Tru64System(getInstanceName(), init_param, mem_ctl, + physmem, kernel_code, console_code, + pal_code, boot_osflags); return sys; } diff --git a/kern/tru64/tru64_system.hh b/kern/tru64/tru64_system.hh index 087ef038c..7fd337eb5 100644 --- a/kern/tru64/tru64_system.hh +++ b/kern/tru64/tru64_system.hh @@ -79,6 +79,7 @@ class Tru64System : public System public: Tru64System(const std::string _name, + const int _init_param, MemoryController *_memCtrl, PhysicalMemory *_physmem, const std::string &kernel_path, |