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// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2014 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_IO_MEMORY_GASKET_ADAPTER_H
17#define SIMICS_SYSTEMC_SIMICS2TLM_IO_MEMORY_GASKET_ADAPTER_H
18
20
24
25namespace simics {
26namespace systemc {
27namespace simics2tlm {
28
34 public GasketAdapter<iface::IoMemoryInterface> {
35 public:
36 IoMemoryGasketAdapter(IoMemoryInterface *iomemory,
38 : iomemory_(iomemory), simulation_(simulation) {
39 }
40
41 exception_type_t operation(generic_transaction_t *mem_op,
42 const types::map_info_t &info) override {
43 Context context(simulation_);
44 exception_type_t ret = iomemory_->operation(mem_op, info);
45 return ret;
46 }
48 return dynamic_cast<simics2tlm::GasketOwner *>(iomemory_);
49 }
50
51 private:
52 IoMemoryInterface *iomemory_;
53 iface::SimulationInterface *simulation_;
54};
55
56} // namespace simics2tlm
57} // namespace systemc
58} // namespace simics
59
60#endif
Utility class that handles the context switching, using RAII methodology.
Definition: context.h:31
Simics io_memory interface.
Definition: io_memory_interface.h:27
Interface to the SystemC simulation.
Definition: simulation_interface.h:27
Definition: gasket_adapter.h:45
Base class, responsible for handling a gasket.
Definition: gasket_owner.h:32
Adapter for IoMemory gasket.
Definition: io_memory_gasket_adapter.h:34
IoMemoryGasketAdapter(IoMemoryInterface *iomemory, iface::SimulationInterface *simulation)
Definition: io_memory_gasket_adapter.h:36
simics2tlm::GasketOwner * gasket_owner() const override
Definition: io_memory_gasket_adapter.h:47
exception_type_t operation(generic_transaction_t *mem_op, const types::map_info_t &info) override
Definition: io_memory_gasket_adapter.h:41
Definition: pci_bus_interface.h:24
Reduced, stand-alone, version of the Simics map_info_t struct.
Definition: map_info.h:25