From 35a85a4e86143c5bf23d5b74c14856792a0a624c Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Fri, 30 Jan 2009 19:08:13 -0500 Subject: [PATCH] Config: Cause a fatal() when a parameter without a default value isn't set(FS #315). --- src/cpu/BaseCPU.py | 2 +- src/dev/DiskImage.py | 1 + src/python/m5/SimObject.py | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cpu/BaseCPU.py b/src/cpu/BaseCPU.py index 985c415a0..f3688e991 100644 --- a/src/cpu/BaseCPU.py +++ b/src/cpu/BaseCPU.py @@ -69,7 +69,7 @@ class BaseCPU(MemObject): function_trace = Param.Bool(False, "Enable function trace") function_trace_start = Param.Tick(0, "Cycle to start function trace") - checker = Param.BaseCPU("checker CPU") + checker = Param.BaseCPU(NULL, "checker CPU") do_checkpoint_insts = Param.Bool(True, "enable checkpoint pseudo instructions") diff --git a/src/dev/DiskImage.py b/src/dev/DiskImage.py index af2407458..92eb0553c 100644 --- a/src/dev/DiskImage.py +++ b/src/dev/DiskImage.py @@ -42,3 +42,4 @@ class CowDiskImage(DiskImage): child = Param.DiskImage(RawDiskImage(read_only=True), "child image") table_size = Param.Int(65536, "initial table size") + image_file = "" diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py index 868f969a6..2b5dd1bc2 100644 --- a/src/python/m5/SimObject.py +++ b/src/python/m5/SimObject.py @@ -748,7 +748,8 @@ class SimObject(object): for param in param_names: value = self._values.get(param) if value is None: - continue + m5.fatal("%s.%s without default or user set value" \ + % (self.path(), param)) value = value.getValue() if isinstance(self._params[param], VectorParamDesc): -- 2.30.2