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