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 void save(const char *path) override;
43 void finish(int success) override;
44 int has_persistent_data() override;
45
46 // TemporalStateInterface
47 lang_void *save() override;
48 void merge(lang_void *prev, lang_void *killed) override;
49 void prepare_restore() override;
50 void finish_restore(lang_void *state) override;
51
52 // ExternalTimeInformationInterface
53 void set_time_information(int64_t high, uint64_t low) override;
54 void time_information(int64_t *high, uint64_t *low) override;
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
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:26
Interface to the SystemC simulation.
Definition: simulation_interface.h:27
Definition: temporal_state_interface.h:37
Definition: adapter.h:81