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