Deleted Added
sdiff udiff text old ( 2737:f712ccc4b1f9 ) new ( 2738:5d7a31c7fa29 )
full compact
1/*
2 * Copyright (c) 2000-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 43 unchanged lines hidden (view full) ---

52#include "base/misc.hh"
53#include "base/output.hh"
54#include "base/pollevent.hh"
55#include "base/statistics.hh"
56#include "base/str.hh"
57#include "base/time.hh"
58#include "cpu/base.hh"
59#include "cpu/smt.hh"
60#include "sim/async.hh"
61#include "sim/builder.hh"
62#include "sim/configfile.hh"
63#include "sim/host.hh"
64#include "sim/sim_events.hh"
65#include "sim/sim_exit.hh"
66#include "sim/sim_object.hh"
67#include "sim/stat_control.hh"
68#include "sim/stats.hh"
69#include "sim/root.hh"
70

--- 58 unchanged lines hidden (view full) ---

129" -p, --path <path> prepends <path> to PYTHONPATH instead of using\n"
130" built-in zip archive. Useful when developing/debugging\n"
131" changes to built-in Python libraries, as the new Python\n"
132" can be tested without building a new m5 binary.\n\n"
133" -i, --interactive forces entry into interactive mode after the supplied\n"
134" script is executed (just like the -i option to the\n"
135" Python interpreter).\n\n"
136" -h Prints this help\n\n"
137" <configfile> config file name which ends in .py. (Normally you can\n"
138" run <configfile> --help to get help on that config files\n"
139" parameters.\n\n",
140 prog);
141
142}
143
144const char *briefCopyright =
145"Copyright (c) 2001-2006\n"
146"The Regents of The University of Michigan\n"
147"All Rights Reserved\n";

--- 145 unchanged lines hidden (view full) ---

293
294 PyRun_InteractiveLoop(stdin, "stdin");
295 }
296
297 // clean up Python intepreter.
298 Py_Finalize();
299}
300
301
302/// Initialize C++ configuration. Exported to Python via SWIG; invoked
303/// from m5.instantiate().
304void
305initialize()
306{
307 configStream = simout.find("config.out");
308
309 // The configuration database is now complete; start processing it.
310 IniFile inifile;
311 inifile.load("config.ini");
312
313 // Initialize statistics database
314 Stats::InitSimStats();
315
316 // Now process the configuration hierarchy and create the SimObjects.
317 ConfigHierarchy configHierarchy(inifile);
318 configHierarchy.build();
319 configHierarchy.createSimObjects();
320
321 // Parse and check all non-config-hierarchy parameters.
322 ParamContext::parseAllContexts(inifile);
323 ParamContext::checkAllContexts();
324
325 // Echo all parameter settings to stats file as well.
326 ParamContext::showAllContexts(*configStream);
327
328 // Any objects that can't connect themselves until after construction should
329 // do so now
330 SimObject::connectAll();
331
332 // Do a second pass to finish initializing the sim objects
333 SimObject::initAll();
334
335 // Restore checkpointed state, if any.
336 configHierarchy.unserializeSimObjects();
337
338 // Done processing the configuration database.
339 // Check for unreferenced entries.
340 if (inifile.printUnreferenced())
341 panic("unreferenced sections/entries in the intermediate ini file");
342
343 SimObject::regAllStats();
344
345 // uncomment the following to get PC-based execution-time profile
346#ifdef DO_PROFILE
347 init_profile((char *)&_init, (char *)&_fini);
348#endif
349
350 // Check to make sure that the stats package is properly initialized

--- 124 unchanged lines hidden ---