cxx_manager.hh (10458:64809024b924) | cxx_manager.hh (10905:a6ca6831e775) |
---|---|
1/* 2 * Copyright (c) 2014 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 47 unchanged lines hidden (view full) --- 56#include <map> 57#include <set> 58#include <string> 59#include <vector> 60 61#include "base/cprintf.hh" 62#include "sim/cxx_config.hh" 63 | 1/* 2 * Copyright (c) 2014 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 47 unchanged lines hidden (view full) --- 56#include <map> 57#include <set> 58#include <string> 59#include <vector> 60 61#include "base/cprintf.hh" 62#include "sim/cxx_config.hh" 63 |
64class Checkpoint; | 64class CheckpointIn; |
65 66/** This class allows a config file to be read into gem5 (generating the 67 * appropriate SimObjects) from C++ */ 68class CxxConfigManager 69{ 70 protected: 71 /** Configuration file being read */ 72 CxxConfigFileBase &configFile; --- 214 unchanged lines hidden (view full) --- 287 288 /** Resume from drain */ 289 void drainResume(); 290 291 /** Serialize (checkpoint) all objects to the given stream */ 292 void serialize(std::ostream &os); 293 294 /** Load all objects' state from the given Checkpoint */ | 65 66/** This class allows a config file to be read into gem5 (generating the 67 * appropriate SimObjects) from C++ */ 68class CxxConfigManager 69{ 70 protected: 71 /** Configuration file being read */ 72 CxxConfigFileBase &configFile; --- 214 unchanged lines hidden (view full) --- 287 288 /** Resume from drain */ 289 void drainResume(); 290 291 /** Serialize (checkpoint) all objects to the given stream */ 292 void serialize(std::ostream &os); 293 294 /** Load all objects' state from the given Checkpoint */ |
295 void loadState(Checkpoint *checkpoint); | 295 void loadState(CheckpointIn &checkpoint); |
296 297 /** Delete all objects and clear objectsByName and objectsByOrder */ 298 void deleteObjects(); 299 300 /** Get the resolver used to map SimObject names to SimObjects for 301 * checkpoint restore */ 302 SimObjectResolver &getSimObjectResolver() { return simObjectResolver; } 303 304 /** Convenience functions for calling set... member functions on a 305 * CxxConfigParams for an object. These functions throw Exception 306 * rather than return a bool on failure */ 307 void setParam(const std::string &object_name, 308 const std::string ¶m_name, const std::string ¶m_value); 309 void setParamVector(const std::string &object_name, 310 const std::string ¶m_name, 311 const std::vector<std::string> ¶m_values); 312}; 313 314#endif // __SIM_CXX_MANAGER_HH__ | 296 297 /** Delete all objects and clear objectsByName and objectsByOrder */ 298 void deleteObjects(); 299 300 /** Get the resolver used to map SimObject names to SimObjects for 301 * checkpoint restore */ 302 SimObjectResolver &getSimObjectResolver() { return simObjectResolver; } 303 304 /** Convenience functions for calling set... member functions on a 305 * CxxConfigParams for an object. These functions throw Exception 306 * rather than return a bool on failure */ 307 void setParam(const std::string &object_name, 308 const std::string ¶m_name, const std::string ¶m_value); 309 void setParamVector(const std::string &object_name, 310 const std::string ¶m_name, 311 const std::vector<std::string> ¶m_values); 312}; 313 314#endif // __SIM_CXX_MANAGER_HH__ |