sim_object.hh (7460:41550bb10e08) sim_object.hh (7492:acc1fbbef239)
1/*
2 * Copyright (c) 2001-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;

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

40#include <list>
41#include <map>
42#include <string>
43#include <vector>
44
45#include "params/SimObject.hh"
46#include "sim/eventq.hh"
47#include "sim/serialize.hh"
1/*
2 * Copyright (c) 2001-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;

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

40#include <list>
41#include <map>
42#include <string>
43#include <vector>
44
45#include "params/SimObject.hh"
46#include "sim/eventq.hh"
47#include "sim/serialize.hh"
48#include "sim/startup.hh"
49
50class BaseCPU;
51class Event;
52
53/*
54 * Abstract superclass for simulation objects. Represents things that
55 * correspond to physical components and can be specified via the
56 * config file (CPUs, caches, etc.).
57 */
48
49class BaseCPU;
50class Event;
51
52/*
53 * Abstract superclass for simulation objects. Represents things that
54 * correspond to physical components and can be specified via the
55 * config file (CPUs, caches, etc.).
56 */
58class SimObject
59 : public EventManager, public Serializable, protected StartupCallback
57class SimObject : public EventManager, public Serializable
60{
61 public:
62 enum State {
63 Running,
64 Draining,
65 Drained
66 };
67

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

98 virtual void init();
99 static void initAll();
100
101 // register statistics for this object
102 virtual void regStats();
103 virtual void regFormulas();
104 virtual void resetStats();
105
58{
59 public:
60 enum State {
61 Running,
62 Draining,
63 Drained
64 };
65

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

96 virtual void init();
97 static void initAll();
98
99 // register statistics for this object
100 virtual void regStats();
101 virtual void regFormulas();
102 virtual void resetStats();
103
104 // final initialization before simulation
105 // all state is unserialized so
106 virtual void startup();
107 static void startupAll();
108
106 // static: call reg_stats on all SimObjects
107 static void regAllStats();
108
109 // static: call resetStats on all SimObjects
110 static void resetAllStats();
111
112 // static: call nameOut() & serialize() on all SimObjects
113 static void serializeAll(std::ostream &);

--- 28 unchanged lines hidden ---
109 // static: call reg_stats on all SimObjects
110 static void regAllStats();
111
112 // static: call resetStats on all SimObjects
113 static void resetAllStats();
114
115 // static: call nameOut() & serialize() on all SimObjects
116 static void serializeAll(std::ostream &);

--- 28 unchanged lines hidden ---