Config: Cause a fatal() when a parameter without a default value isn't set(FS #315).

This commit is contained in:
Ali Saidi 2009-01-30 19:08:13 -05:00
parent 0b228fc1ab
commit 35a85a4e86
3 changed files with 4 additions and 2 deletions

View file

@ -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")

View file

@ -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 = ""

View file

@ -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):