main.cc (4073:62f6ab072e2e) main.cc (4078:3f73f808bbd4)
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;

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

48#include <vector>
49
50#include "base/callback.hh"
51#include "base/inifile.hh"
52#include "base/misc.hh"
53#include "base/output.hh"
54#include "base/pollevent.hh"
55#include "base/statistics.hh"
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;

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

48#include <vector>
49
50#include "base/callback.hh"
51#include "base/inifile.hh"
52#include "base/misc.hh"
53#include "base/output.hh"
54#include "base/pollevent.hh"
55#include "base/statistics.hh"
56#include "base/stats/output.hh"
56#include "base/str.hh"
57#include "base/time.hh"
58#include "config/pythonhome.hh"
59#include "cpu/base.hh"
60#include "cpu/smt.hh"
61#include "mem/mem_object.hh"
62#include "mem/port.hh"
63#include "python/swig/init.hh"

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

215{
216 resolveFunc = _resolveFunc;
217 configStream = simout.find("config.out");
218
219 // The configuration database is now complete; start processing it.
220 inifile.load(simout.resolve("config.ini"));
221
222 // Initialize statistics database
57#include "base/str.hh"
58#include "base/time.hh"
59#include "config/pythonhome.hh"
60#include "cpu/base.hh"
61#include "cpu/smt.hh"
62#include "mem/mem_object.hh"
63#include "mem/port.hh"
64#include "python/swig/init.hh"

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

216{
217 resolveFunc = _resolveFunc;
218 configStream = simout.find("config.out");
219
220 // The configuration database is now complete; start processing it.
221 inifile.load(simout.resolve("config.ini"));
222
223 // Initialize statistics database
223 Stats::InitSimStats();
224 Stats::initSimStats();
224}
225
226
227/**
228 * Look up a MemObject port. Helper function for connectPorts().
229 */
230Port *
231lookupPort(SimObject *so, const std::string &name, int i)

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

292 Stats::check();
293
294 // Reset to put the stats in a consistent state.
295 Stats::reset();
296
297 SimStartup();
298}
299
225}
226
227
228/**
229 * Look up a MemObject port. Helper function for connectPorts().
230 */
231Port *
232lookupPort(SimObject *so, const std::string &name, int i)

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

293 Stats::check();
294
295 // Reset to put the stats in a consistent state.
296 Stats::reset();
297
298 SimStartup();
299}
300
300
301/** Simulate for num_cycles additional cycles. If num_cycles is -1
302 * (the default), do not limit simulation; some other event must
303 * terminate the loop. Exported to Python via SWIG.
304 * @return The SimLoopExitEvent that caused the loop to exit.
305 */
306SimLoopExitEvent *
307simulate(Tick num_cycles = MaxTick)
308{

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

345
346 return se_event;
347 }
348
349 if (async_event) {
350 async_event = false;
351 if (async_dump) {
352 async_dump = false;
301/** Simulate for num_cycles additional cycles. If num_cycles is -1
302 * (the default), do not limit simulation; some other event must
303 * terminate the loop. Exported to Python via SWIG.
304 * @return The SimLoopExitEvent that caused the loop to exit.
305 */
306SimLoopExitEvent *
307simulate(Tick num_cycles = MaxTick)
308{

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

345
346 return se_event;
347 }
348
349 if (async_event) {
350 async_event = false;
351 if (async_dump) {
352 async_dump = false;
353
354 using namespace Stats;
355 SetupEvent(Dump, curTick);
353 Stats::StatEvent(true, false);
356 }
357
358 if (async_dumpreset) {
359 async_dumpreset = false;
354 }
355
356 if (async_dumpreset) {
357 async_dumpreset = false;
360
361 using namespace Stats;
362 SetupEvent(Dump | Reset, curTick);
358 Stats::StatEvent(true, true);
363 }
364
365 if (async_exit) {
366 async_exit = false;
367 exitSimLoop("user interrupt received");
368 }
369
370 if (async_io || async_alarm) {

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

464 exitCallbacks().process();
465 exitCallbacks().clear();
466
467 cout.flush();
468
469 ParamContext::cleanupAllContexts();
470
471 // print simulation stats
359 }
360
361 if (async_exit) {
362 async_exit = false;
363 exitSimLoop("user interrupt received");
364 }
365
366 if (async_io || async_alarm) {

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

460 exitCallbacks().process();
461 exitCallbacks().clear();
462
463 cout.flush();
464
465 ParamContext::cleanupAllContexts();
466
467 // print simulation stats
472 Stats::DumpNow();
468 Stats::dump();
473}
469}