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
17
#include <
simics/systemc/context.h
>
18
19
#include <
simics/systemc/iface/io_memory_interface.h
>
20
#include <
simics/systemc/iface/simulation_interface.h
>
21
#include <
simics/systemc/simics2tlm/gasket_adapter.h
>
22
23
namespace
simics
{
24
namespace
systemc {
25
namespace
simics2tlm {
26
30
class
IoMemoryGasketAdapter
31
:
public
iface::IoMemoryInterface
,
32
public
GasketAdapter
<iface::IoMemoryInterface> {
33
public
:
34
IoMemoryGasketAdapter
(IoMemoryInterface *iomemory,
35
iface::SimulationInterface
*simulation)
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
}
45
simics2tlm::GasketOwner
*
gasket_owner
()
const override
{
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
simics::systemc::Context
Utility class that handles the context switching, using RAII methodology.
Definition:
context.h:31
simics::systemc::iface::IoMemoryInterface
Simics io_memory interface.
Definition:
io_memory_interface.h:25
simics::systemc::iface::SimulationInterface
Interface to the SystemC simulation.
Definition:
simulation_interface.h:25
simics::systemc::simics2tlm::GasketAdapter
Definition:
gasket_adapter.h:43
simics::systemc::simics2tlm::GasketOwner
Base class, responsible for handling a gasket.
Definition:
gasket_owner.h:30
simics::systemc::simics2tlm::IoMemoryGasketAdapter
Adapter for IoMemory gasket.
Definition:
io_memory_gasket_adapter.h:32
simics::systemc::simics2tlm::IoMemoryGasketAdapter::IoMemoryGasketAdapter
IoMemoryGasketAdapter(IoMemoryInterface *iomemory, iface::SimulationInterface *simulation)
Definition:
io_memory_gasket_adapter.h:34
simics::systemc::simics2tlm::IoMemoryGasketAdapter::gasket_owner
simics2tlm::GasketOwner * gasket_owner() const override
Definition:
io_memory_gasket_adapter.h:45
simics::systemc::simics2tlm::IoMemoryGasketAdapter::operation
exception_type_t operation(generic_transaction_t *mem_op, const types::map_info_t &info) override
Definition:
io_memory_gasket_adapter.h:39
context.h
gasket_adapter.h
io_memory_interface.h
simics
Definition:
adapter.h:79
simulation_interface.h
simics::types::map_info_t
Reduced, stand-alone, version of the Simics map_info_t struct.
Definition:
map_info.h:23