SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
connection_simics_adapter.h
Go to the documentation of this file.
1/*
2 © 2017 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_INSTRUMENTATION_CONNECTION_SIMICS_ADAPTER_H
15#define SIMICS_SYSTEMC_IFACE_INSTRUMENTATION_CONNECTION_SIMICS_ADAPTER_H
16
17#include <simics/simulator-iface/instrumentation-tool.h>
20
21#include <string>
22#include <vector>
23
24namespace simics {
25namespace systemc {
26namespace iface {
27namespace instrumentation {
28
29template<typename TBase, typename TInterface = ConnectionInterface>
31 : public SimicsAdapter<instrumentation_connection_interface_t> {
32 public:
34 : SimicsAdapter<instrumentation_connection_interface_t>(
35 INSTRUMENTATION_CONNECTION_INTERFACE, init_iface()) {
36 }
37
38 protected:
39 static void enable(conf_object_t *obj) {
40 adapter<TBase, TInterface>(obj)->enable();
41 }
42 static void disable(conf_object_t *obj) {
43 adapter<TBase, TInterface>(obj)->disable();
44 }
45
46 private:
47 std::vector<std::string> description(conf_object_t *obj,
48 DescriptionType type) override {
49 return descriptionBase<TBase, TInterface>(obj, type);
50 }
51 instrumentation_connection_interface_t init_iface() {
52 instrumentation_connection_interface_t iface = {};
53 iface.enable = enable;
54 iface.disable = disable;
55 return iface;
56 }
57};
58
59} // namespace instrumentation
60} // namespace iface
61} // namespace systemc
62} // namespace simics
63
64#endif
Base class for mapping Simics interface to a C++ interface.
Definition: simics_adapter.h:45
static void enable(conf_object_t *obj)
Definition: connection_simics_adapter.h:39
static void disable(conf_object_t *obj)
Definition: connection_simics_adapter.h:42
ConnectionSimicsAdapter()
Definition: connection_simics_adapter.h:33
DescriptionType
Definition: description_interface.h:23
Definition: adapter.h:79