SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
i3c_slave_gasket_adapter.h
Go to the documentation of this file.
1/*
2 © 2021 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_I3C_SLAVE_GASKET_ADAPTER_H
15#define SIMICS_SYSTEMC_SIMICS2TLM_I3C_SLAVE_GASKET_ADAPTER_H
16
18
22
23namespace simics {
24namespace systemc {
25namespace simics2tlm {
26
32 public GasketAdapter<iface::I3cSlaveInterface> {
33 public:
34 I3cSlaveGasketAdapter(I3cSlaveInterface *i3cslave,
36 : i3cslave_(i3cslave), simulation_(simulation) {
37 }
38
39 void start(uint8_t address) override {
40 Context context(simulation_);
41 i3cslave_->start(address);
42 }
43 void write(uint8_t value) override {
44 Context context(simulation_);
45 i3cslave_->write(value);
46 }
47 void sdr_write(types::bytes_t data) override {
48 Context context(simulation_);
49 i3cslave_->sdr_write(data);
50 }
51 void read() override {
52 Context context(simulation_);
53 i3cslave_->read();
54 }
55 void daa_read() override {
56 Context context(simulation_);
57 i3cslave_->daa_read();
58 }
59 void stop() override {
60 Context context(simulation_);
61 i3cslave_->stop();
62 }
63 void ibi_start() override {
64 Context context(simulation_);
65 i3cslave_->ibi_start();
66 }
67 void ibi_acknowledge(types::i3c_ack_t ack) override {
68 Context context(simulation_);
69 i3cslave_->ibi_acknowledge(ack);
70 }
71
73 return dynamic_cast<simics2tlm::GasketOwner *>(i3cslave_);
74 }
75
76 private:
77 I3cSlaveInterface *i3cslave_;
78 iface::SimulationInterface *simulation_;
79};
80
81} // namespace simics2tlm
82} // namespace systemc
83} // namespace simics
84
85#endif
Utility class that handles the context switching, using RAII methodology.
Definition: context.h:31
Definition: i3c_slave_interface.h:25
Interface to the SystemC simulation.
Definition: simulation_interface.h:25
Definition: gasket_adapter.h:43
Base class, responsible for handling a gasket.
Definition: gasket_owner.h:30
Adapter for I3cSlave gasket.
Definition: i3c_slave_gasket_adapter.h:32
void write(uint8_t value) override
Definition: i3c_slave_gasket_adapter.h:43
void sdr_write(types::bytes_t data) override
Definition: i3c_slave_gasket_adapter.h:47
void read() override
Definition: i3c_slave_gasket_adapter.h:51
void daa_read() override
Definition: i3c_slave_gasket_adapter.h:55
void start(uint8_t address) override
Definition: i3c_slave_gasket_adapter.h:39
void ibi_acknowledge(types::i3c_ack_t ack) override
Definition: i3c_slave_gasket_adapter.h:67
I3cSlaveGasketAdapter(I3cSlaveInterface *i3cslave, iface::SimulationInterface *simulation)
Definition: i3c_slave_gasket_adapter.h:34
simics2tlm::GasketOwner * gasket_owner() const override
Definition: i3c_slave_gasket_adapter.h:72
void ibi_start() override
Definition: i3c_slave_gasket_adapter.h:63
void stop() override
Definition: i3c_slave_gasket_adapter.h:59
i3c_ack_t
Definition: i3c_ack.h:20
Definition: adapter.h:79
Definition: bytes.h:26