SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
transaction_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_TRANSACTION_SIMICS_ADAPTER_H
15#define SIMICS_SYSTEMC_IFACE_TRANSACTION_SIMICS_ADAPTER_H
16
17#include <simics/model-iface/transaction.h>
20
21#include <string>
22#include <vector>
23
24namespace simics {
25namespace systemc {
26namespace iface {
27
29template<typename TBase, typename TInterface = TransactionInterface>
30class TransactionSimicsAdapter : public SimicsAdapter<transaction_interface_t> {
31 public:
33 : SimicsAdapter<transaction_interface_t>(TRANSACTION_INTERFACE,
34 init_iface()) {}
35
36 protected:
37 static ::exception_type_t issue(conf_object_t *obj, transaction_t *t,
38 ::uint64 addr) {
39 return static_cast<::exception_type_t>(
40 adapter<TBase, TInterface>(obj)->issue(t, addr));
41 }
42
43 private:
44 std::vector<std::string> description(conf_object_t *obj,
45 DescriptionType type) override {
46 return descriptionBase<TBase, TInterface>(obj, type);
47 }
48 transaction_interface_t init_iface() {
49 transaction_interface_t iface = {};
50 iface.issue = issue;
51 return iface;
52 }
53};
54
55} // namespace iface
56} // namespace systemc
57} // namespace simics
58
59#endif
Base class for mapping Simics interface to a C++ interface.
Definition: simics_adapter.h:45
Adapter for Simics signal interface.
Definition: transaction_simics_adapter.h:30
TransactionSimicsAdapter()
Definition: transaction_simics_adapter.h:32
::exception_type_t issue(conf_object_t *obj, transaction_t *t, ::uint64 addr)
Definition: transaction_simics_adapter.h:37
DescriptionType
Definition: description_interface.h:23
Definition: adapter.h:79