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// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2024 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_PCIE_DEVICE_GASKET_ADAPTER_H
17#define SIMICS_SYSTEMC_SIMICS2TLM_PCIE_DEVICE_GASKET_ADAPTER_H
18
23
24namespace simics {
25namespace systemc {
26namespace simics2tlm {
27
33 public GasketAdapter<iface::PcieDeviceInterface> {
34 public:
35 PcieDeviceGasketAdapter(PcieDeviceInterface *pcie_device,
37 : pcie_device_(pcie_device), simulation_(simulation) {
38 }
39 void connected(conf_object_t *port_obj, uint16_t device_id) override {
40 Context context(simulation_);
41 pcie_device_->connected(port_obj, device_id);
42 }
43 void disconnected(conf_object_t *port_obj, uint16_t device_id) override {
44 Context context(simulation_);
45 pcie_device_->disconnected(port_obj, device_id);
46 }
47 void hot_reset() override {
48 Context context(simulation_);
49 pcie_device_->hot_reset();
50 }
52 return dynamic_cast<simics2tlm::GasketOwner *>(pcie_device_);
53 }
54
55 private:
56 PcieDeviceInterface *pcie_device_;
57 iface::SimulationInterface *simulation_;
58};
59
60} // namespace simics2tlm
61} // namespace systemc
62} // namespace simics
63
64#endif
Utility class that handles the context switching, using RAII methodology.
Definition: context.h:33
Simics pcie_device interface.
Definition: pcie_device_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 PcieDevice gasket.
Definition: pcie_device_gasket_adapter.h:33
void hot_reset() override
Definition: pcie_device_gasket_adapter.h:47
simics2tlm::GasketOwner * gasket_owner() const override
Definition: pcie_device_gasket_adapter.h:51
void connected(conf_object_t *port_obj, uint16_t device_id) override
Definition: pcie_device_gasket_adapter.h:39
void disconnected(conf_object_t *port_obj, uint16_t device_id) override
Definition: pcie_device_gasket_adapter.h:43
PcieDeviceGasketAdapter(PcieDeviceInterface *pcie_device, iface::SimulationInterface *simulation)
Definition: pcie_device_gasket_adapter.h:35
Definition: adapter.h:80