SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
checkpoint.h
Go to the documentation of this file.
1// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2016 Intel Corporation
5
6 This software and the related documents are Intel copyrighted materials, and
7 your use of them is governed by the express license under which they were
8 provided to you ("License"). Unless the License provides otherwise, you may
9 not use, modify, copy, publish, distribute, disclose or transmit this software
10 or the related documents without Intel's prior written permission.
11
12 This software and the related documents are provided as is, with no express or
13 implied warranties, other than those that are expressly stated in the License.
14*/
15
16#ifndef SIMICS_SYSTEMC_CHECKPOINT_H
17#define SIMICS_SYSTEMC_CHECKPOINT_H
18
22#include <systemc-checkpoint/time_information_interface.h>
23
24#include <string>
25#include <vector>
26
27namespace simics {
28namespace systemc {
29
30class CheckpointControl;
31
34 public sc_checkpoint::ExternalTimeInformationInterface {
35 public:
37 Checkpoint(const Checkpoint&) = delete;
38 Checkpoint& operator=(const Checkpoint&) = delete;
39 virtual ~Checkpoint();
40
41 // CheckpointInterface
42 virtual void save(const char *path);
43 virtual void finish(int success);
44 virtual int has_persistent_data();
45
46 // TemporalStateInterface
47 virtual lang_void *save();
48 virtual void merge(lang_void *prev, lang_void *killed);
49 virtual void prepare_restore();
50 virtual void finish_restore(lang_void *state);
51
52 // ExternalTimeInformationInterface
53 virtual void set_time_information(int64_t high, uint64_t low);
54 virtual void time_information(int64_t *high, uint64_t *low);
55
56 std::vector<std::string> systemcState() const;
57 void setSystemcState(const std::vector<std::string> &checkpoints);
58
60
61 protected:
63
64 private:
65 iface::SimulationInterface *simulation_;
66 CheckpointControl *control_;
67
68 std::vector<std::string> checkpoints_;
69};
70
71} // namespace systemc
72} // namespace simics
73
74#endif // SIMICS_SYSTEMC_CHECKPOINT_H
Definition: checkpoint_control.h:28
Definition: checkpoint.h:34
virtual void save(const char *path)
void setSystemcState(const std::vector< std::string > &checkpoints)
virtual void time_information(int64_t *high, uint64_t *low)
Checkpoint & operator=(const Checkpoint &)=delete
virtual void prepare_restore()
virtual lang_void * save()
virtual void finish_restore(lang_void *state)
virtual void finish(int success)
std::vector< std::string > systemcState() const
Checkpoint(iface::SimulationInterface *simulation)
Checkpoint(const Checkpoint &)=delete
virtual int has_persistent_data()
void initializeCheckpoint(CheckpointControl *control)
virtual void set_time_information(int64_t high, uint64_t low)
virtual void merge(lang_void *prev, lang_void *killed)
Simics checkpoint interface.
Definition: checkpoint_interface.h:26
Interface to the SystemC simulation.
Definition: simulation_interface.h:27
Definition: temporal_state_interface.h:37
Definition: adapter.h:80