diff options
Diffstat (limited to 'sim/main.cc')
-rw-r--r-- | sim/main.cc | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/sim/main.cc b/sim/main.cc index e8ac58786..a99ac26d6 100644 --- a/sim/main.cc +++ b/sim/main.cc @@ -34,10 +34,12 @@ #include <stdlib.h> #include <signal.h> +#include <list> #include <string> #include <vector> #include "base/copyright.hh" +#include "base/embedfile.hh" #include "base/inifile.hh" #include "base/misc.hh" #include "base/pollevent.hh" @@ -254,6 +256,21 @@ main(int argc, char **argv) // switch on second char switch (arg_str[1]) { + case 'X': { + list<EmbedFile> lst; + EmbedMap::all(lst); + list<EmbedFile>::iterator i = lst.begin(); + list<EmbedFile>::iterator end = lst.end(); + + while (i != end) { + cprintf("Embedded File: %s\n", i->name); + cout.write(i->data, i->length); + ++i; + } + + return 0; + } + case 'h': // -h: show help showLongHelp(cerr); @@ -311,7 +328,7 @@ main(int argc, char **argv) cprintf("Error processing file %s\n", filename); exit(1); } - } else if (ext == ".py") { + } else if (ext == ".py" || ext == ".mpy") { if (!loadPythonConfig(filename, &simConfigDB)) { cprintf("Error processing file %s\n", filename); exit(1); @@ -335,6 +352,11 @@ main(int argc, char **argv) // the stat file name is set via a .ini param... thus it just got // opened above during ParamContext::checkAllContexts(). + // Now process the configuration hierarchy and create the SimObjects. + ConfigHierarchy configHierarchy(simConfigDB); + configHierarchy.build(); + configHierarchy.createSimObjects(); + // Print hello message to stats file if it's actually a file. If // it's not (i.e. it's cout or cerr) then we already did it above. if (outputStream != &cout && outputStream != &cerr) @@ -344,11 +366,6 @@ main(int argc, char **argv) echoCommandLine(argc, argv, *outputStream); ParamContext::showAllContexts(*configStream); - // Now process the configuration hierarchy and create the SimObjects. - ConfigHierarchy configHierarchy(simConfigDB); - configHierarchy.build(); - configHierarchy.createSimObjects(); - // Do a second pass to finish initializing the sim objects SimObject::initAll(); |