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
// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3
/*
4
© 2016 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_ETHERNET_COMMON_GASKET_ADAPTER_H
17
#define SIMICS_SYSTEMC_SIMICS2TLM_ETHERNET_COMMON_GASKET_ADAPTER_H
18
19
#include <
simics/systemc/context.h
>
20
#include <
simics/systemc/iface/ethernet_common_interface.h
>
21
#include <
simics/systemc/iface/simulation_interface.h
>
22
#include <
simics/systemc/simics2tlm/gasket_adapter.h
>
23
24
namespace
simics
{
25
namespace
systemc {
26
namespace
simics2tlm {
27
28
class
EthernetCommonGasketAdapter
29
:
public
iface::EthernetCommonInterface
,
30
public
GasketAdapter
<iface::EthernetCommonInterface> {
31
public
:
32
EthernetCommonGasketAdapter
(
33
EthernetCommonInterface *eth_device,
34
iface::SimulationInterface
*simulation)
35
: eth_device_(eth_device), simulation_(simulation) {
36
}
37
void
frame
(
const
types::frags_t
*
frame
,
int
crc_ok)
override
{
38
Context
context(simulation_);
39
eth_device_->frame(
frame
, crc_ok);
40
}
41
simics2tlm::GasketOwner
*
gasket_owner
()
const override
{
42
return
dynamic_cast<
simics2tlm::GasketOwner
*
>
(eth_device_);
43
}
44
45
private
:
46
EthernetCommonInterface *eth_device_;
47
iface::SimulationInterface
*simulation_;
48
};
49
50
}
// namespace simics2tlm
51
}
// namespace systemc
52
}
// namespace simics
53
54
#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:26
simics::systemc::iface::SimulationInterface
Interface to the SystemC simulation.
Definition:
simulation_interface.h:27
simics::systemc::simics2tlm::EthernetCommonGasketAdapter
Definition:
ethernet_common_gasket_adapter.h:30
simics::systemc::simics2tlm::EthernetCommonGasketAdapter::EthernetCommonGasketAdapter
EthernetCommonGasketAdapter(EthernetCommonInterface *eth_device, iface::SimulationInterface *simulation)
Definition:
ethernet_common_gasket_adapter.h:32
simics::systemc::simics2tlm::EthernetCommonGasketAdapter::frame
void frame(const types::frags_t *frame, int crc_ok) override
Definition:
ethernet_common_gasket_adapter.h:37
simics::systemc::simics2tlm::EthernetCommonGasketAdapter::gasket_owner
simics2tlm::GasketOwner * gasket_owner() const override
Definition:
ethernet_common_gasket_adapter.h:41
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
context.h
ethernet_common_interface.h
gasket_adapter.h
simics
Definition:
pci_bus_interface.h:24
simulation_interface.h
simics::types::frags_t
Definition:
frags.h:38