SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
execute_control_simics_adapter.h
Go to the documentation of this file.
1// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2019 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_EXECUTE_CONTROL_SIMICS_ADAPTER_H
17#define SIMICS_SYSTEMC_IFACE_EXECUTE_CONTROL_SIMICS_ADAPTER_H
18
19#include <simics/model-iface/execute.h>
22
23#include <string>
24#include <vector>
25
26namespace simics {
27namespace systemc {
28namespace iface {
29
31template<typename TBase, typename TInterface = ExecuteControlInterface>
33 : public SimicsAdapter<execute_control_interface_t> {
34 public:
36 : SimicsAdapter<execute_control_interface_t>(EXECUTE_CONTROL_INTERFACE,
37 init_iface()) {}
38
39 protected:
40 static void message_pending(conf_object_t *obj) {
41 adapterWithoutLocking<TBase, TInterface>(obj)->message_pending();
42 }
43 static void yield_request(conf_object_t *obj) {
44 adapterWithoutLocking<TBase, TInterface>(obj)->yield_request();
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 execute_control_interface_t init_iface() {
53 execute_control_interface_t iface = {};
54 iface.message_pending = message_pending;
55 iface.yield_request = yield_request;
56 return iface;
57 }
58};
59
60} // namespace iface
61} // namespace systemc
62} // namespace simics
63
64#endif
Adapter for concurrency group interface.
Definition: execute_control_simics_adapter.h:33
ExecuteControlSimicsAdapter()
Definition: execute_control_simics_adapter.h:35
static void yield_request(conf_object_t *obj)
Definition: execute_control_simics_adapter.h:43
static void message_pending(conf_object_t *obj)
Definition: execute_control_simics_adapter.h:40
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