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// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2015 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_IFACE_SC_INITIATOR_GASKET_SIMICS_ADAPTER_H
17#define SIMICS_SYSTEMC_IFACE_SC_INITIATOR_GASKET_SIMICS_ADAPTER_H
18
21
22#include <systemc-interfaces.h>
23
24#include <string>
25#include <vector>
26
27namespace simics {
28namespace systemc {
29namespace iface {
30
32template<typename TBase,
33 typename TInterface = ScInitiatorGasketInterface>
35 : public SimicsAdapter<sc_initiator_gasket_interface_t> {
36 public:
38 : SimicsAdapter<sc_initiator_gasket_interface_t>(
39 SC_INITIATOR_GASKET_INTERFACE, init_iface()) {
40 }
41
42 protected:
43 static void set_dmi(conf_object_t *obj, bool enable) {
44 adapter<TBase, TInterface>(obj)->set_dmi(enable);
45 }
46 static bool is_dmi_enabled(conf_object_t *obj) {
47 return adapter<TBase, TInterface>(obj)->is_dmi_enabled();
48 }
49 static char *print_dmi_table(conf_object_t *obj) {
50 return adapter<TBase, TInterface>(obj)->print_dmi_table();
51 }
52
53 private:
54 std::vector<std::string> description(conf_object_t *obj,
55 DescriptionType type) {
56 return descriptionBase<TBase, TInterface>(obj, type);
57 }
58 sc_initiator_gasket_interface_t init_iface() {
59 sc_initiator_gasket_interface_t iface = {};
60 iface.set_dmi = set_dmi;
61 iface.is_dmi_enabled = is_dmi_enabled;
62 iface.print_dmi_table = print_dmi_table;
63 return iface;
64 }
65};
66
67} // namespace iface
68} // namespace systemc
69} // namespace simics
70
71#endif
Definition: sc_initiator_gasket_simics_adapter.h:35
ScInitiatorGasketSimicsAdapter()
Definition: sc_initiator_gasket_simics_adapter.h:37
static bool is_dmi_enabled(conf_object_t *obj)
Definition: sc_initiator_gasket_simics_adapter.h:46
static char * print_dmi_table(conf_object_t *obj)
Definition: sc_initiator_gasket_simics_adapter.h:49
static void set_dmi(conf_object_t *obj, bool enable)
Definition: sc_initiator_gasket_simics_adapter.h:43
Base class for mapping Simics interface to a C++ interface.
Definition: simics_adapter.h:47
DescriptionType
Definition: description_interface.h:25
Definition: pci_bus_interface.h:24