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/*
2 © 2019 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_EXECUTE_CONTROL_SIMICS_ADAPTER_H
15#define SIMICS_SYSTEMC_IFACE_EXECUTE_CONTROL_SIMICS_ADAPTER_H
16
17#include <simics/model-iface/execute.h>
20
21#include <string>
22#include <vector>
23
24namespace simics {
25namespace systemc {
26namespace iface {
27
29template<typename TBase, typename TInterface = ExecuteControlInterface>
31 : public SimicsAdapter<execute_control_interface_t> {
32 public:
34 : SimicsAdapter<execute_control_interface_t>(EXECUTE_CONTROL_INTERFACE,
35 init_iface()) {}
36
37 protected:
38 static void message_pending(conf_object_t *obj) {
39 adapterWithoutLocking<TBase, TInterface>(obj)->message_pending();
40 }
41 static void yield_request(conf_object_t *obj) {
42 adapterWithoutLocking<TBase, TInterface>(obj)->yield_request();
43 }
44
45 private:
46 std::vector<std::string> description(conf_object_t *obj,
47 DescriptionType type) override {
48 return descriptionBase<TBase, TInterface>(obj, type);
49 }
50 execute_control_interface_t init_iface() {
51 execute_control_interface_t iface = {};
52 iface.message_pending = message_pending;
53 iface.yield_request = yield_request;
54 return iface;
55 }
56};
57
58} // namespace iface
59} // namespace systemc
60} // namespace simics
61
62#endif
Adapter for concurrency group interface.
Definition: execute_control_simics_adapter.h:31
ExecuteControlSimicsAdapter()
Definition: execute_control_simics_adapter.h:33
static void yield_request(conf_object_t *obj)
Definition: execute_control_simics_adapter.h:41
static void message_pending(conf_object_t *obj)
Definition: execute_control_simics_adapter.h:38
Base class for mapping Simics interface to a C++ interface.
Definition: simics_adapter.h:45
DescriptionType
Definition: description_interface.h:23
Definition: adapter.h:79