SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
sc_signal_read_simics_adapter.h
Go to the documentation of this file.
1// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2017 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_SIGNAL_READ_SIMICS_ADAPTER_H
17#define SIMICS_SYSTEMC_IFACE_SC_SIGNAL_READ_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 = ScSignalReadInterface>
35 : public SimicsAdapter<sc_signal_read_interface_t> {
36 public:
38 : SimicsAdapter<sc_signal_read_interface_t>(
39 SC_SIGNAL_READ_INTERFACE, init_iface()) {
40 }
41
42 protected:
43 static attr_value_t read(conf_object_t *obj) {
44 return adapter<TBase, TInterface>(obj)->read();
45 }
46
47 private:
48 std::vector<std::string> description(conf_object_t *obj,
49 DescriptionType type) {
50 return descriptionBase<TBase, TInterface>(obj, type);
51 }
52 sc_signal_read_interface_t init_iface() {
53 sc_signal_read_interface_t iface = {};
54 iface.read = read;
55 return iface;
56 }
57};
58
59} // namespace iface
60} // namespace systemc
61} // namespace simics
62
63#endif
Definition: sc_signal_read_simics_adapter.h:35
ScSignalReadSimicsAdapter()
Definition: sc_signal_read_simics_adapter.h:37
static attr_value_t read(conf_object_t *obj)
Definition: sc_signal_read_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