sim_object.hh (8320:c03e683e83fe) | sim_object.hh (8737:770ccf3af571) |
---|---|
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 --- 29 unchanged lines hidden (view full) --- 38#define __SIM_OBJECT_HH__ 39 40#include <iostream> 41#include <list> 42#include <map> 43#include <string> 44#include <vector> 45 | 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 --- 29 unchanged lines hidden (view full) --- 38#define __SIM_OBJECT_HH__ 39 40#include <iostream> 41#include <list> 42#include <map> 43#include <string> 44#include <vector> 45 |
46#include "enums/MemoryMode.hh" |
|
46#include "params/SimObject.hh" 47#include "sim/eventq.hh" 48#include "sim/serialize.hh" 49 50class BaseCPU; 51class Event; 52 53/* --- 87 unchanged lines hidden (view full) --- 141 142 // Methods to drain objects in order to take checkpoints 143 // Or switch from timing -> atomic memory model 144 // Drain returns 0 if the simobject can drain immediately or 145 // the number of times the drain_event's process function will be called 146 // before the object will be done draining. Normally this should be 1 147 virtual unsigned int drain(Event *drain_event); 148 virtual void resume(); | 47#include "params/SimObject.hh" 48#include "sim/eventq.hh" 49#include "sim/serialize.hh" 50 51class BaseCPU; 52class Event; 53 54/* --- 87 unchanged lines hidden (view full) --- 142 143 // Methods to drain objects in order to take checkpoints 144 // Or switch from timing -> atomic memory model 145 // Drain returns 0 if the simobject can drain immediately or 146 // the number of times the drain_event's process function will be called 147 // before the object will be done draining. Normally this should be 1 148 virtual unsigned int drain(Event *drain_event); 149 virtual void resume(); |
149 virtual void setMemoryMode(State new_mode); | 150 virtual void setMemoryMode(Enums::MemoryMode new_mode); |
150 virtual void switchOut(); 151 virtual void takeOverFrom(BaseCPU *cpu); 152 153#ifdef DEBUG 154 public: 155 bool doDebugBreak; 156 static void debugObjectBreak(const std::string &objs); 157#endif 158 159 /** 160 * Find the SimObject with the given name and return a pointer to 161 * it. Primarily used for interactive debugging. Argument is 162 * char* rather than std::string to make it callable from gdb. 163 */ 164 static SimObject *find(const char *name); 165}; 166 167#endif // __SIM_OBJECT_HH__ | 151 virtual void switchOut(); 152 virtual void takeOverFrom(BaseCPU *cpu); 153 154#ifdef DEBUG 155 public: 156 bool doDebugBreak; 157 static void debugObjectBreak(const std::string &objs); 158#endif 159 160 /** 161 * Find the SimObject with the given name and return a pointer to 162 * it. Primarily used for interactive debugging. Argument is 163 * char* rather than std::string to make it callable from gdb. 164 */ 165 static SimObject *find(const char *name); 166}; 167 168#endif // __SIM_OBJECT_HH__ |