SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
sc_initiator_gasket_simics_adapter.h
Go to the documentation of this file.
1/*
2 © 2015 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_IFACE_SC_INITIATOR_GASKET_SIMICS_ADAPTER_H
15#define SIMICS_SYSTEMC_IFACE_SC_INITIATOR_GASKET_SIMICS_ADAPTER_H
16
19
20#include <systemc-interfaces.h>
21
22#include <string>
23#include <vector>
24
25namespace simics {
26namespace systemc {
27namespace iface {
28
30template<typename TBase,
31 typename TInterface = ScInitiatorGasketInterface>
33 : public SimicsAdapter<sc_initiator_gasket_interface_t> {
34 public:
36 : SimicsAdapter<sc_initiator_gasket_interface_t>(
37 SC_INITIATOR_GASKET_INTERFACE, init_iface()) {
38 }
39
40 protected:
41 static void set_dmi(conf_object_t *obj, bool enable) {
42 adapter<TBase, TInterface>(obj)->set_dmi(enable);
43 }
44 static bool is_dmi_enabled(conf_object_t *obj) {
45 return adapter<TBase, TInterface>(obj)->is_dmi_enabled();
46 }
47 static char *print_dmi_table(conf_object_t *obj) {
48 return adapter<TBase, TInterface>(obj)->print_dmi_table();
49 }
50
51 private:
52 std::vector<std::string> description(conf_object_t *obj,
53 DescriptionType type) override {
54 return descriptionBase<TBase, TInterface>(obj, type);
55 }
56 sc_initiator_gasket_interface_t init_iface() {
57 sc_initiator_gasket_interface_t iface = {};
58 iface.set_dmi = set_dmi;
59 iface.is_dmi_enabled = is_dmi_enabled;
60 iface.print_dmi_table = print_dmi_table;
61 return iface;
62 }
63};
64
65} // namespace iface
66} // namespace systemc
67} // namespace simics
68
69#endif
Definition: sc_initiator_gasket_simics_adapter.h:33
ScInitiatorGasketSimicsAdapter()
Definition: sc_initiator_gasket_simics_adapter.h:35
static bool is_dmi_enabled(conf_object_t *obj)
Definition: sc_initiator_gasket_simics_adapter.h:44
static char * print_dmi_table(conf_object_t *obj)
Definition: sc_initiator_gasket_simics_adapter.h:47
static void set_dmi(conf_object_t *obj, bool enable)
Definition: sc_initiator_gasket_simics_adapter.h:41
Base class for mapping Simics interface to a C++ interface.
Definition: simics_adapter.h:45
DescriptionType
Definition: description_interface.h:23
Definition: adapter.h:79