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// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2020 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_SYSTEMC2SIMICS_SIGNAL_CLASS_H
17#define SIMICS_SYSTEMC_SYSTEMC2SIMICS_SIGNAL_CLASS_H
18
23
24#include <string>
25
26namespace simics {
27namespace systemc {
28namespace systemc2simics {
29
30class SignalClassBase : public ConfObject,
32 public Version {
35
36 public:
37 explicit SignalClassBase(ConfObjectRef o);
38 void finalize() override;
40 void createGasket(iface::SimulationInterface *simulation) override;
41
42 private:
43 virtual SignalBase *signal() {return nullptr;}
44
45 std::string sc_object_;
46 ConfObjectRef simulation_ref_;
47};
48
50 public:
52 static conf_class_t *registerGasketClass(const char* class_name);
53
54 private:
55 SignalBase *signal() override {
56 return signal_.operator->();;
57 }
58
60};
61
62#if INTC_EXT && USE_SIMICS_CHECKPOINTING
63class SignalClassSerializable : public SignalClassBase {
64 public:
65 explicit SignalClassSerializable(ConfObjectRef o);
66 static conf_class_t *registerGasketClass(const char* class_name);
67
68 private:
69 SignalBase *signal() override {
70 return signal_.operator->();;
71 }
72
73 Connector<SignalSerializable> signal_;
74};
75using SignalClass = SignalClassSerializable;
76#else
78#endif
79
80} // namespace systemc2simics
81} // namespace systemc
82} // namespace simics
83
84#endif
Provides get/set functionality for a connector attribute, typically registered by using the Connector...
Definition: connector.h:41
Definition: gasket_class_interface.h:28
Definition: version.h:43
Definition: sc_version_interface.h:27
Interface to the SystemC simulation.
Definition: simulation_interface.h:27
void createGasket(iface::SimulationInterface *simulation) override
friend class SignalClassSerializable
Definition: signal_class.h:34
iface::ScVersionInterface * version() override
static conf_class_t * registerGasketClass(const char *class_name)
SignalClassNonSerializable SignalClass
Definition: signal_class.h:77
Definition: adapter.h:80