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