SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
i3c_master_gasket_adapter.h
Go to the documentation of this file.
1/*
2 © 2019 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_MASTER_GASKET_ADAPTER_H
15#define SIMICS_SYSTEMC_SIMICS2TLM_I3C_MASTER_GASKET_ADAPTER_H
16
18
22
23namespace simics {
24namespace systemc {
25namespace simics2tlm {
26
32 public GasketAdapter<iface::I3cMasterInterface> {
33 public:
34 I3cMasterGasketAdapter(I3cMasterInterface *i3cmaster,
36 : i3cmaster_(i3cmaster), simulation_(simulation) {
37 }
38 void acknowledge(types::i3c_ack_t ack) override {
39 Context context(simulation_);
40 i3cmaster_->acknowledge(ack);
41 }
42 void read_response(uint8_t value, bool more) override {
43 Context context(simulation_);
44 i3cmaster_->read_response(value, more);
45 }
46 void daa_response(uint64_t id, uint8_t bcr, uint8_t dcr) override {
47 Context context(simulation_);
48 i3cmaster_->daa_response(id, bcr, dcr);
49 }
50 void ibi_request() override {
51 Context context(simulation_);
52 i3cmaster_->ibi_request();
53 }
54 void ibi_address(uint8_t address) override {
55 Context context(simulation_);
56 i3cmaster_->ibi_address(address);
57 }
59 return dynamic_cast<simics2tlm::GasketOwner *>(i3cmaster_);
60 }
61
62 private:
63 I3cMasterInterface *i3cmaster_;
64 iface::SimulationInterface *simulation_;
65};
66
67} // namespace simics2tlm
68} // namespace systemc
69} // namespace simics
70
71#endif
Utility class that handles the context switching, using RAII methodology.
Definition: context.h:31
Simics i3c_master interface.
Definition: i3c_master_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 I3cMaster gasket.
Definition: i3c_master_gasket_adapter.h:32
void ibi_request() override
Definition: i3c_master_gasket_adapter.h:50
I3cMasterGasketAdapter(I3cMasterInterface *i3cmaster, iface::SimulationInterface *simulation)
Definition: i3c_master_gasket_adapter.h:34
void daa_response(uint64_t id, uint8_t bcr, uint8_t dcr) override
Definition: i3c_master_gasket_adapter.h:46
void ibi_address(uint8_t address) override
Definition: i3c_master_gasket_adapter.h:54
simics2tlm::GasketOwner * gasket_owner() const override
Definition: i3c_master_gasket_adapter.h:58
void read_response(uint8_t value, bool more) override
Definition: i3c_master_gasket_adapter.h:42
void acknowledge(types::i3c_ack_t ack) override
Definition: i3c_master_gasket_adapter.h:38
i3c_ack_t
Definition: i3c_ack.h:20
Definition: adapter.h:79