SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
Loading...
Searching...
No Matches
ethernet_common_gasket_adapter.h
Go to the documentation of this file.
1
/*
2
© 2016 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_ETHERNET_COMMON_GASKET_ADAPTER_H
15
#define SIMICS_SYSTEMC_SIMICS2TLM_ETHERNET_COMMON_GASKET_ADAPTER_H
16
17
#include <
simics/systemc/context.h
>
18
#include <
simics/systemc/iface/ethernet_common_interface.h
>
19
#include <
simics/systemc/iface/simulation_interface.h
>
20
#include <
simics/systemc/simics2tlm/gasket_adapter.h
>
21
22
namespace
simics
{
23
namespace
systemc {
24
namespace
simics2tlm {
25
26
class
EthernetCommonGasketAdapter
27
:
public
iface::EthernetCommonInterface
,
28
public
GasketAdapter
<iface::EthernetCommonInterface> {
29
public
:
30
EthernetCommonGasketAdapter
(
31
EthernetCommonInterface *eth_device,
32
iface::SimulationInterface
*simulation)
33
: eth_device_(eth_device), simulation_(simulation) {
34
}
35
void
frame
(
const
types::frags_t
*
frame
,
int
crc_ok)
override
{
36
Context
context(simulation_);
37
eth_device_->frame(
frame
, crc_ok);
38
}
39
simics2tlm::GasketOwner
*
gasket_owner
()
const override
{
40
return
dynamic_cast<
simics2tlm::GasketOwner
*
>
(eth_device_);
41
}
42
43
private
:
44
EthernetCommonInterface *eth_device_;
45
iface::SimulationInterface
*simulation_;
46
};
47
48
}
// namespace simics2tlm
49
}
// namespace systemc
50
}
// namespace simics
51
52
#endif
simics::systemc::Context
Utility class that handles the context switching, using RAII methodology.
Definition:
context.h:31
simics::systemc::iface::EthernetCommonInterface
Simics ethernet_common interface.
Definition:
ethernet_common_interface.h:24
simics::systemc::iface::SimulationInterface
Interface to the SystemC simulation.
Definition:
simulation_interface.h:25
simics::systemc::simics2tlm::EthernetCommonGasketAdapter
Definition:
ethernet_common_gasket_adapter.h:28
simics::systemc::simics2tlm::EthernetCommonGasketAdapter::EthernetCommonGasketAdapter
EthernetCommonGasketAdapter(EthernetCommonInterface *eth_device, iface::SimulationInterface *simulation)
Definition:
ethernet_common_gasket_adapter.h:30
simics::systemc::simics2tlm::EthernetCommonGasketAdapter::frame
void frame(const types::frags_t *frame, int crc_ok) override
Definition:
ethernet_common_gasket_adapter.h:35
simics::systemc::simics2tlm::EthernetCommonGasketAdapter::gasket_owner
simics2tlm::GasketOwner * gasket_owner() const override
Definition:
ethernet_common_gasket_adapter.h:39
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
context.h
ethernet_common_interface.h
gasket_adapter.h
simics
Definition:
adapter.h:79
simulation_interface.h
simics::types::frags_t
Definition:
frags.h:36