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// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2019 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_MASTER_GASKET_ADAPTER_H
17#define SIMICS_SYSTEMC_SIMICS2TLM_I3C_MASTER_GASKET_ADAPTER_H
18
20
24
25namespace simics {
26namespace systemc {
27namespace simics2tlm {
28
34 public GasketAdapter<iface::I3cMasterInterface> {
35 public:
36 I3cMasterGasketAdapter(I3cMasterInterface *i3cmaster,
38 : i3cmaster_(i3cmaster), simulation_(simulation) {
39 }
40 void acknowledge(types::i3c_ack_t ack) override {
41 Context context(simulation_);
42 i3cmaster_->acknowledge(ack);
43 }
44 void read_response(uint8_t value, bool more) override {
45 Context context(simulation_);
46 i3cmaster_->read_response(value, more);
47 }
48 void daa_response(uint64_t id, uint8_t bcr, uint8_t dcr) override {
49 Context context(simulation_);
50 i3cmaster_->daa_response(id, bcr, dcr);
51 }
52 void ibi_request() override {
53 Context context(simulation_);
54 i3cmaster_->ibi_request();
55 }
56 void ibi_address(uint8_t address) override {
57 Context context(simulation_);
58 i3cmaster_->ibi_address(address);
59 }
61 return dynamic_cast<simics2tlm::GasketOwner *>(i3cmaster_);
62 }
63
64 private:
65 I3cMasterInterface *i3cmaster_;
66 iface::SimulationInterface *simulation_;
67};
68
69} // namespace simics2tlm
70} // namespace systemc
71} // namespace simics
72
73#endif
Utility class that handles the context switching, using RAII methodology.
Definition: context.h:31
Simics i3c_master interface.
Definition: i3c_master_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 I3cMaster gasket.
Definition: i3c_master_gasket_adapter.h:34
void ibi_request() override
Definition: i3c_master_gasket_adapter.h:52
I3cMasterGasketAdapter(I3cMasterInterface *i3cmaster, iface::SimulationInterface *simulation)
Definition: i3c_master_gasket_adapter.h:36
void daa_response(uint64_t id, uint8_t bcr, uint8_t dcr) override
Definition: i3c_master_gasket_adapter.h:48
void ibi_address(uint8_t address) override
Definition: i3c_master_gasket_adapter.h:56
simics2tlm::GasketOwner * gasket_owner() const override
Definition: i3c_master_gasket_adapter.h:60
void read_response(uint8_t value, bool more) override
Definition: i3c_master_gasket_adapter.h:44
void acknowledge(types::i3c_ack_t ack) override
Definition: i3c_master_gasket_adapter.h:40
i3c_ack_t
Definition: i3c_ack.h:22
Definition: pci_bus_interface.h:24