SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
pcie_device_gasket_adapter.h
Go to the documentation of this file.
1/*
2 © 2024 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_PCIE_DEVICE_GASKET_ADAPTER_H
15#define SIMICS_SYSTEMC_SIMICS2TLM_PCIE_DEVICE_GASKET_ADAPTER_H
16
21
22namespace simics {
23namespace systemc {
24namespace simics2tlm {
25
31 public GasketAdapter<iface::PcieDeviceInterface> {
32 public:
33 PcieDeviceGasketAdapter(PcieDeviceInterface *pcie_device,
35 : pcie_device_(pcie_device), simulation_(simulation) {
36 }
37 void connected(conf_object_t *port_obj, uint16_t device_id) override {
38 Context context(simulation_);
39 pcie_device_->connected(port_obj, device_id);
40 }
41 void disconnected(conf_object_t *port_obj, uint16_t device_id) override {
42 Context context(simulation_);
43 pcie_device_->disconnected(port_obj, device_id);
44 }
45 void hot_reset() override {
46 Context context(simulation_);
47 pcie_device_->hot_reset();
48 }
50 return dynamic_cast<simics2tlm::GasketOwner *>(pcie_device_);
51 }
52
53 private:
54 PcieDeviceInterface *pcie_device_;
55 iface::SimulationInterface *simulation_;
56};
57
58} // namespace simics2tlm
59} // namespace systemc
60} // namespace simics
61
62#endif
Utility class that handles the context switching, using RAII methodology.
Definition: context.h:31
Simics pcie_device interface.
Definition: pcie_device_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 PcieDevice gasket.
Definition: pcie_device_gasket_adapter.h:31
void hot_reset() override
Definition: pcie_device_gasket_adapter.h:45
simics2tlm::GasketOwner * gasket_owner() const override
Definition: pcie_device_gasket_adapter.h:49
void connected(conf_object_t *port_obj, uint16_t device_id) override
Definition: pcie_device_gasket_adapter.h:37
void disconnected(conf_object_t *port_obj, uint16_t device_id) override
Definition: pcie_device_gasket_adapter.h:41
PcieDeviceGasketAdapter(PcieDeviceInterface *pcie_device, iface::SimulationInterface *simulation)
Definition: pcie_device_gasket_adapter.h:33
Definition: adapter.h:79