SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
gasket.h
Go to the documentation of this file.
1// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2019 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_SIMICS2SYSTEMC_GASKET_H
17#define SIMICS_SYSTEMC_SIMICS2SYSTEMC_GASKET_H
18
19#include <systemc>
20
22
23#include <string>
24
25#if INTC_EXT && USE_SIMICS_CHECKPOINTING
26#include <systemc-checkpoint/serialization/sc_signal.h>
27#include <systemc-checkpoint/serialization/serializer.h>
28#include <systemc-checkpoint/serialization/smd.h>
29#endif
30
31namespace simics {
32namespace systemc {
33namespace simics2systemc {
34
37class Gasket : public GasketInterface
38 , public sc_core::sc_module {
39 public:
41 explicit Gasket(sc_core::sc_module_name) : output_pin_("output_pin") {}
42 virtual sc_core::sc_signal<bool> *output_pin() {
43 return &output_pin_;
44 }
45 virtual std::string gasket_name() const {
46 return name();
47 }
48
49#if INTC_EXT && USE_SIMICS_CHECKPOINTING
50 friend class cci::serialization::access;
51 template <class Archive>
52 void serialize(Archive& ar, const unsigned int version) { // NOLINT
53 ar & SMD(output_pin_);
54 }
55#endif
56
57 private:
58 sc_core::sc_signal<bool> output_pin_;
59};
60
61#if INTC_EXT && USE_SIMICS_CHECKPOINTING
62static sc_checkpoint::serialization::Serializer<Gasket> gasket_serializer;
63#endif
64
65} // namespace simics2systemc
66} // namespace systemc
67} // namespace simics
68
69#endif
Definition: gasket_interface.h:30
Gasket for translating a Simics signal interface into a SystemC sc_signal of type bool.
Definition: gasket.h:38
Gasket(sc_core::sc_module_name)
Definition: gasket.h:41
virtual sc_core::sc_signal< bool > * output_pin()
Definition: gasket.h:42
virtual std::string gasket_name() const
Definition: gasket.h:45
Definition: pci_bus_interface.h:24