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
19
#include <
simics/systemc/context.h
>
20
21
#include <
simics/systemc/iface/io_memory_interface.h
>
22
#include <
simics/systemc/iface/simulation_interface.h
>
23
#include <
simics/systemc/simics2tlm/gasket_adapter.h
>
24
25
namespace
simics
{
26
namespace
systemc {
27
namespace
simics2tlm {
28
32
class
IoMemoryGasketAdapter
33
:
public
iface::IoMemoryInterface
,
34
public
GasketAdapter
<iface::IoMemoryInterface> {
35
public
:
36
IoMemoryGasketAdapter
(IoMemoryInterface *iomemory,
37
iface::SimulationInterface
*simulation)
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
}
47
simics2tlm::GasketOwner
*
gasket_owner
()
const override
{
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
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:27
simics::systemc::iface::SimulationInterface
Interface to the SystemC simulation.
Definition:
simulation_interface.h:27
simics::systemc::simics2tlm::GasketAdapter
Definition:
gasket_adapter.h:45
simics::systemc::simics2tlm::GasketOwner
Base class, responsible for handling a gasket.
Definition:
gasket_owner.h:32
simics::systemc::simics2tlm::IoMemoryGasketAdapter
Adapter for IoMemory gasket.
Definition:
io_memory_gasket_adapter.h:34
simics::systemc::simics2tlm::IoMemoryGasketAdapter::IoMemoryGasketAdapter
IoMemoryGasketAdapter(IoMemoryInterface *iomemory, iface::SimulationInterface *simulation)
Definition:
io_memory_gasket_adapter.h:36
simics::systemc::simics2tlm::IoMemoryGasketAdapter::gasket_owner
simics2tlm::GasketOwner * gasket_owner() const override
Definition:
io_memory_gasket_adapter.h:47
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:41
context.h
gasket_adapter.h
io_memory_interface.h
simics
Definition:
pci_bus_interface.h:24
simulation_interface.h
simics::types::map_info_t
Reduced, stand-alone, version of the Simics map_info_t struct.
Definition:
map_info.h:25