enable the Trace, Statistics, and Serialize param contexts.
objects/Root.mpy:
Fake the param context stuff for now.
sim/param.cc:
Make empty vector enums work
sim/serialize.cc:
serialize_dir is always valid
--HG--
extra : convert_revision : c46373f0f4c70e6a2f01a81c0fa6bacab72d4c4f
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
from HierParams import HierParams
|
||||
from Serialize import Serialize
|
||||
from Statistics import Statistics
|
||||
from Trace import Trace
|
||||
|
||||
simobj Root(SimObject):
|
||||
type = 'Root'
|
||||
frequency = Param.Tick(200000000, "tick frequency")
|
||||
@@ -9,3 +13,6 @@ simobj Root(SimObject):
|
||||
full_system = Param.Bool("Full system simulation?")
|
||||
hier = HierParams(do_data = False, do_events = True)
|
||||
checkpoint = Param.String('', "Checkpoint file")
|
||||
stats = Statistics()
|
||||
trace = Trace()
|
||||
serialize = Serialize()
|
||||
|
||||
@@ -441,6 +441,11 @@ EnumVectorParam<Map>::parse(const string &s)
|
||||
{
|
||||
vector<string> tokens;
|
||||
|
||||
if (s.empty()) {
|
||||
wasSet = true;
|
||||
return;
|
||||
}
|
||||
|
||||
tokenize(tokens, s, ' ');
|
||||
|
||||
value.resize(tokens.size());
|
||||
|
||||
@@ -333,11 +333,7 @@ SerializeParamContext::~SerializeParamContext()
|
||||
void
|
||||
SerializeParamContext::checkParams()
|
||||
{
|
||||
if (serialize_dir.isValid()) {
|
||||
checkpointDirBase = serialize_dir;
|
||||
} else {
|
||||
checkpointDirBase = outputDirectory + "cpt.%012d";
|
||||
}
|
||||
checkpointDirBase = outputDirectory + (string)serialize_dir;
|
||||
|
||||
// guarantee that directory ends with a '/'
|
||||
if (checkpointDirBase[checkpointDirBase.size() - 1] != '/')
|
||||
|
||||
Reference in New Issue
Block a user