SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
Loading...
Searching...
No Matches
i2c_master_v2_gasket_adapter.h
Go to the documentation of this file.
1
// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3
/*
4
© 2018 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_I2C_MASTER_V2_GASKET_ADAPTER_H
17
#define SIMICS_SYSTEMC_SIMICS2TLM_I2C_MASTER_V2_GASKET_ADAPTER_H
18
19
#include <
simics/systemc/context.h
>
20
21
#include <
simics/systemc/iface/i2c_master_v2_interface.h
>
22
#include <
simics/systemc/iface/simulation_interface.h
>
23
#include <
simics/systemc/simics2tlm/gasket_adapter.h
>
24
25
#include <stdint.h>
26
27
namespace
simics
{
28
namespace
systemc {
29
namespace
simics2tlm {
30
34
class
I2cMasterV2GasketAdapter
35
:
public
iface::I2cMasterV2Interface
,
36
public
GasketAdapter
<iface::I2cMasterV2Interface> {
37
public
:
38
I2cMasterV2GasketAdapter
(I2cMasterV2Interface *i2cmasterv2,
39
iface::SimulationInterface
*simulation)
40
: i2cmasterv2_(i2cmasterv2), simulation_(simulation) {
41
}
42
void
acknowledge
(
types::i2c_ack_t
ack)
override
{
43
Context
context(simulation_);
44
i2cmasterv2_->acknowledge(ack);
45
}
46
void
read_response
(uint8_t value)
override
{
47
Context
context(simulation_);
48
i2cmasterv2_->read_response(value);
49
}
50
simics2tlm::GasketOwner
*
gasket_owner
()
const override
{
51
return
dynamic_cast<
simics2tlm::GasketOwner
*
>
(i2cmasterv2_);
52
}
53
54
private
:
55
I2cMasterV2Interface* i2cmasterv2_;
56
iface::SimulationInterface
*simulation_;
57
};
58
59
}
// namespace simics2tlm
60
}
// namespace systemc
61
}
// namespace simics
62
63
#endif
simics::systemc::Context
Utility class that handles the context switching, using RAII methodology.
Definition:
context.h:31
simics::systemc::iface::I2cMasterV2Interface
Simics i2c_master_v2 interface.
Definition:
i2c_master_v2_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::I2cMasterV2GasketAdapter
Adapter for I2cMasterV2 gasket.
Definition:
i2c_master_v2_gasket_adapter.h:36
simics::systemc::simics2tlm::I2cMasterV2GasketAdapter::gasket_owner
simics2tlm::GasketOwner * gasket_owner() const override
Definition:
i2c_master_v2_gasket_adapter.h:50
simics::systemc::simics2tlm::I2cMasterV2GasketAdapter::read_response
void read_response(uint8_t value) override
Definition:
i2c_master_v2_gasket_adapter.h:46
simics::systemc::simics2tlm::I2cMasterV2GasketAdapter::I2cMasterV2GasketAdapter
I2cMasterV2GasketAdapter(I2cMasterV2Interface *i2cmasterv2, iface::SimulationInterface *simulation)
Definition:
i2c_master_v2_gasket_adapter.h:38
simics::systemc::simics2tlm::I2cMasterV2GasketAdapter::acknowledge
void acknowledge(types::i2c_ack_t ack) override
Definition:
i2c_master_v2_gasket_adapter.h:42
context.h
gasket_adapter.h
i2c_master_v2_interface.h
simics::types::i2c_ack_t
i2c_ack_t
Definition:
i2c_ack.h:22
simics
Definition:
pci_bus_interface.h:24
simulation_interface.h