SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
event_delta_simics_adapter.h
Go to the documentation of this file.
1// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2018 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_EVENT_DELTA_SIMICS_ADAPTER_H
17#define SIMICS_SYSTEMC_IFACE_EVENT_DELTA_SIMICS_ADAPTER_H
18
19#include <simics/model-iface/event-delta.h>
22
23#include <string>
24#include <vector>
25
26namespace simics {
27namespace systemc {
28namespace iface {
29
31template<typename TBase, typename TInterface = EventDeltaInterface>
32class EventDeltaSimicsAdapter : public SimicsAdapter<event_delta_interface_t> {
33 public:
35 : SimicsAdapter<event_delta_interface_t>(EVENT_DELTA_INTERFACE,
36 init_iface()) {
37 }
38
39 protected:
40 static ::uint64 set_delta(conf_object_t *NOTNULL obj,
41 conf_object_t *NOTNULL event_handler_obj,
42 const event_class_t *next_event_ec,
43 ::uint64 delta) {
44 return adapter<TBase, TInterface>(obj)->set_delta(event_handler_obj,
45 next_event_ec,
46 delta);
47 }
48 static ::uint64 get_delta(conf_object_t *NOTNULL obj,
49 conf_object_t *NOTNULL event_handler_obj) {
50 return adapter<TBase, TInterface>(obj)->get_delta(event_handler_obj);
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 event_delta_interface_t init_iface() {
59 event_delta_interface_t iface = {};
60 iface.set_delta = set_delta;
61 iface.get_delta = get_delta;
62 return iface;
63 }
64};
65
66} // namespace iface
67} // namespace systemc
68} // namespace simics
69
70#endif
Definition: event_delta_simics_adapter.h:32
EventDeltaSimicsAdapter()
Definition: event_delta_simics_adapter.h:34
::uint64 set_delta(conf_object_t *NOTNULL obj, conf_object_t *NOTNULL event_handler_obj, const event_class_t *next_event_ec, ::uint64 delta)
Definition: event_delta_simics_adapter.h:40
::uint64 get_delta(conf_object_t *NOTNULL obj, conf_object_t *NOTNULL event_handler_obj)
Definition: event_delta_simics_adapter.h:48
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