Skip to content

Commit 24eeecb

Browse files
committed
Handle both 'run 100ps' and 'run 100 ps' formats
1 parent 34dc726 commit 24eeecb

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/sst/core/impl/interactive/simpleDebug.cc

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ SimpleDebugger::SimpleDebugger(Params& params) :
114114
"\t'watch' creates a default watchpoint that breaks into an interactive console when triggered\n"
115115
"\t'trace' creates a watchpoint with a trace buffer to trace a set of variables and trigger an <action>\n"
116116
"\tAvailable actions include: \n"
117-
"\t interactive, printTrace, checkpoint, set <var> <val>, printStatus, or shutdown" },
117+
"\t interactive, printTrace, checkpoint, set <var> <val>, printStatus, or shutdown"
118+
"\t Note: checkpoint action must be enabled at startup via the '--checkpoint-enable' command line option\n"
119+
},
118120
{ "watch", "<trigger>: adds watchpoint to the watchlist; breaks into interactive console when triggered\n"
119121
"\tExample: watch var1 > 90 && var2 < 100 || var3 changed" },
120122
{ "trace", "<trigger> : <bufferSize> <postDelay> : <var1> ... <varN> : <action>\n"
@@ -592,6 +594,22 @@ SimpleDebugger::cmd_run(std::vector<std::string>& tokens)
592594
return;
593595
}
594596
}
597+
else if (tokens.size() == 3) {
598+
std::string time = tokens[1] + tokens[2];
599+
try {
600+
TimeConverter* tc = getTimeConverter(time);
601+
std::string msg = format_string("Running clock %" PRI_SIMTIME " sim cycles", tc->getFactor());
602+
schedule_interactive(tc->getFactor(), msg);
603+
}
604+
catch (std::exception& e) {
605+
printf("Unknown time in call to run: %s\n", time.c_str());
606+
return;
607+
}
608+
609+
}
610+
else if (tokens.size() != 1) {
611+
printf("Too many arguments for 'run <time>'\n");
612+
}
595613

596614
done = true;
597615
return;

0 commit comments

Comments
 (0)