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