SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
signal.h
Go to the documentation of this file.
1/*
2 © 2013 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_SIMICS2SYSTEMC_SIGNAL_H
15#define SIMICS_SYSTEMC_SIMICS2SYSTEMC_SIGNAL_H
16
17#include <simics/cc-api.h>
18#include <systemc>
19
24
25namespace simics {
26namespace systemc {
27namespace simics2systemc {
28
30 public:
31 friend class SignalSerializable;
33 SignalBase(const SignalBase&) = delete;
34 SignalBase& operator=(const SignalBase&) = delete;
36
37 // iface::SignalInterface
38 void raise() override {
39 validate_signal_level(true);
40 update(true);
41 }
42 void lower() override {
43 validate_signal_level(false);
44 update(false);
45 }
46
48 InternalInterface *internal);
49 void set_pin(sc_core::sc_in<bool> *target_pin, bool initial_level,
50 const ConfObjectRef &obj);
51 void set_pin(sc_core::sc_inout<bool> *target_pin, bool initial_level,
52 const ConfObjectRef &obj);
54
55 private:
56 void update(bool value);
57 void set_pin(const char *target_pin_name, bool initial_level,
58 const ConfObjectRef &obj);
59 void validate_signal_level(bool raise);
60 virtual void create_gasket(sc_core::sc_module_name);
61
62 ConfObjectRef *simics_obj_;
63 GasketInterface *gasket_;
64 iface::SimulationInterface *simulation_;
65 InternalInterface *internal_;
66};
67
68#if INTC_EXT && USE_SIMICS_CHECKPOINTING
69class SignalSerializable : public SignalBase {
70 public:
71 SignalSerializable();
72
73 private:
74 void create_gasket(sc_core::sc_module_name) override;
75};
76
77using Signal = SignalSerializable;
78#else
80#endif
81
82} // namespace simics2systemc
83} // namespace systemc
84} // namespace simics
85
86#endif
Definition: internal_interface.h:23
Simics signal interface.
Definition: signal_interface.h:26
Interface to the SystemC simulation.
Definition: simulation_interface.h:25
Definition: gasket_interface.h:28
void init(iface::SimulationInterface *simulation, InternalInterface *internal)
SignalBase & operator=(const SignalBase &)=delete
friend class SignalSerializable
Definition: signal.h:31
void lower() override
Definition: signal.h:42
void set_pin(sc_core::sc_in< bool > *target_pin, bool initial_level, const ConfObjectRef &obj)
void set_pin(sc_core::sc_inout< bool > *target_pin, bool initial_level, const ConfObjectRef &obj)
SignalBase(const SignalBase &)=delete
void raise() override
Definition: signal.h:38
SignalBase Signal
Definition: signal.h:79
Definition: adapter.h:79