SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
transaction_gasket_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_SIMICS2TLM_TRANSACTION_GASKET_ADAPTER_H
17#define SIMICS_SYSTEMC_SIMICS2TLM_TRANSACTION_GASKET_ADAPTER_H
18
23
24namespace simics {
25namespace systemc {
26namespace simics2tlm {
27
33 public GasketAdapter<iface::TransactionInterface> {
34 public:
35 TransactionGasketAdapter(TransactionInterface *transaction,
37 : transaction_(transaction), simulation_(simulation) {
38 }
39 exception_type_t issue(transaction_t *t, uint64 addr) override {
40 Context context(simulation_);
41 return transaction_->issue(t, addr);
42 }
44 return dynamic_cast<simics2tlm::GasketOwner *>(transaction_);
45 }
46
47 private:
48 TransactionInterface *transaction_;
49 iface::SimulationInterface *simulation_;
50};
51
52} // namespace simics2tlm
53} // namespace systemc
54} // namespace simics
55
56#endif
Utility class that handles the context switching, using RAII methodology.
Definition: context.h:31
Interface to the SystemC simulation.
Definition: simulation_interface.h:27
Simics transaction interface.
Definition: transaction_interface.h:26
Definition: gasket_adapter.h:45
Base class, responsible for handling a gasket.
Definition: gasket_owner.h:32
Adapter for Transaction gasket.
Definition: transaction_gasket_adapter.h:33
simics2tlm::GasketOwner * gasket_owner() const override
Definition: transaction_gasket_adapter.h:43
exception_type_t issue(transaction_t *t, uint64 addr) override
Definition: transaction_gasket_adapter.h:39
TransactionGasketAdapter(TransactionInterface *transaction, iface::SimulationInterface *simulation)
Definition: transaction_gasket_adapter.h:35
Definition: pci_bus_interface.h:24