Deleted Added
sdiff udiff text old ( 2842:feca0c70f45d ) new ( 2901:f9a45473ab55 )
full compact
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;

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

67 : _params(p)
68{
69#ifdef DEBUG
70 doDebugBreak = false;
71#endif
72
73 doRecordEvent = !Stats::event_ignore.match(name());
74 simObjectList.push_back(this);
75 state = Running;
76}
77
78//
79// SimObject constructor: used to maintain static simObjectList
80//
81SimObject::SimObject(const string &_name)
82 : _params(new Params)
83{
84 _params->name = _name;
85#ifdef DEBUG
86 doDebugBreak = false;
87#endif
88
89 doRecordEvent = !Stats::event_ignore.match(name());
90 simObjectList.push_back(this);
91 state = Running;
92}
93
94void
95SimObject::connect()
96{
97}
98
99void

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

264
265void
266SimObject::recordEvent(const std::string &stat)
267{
268 if (doRecordEvent)
269 Stats::recordEvent(stat);
270}
271
272unsigned int
273SimObject::drain(Event *drain_event)
274{
275 state = Drained;
276 return 0;
277}
278
279void
280SimObject::resume()
281{
282 state = Running;
283}
284
285void
286SimObject::setMemoryMode(State new_mode)
287{
288 panic("setMemoryMode() should only be called on systems");
289}
290
291void
292SimObject::switchOut()
293{
294 panic("Unimplemented!");
295}
296
297void
298SimObject::takeOverFrom(BaseCPU *cpu)
299{
300 panic("Unimplemented!");
301}
302
303DEFINE_SIM_OBJECT_CLASS_NAME("SimObject", SimObject)