SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
signal_class.h
Go to the documentation of this file.
1/*
2 © 2020 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_SYSTEMC2SIMICS_SIGNAL_CLASS_H
15#define SIMICS_SYSTEMC_SYSTEMC2SIMICS_SIGNAL_CLASS_H
16
21
22#include <string>
23
24namespace simics {
25namespace systemc {
26namespace systemc2simics {
27
28class SignalClassBase : public ConfObject,
30 public Version {
33
34 public:
35 explicit SignalClassBase(ConfObjectRef o);
36 void finalize() override;
38 void createGasket(iface::SimulationInterface *simulation) override;
39
40 private:
41 virtual SignalBase *signal() {return nullptr;}
42
43 std::string sc_object_;
44 ConfObjectRef simulation_ref_;
45};
46
48 public:
50 static conf_class_t *registerGasketClass(const char* class_name);
51
52 private:
53 SignalBase *signal() override {
54 return signal_.operator->();;
55 }
56
58};
59
60#if INTC_EXT && USE_SIMICS_CHECKPOINTING
61class SignalClassSerializable : public SignalClassBase {
62 public:
63 explicit SignalClassSerializable(ConfObjectRef o);
64 static conf_class_t *registerGasketClass(const char* class_name);
65
66 private:
67 SignalBase *signal() override {
68 return signal_.operator->();;
69 }
70
71 Connector<SignalSerializable> signal_;
72};
73using SignalClass = SignalClassSerializable;
74#else
76#endif
77
78} // namespace systemc2simics
79} // namespace systemc
80} // namespace simics
81
82#endif
Provides get/set functionality for a connector attribute, typically registered by using the Connector...
Definition: connector.h:39
Definition: gasket_class_interface.h:26
Definition: version.h:41
Definition: sc_version_interface.h:25
Interface to the SystemC simulation.
Definition: simulation_interface.h:25
void createGasket(iface::SimulationInterface *simulation) override
friend class SignalClassSerializable
Definition: signal_class.h:32
iface::ScVersionInterface * version() override
static conf_class_t * registerGasketClass(const char *class_name)
SignalClassNonSerializable SignalClass
Definition: signal_class.h:75
Definition: adapter.h:79