sim_object.hh (9253:e0d2a8e9f445) sim_object.hh (9254:f1b35c618252)
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * Copyright (c) 2010 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

250 */
251 virtual unsigned int drain(Event *drain_event);
252
253 /**
254 * Switch an object in the Drained stated into the Running state.
255 */
256 virtual void resume();
257
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * Copyright (c) 2010 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

250 */
251 virtual unsigned int drain(Event *drain_event);
252
253 /**
254 * Switch an object in the Drained stated into the Running state.
255 */
256 virtual void resume();
257
258 /**
259 * Prepare a CPU model to be switched out, invoked on active CPUs
260 * that are about to be replaced.
261 *
262 * @note This should only be implemented in CPU models.
263 */
264 virtual void switchOut();
265
266 /**
267 * Load the state of a CPU from the previous CPU object, invoked
268 * on all new CPUs that are about to be switched in.
269 *
270 * A CPU model implementing this method is expected to initialize
271 * its state from the old CPU and connect its memory (unless they
272 * are already connected) to the memories connected to the old
273 * CPU.
274 *
275 * @note This should only be implemented in CPU models.
276 *
277 * @param cpu CPU to initialize read state from.
278 */
279 virtual void takeOverFrom(BaseCPU *cpu);
280
281#ifdef DEBUG
282 public:
283 bool doDebugBreak;
284 static void debugObjectBreak(const std::string &objs);
285#endif
286
287 /**
288 * Find the SimObject with the given name and return a pointer to
289 * it. Primarily used for interactive debugging. Argument is
290 * char* rather than std::string to make it callable from gdb.
291 */
292 static SimObject *find(const char *name);
293};
294
295#endif // __SIM_OBJECT_HH__
258#ifdef DEBUG
259 public:
260 bool doDebugBreak;
261 static void debugObjectBreak(const std::string &objs);
262#endif
263
264 /**
265 * Find the SimObject with the given name and return a pointer to
266 * it. Primarily used for interactive debugging. Argument is
267 * char* rather than std::string to make it callable from gdb.
268 */
269 static SimObject *find(const char *name);
270};
271
272#endif // __SIM_OBJECT_HH__