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 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 */ |
57class SimObject : public EventManager, public Serializable |
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 |
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 --- |