SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
io_memory_gasket_adapter.h
Go to the documentation of this file.
1/*
2 © 2014 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_IO_MEMORY_GASKET_ADAPTER_H
15#define SIMICS_SYSTEMC_SIMICS2TLM_IO_MEMORY_GASKET_ADAPTER_H
16
18
22
23namespace simics {
24namespace systemc {
25namespace simics2tlm {
26
32 public GasketAdapter<iface::IoMemoryInterface> {
33 public:
34 IoMemoryGasketAdapter(IoMemoryInterface *iomemory,
36 : iomemory_(iomemory), simulation_(simulation) {
37 }
38
39 exception_type_t operation(generic_transaction_t *mem_op,
40 const types::map_info_t &info) override {
41 Context context(simulation_);
42 exception_type_t ret = iomemory_->operation(mem_op, info);
43 return ret;
44 }
46 return dynamic_cast<simics2tlm::GasketOwner *>(iomemory_);
47 }
48
49 private:
50 IoMemoryInterface *iomemory_;
51 iface::SimulationInterface *simulation_;
52};
53
54} // namespace simics2tlm
55} // namespace systemc
56} // namespace simics
57
58#endif
Utility class that handles the context switching, using RAII methodology.
Definition: context.h:31
Simics io_memory interface.
Definition: io_memory_interface.h:25
Interface to the SystemC simulation.
Definition: simulation_interface.h:25
Definition: gasket_adapter.h:43
Base class, responsible for handling a gasket.
Definition: gasket_owner.h:30
Adapter for IoMemory gasket.
Definition: io_memory_gasket_adapter.h:32
IoMemoryGasketAdapter(IoMemoryInterface *iomemory, iface::SimulationInterface *simulation)
Definition: io_memory_gasket_adapter.h:34
simics2tlm::GasketOwner * gasket_owner() const override
Definition: io_memory_gasket_adapter.h:45
exception_type_t operation(generic_transaction_t *mem_op, const types::map_info_t &info) override
Definition: io_memory_gasket_adapter.h:39
Definition: adapter.h:79
Reduced, stand-alone, version of the Simics map_info_t struct.
Definition: map_info.h:23