SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
pci_device_gasket_adapter.h
Go to the documentation of this file.
1/*
2 © 2014 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_PCI_DEVICE_GASKET_ADAPTER_H
15#define SIMICS_SYSTEMC_SIMICS2TLM_PCI_DEVICE_GASKET_ADAPTER_H
16
21
22namespace simics {
23namespace systemc {
24namespace simics2tlm {
25
31 public GasketAdapter<iface::PciDeviceInterface> {
32 public:
33 PciDeviceGasketAdapter(PciDeviceInterface *pci_device,
35 : pci_device_(pci_device), simulation_(simulation) {
36 }
37 void bus_reset() override {
38 Context context(simulation_);
39 pci_device_->bus_reset();
40 }
41 void system_error() override {
42 Context context(simulation_);
43 pci_device_->system_error();
44 }
45 void interrupt_raised(int pin) override {
46 Context context(simulation_);
47 pci_device_->interrupt_raised(pin);
48 }
49 void interrupt_lowered(int pin) override {
50 Context context(simulation_);
51 pci_device_->interrupt_lowered(pin);
52 }
54 return dynamic_cast<simics2tlm::GasketOwner *>(pci_device_);
55 }
56
57 private:
58 PciDeviceInterface *pci_device_;
59 iface::SimulationInterface *simulation_;
60};
61
62} // namespace simics2tlm
63} // namespace systemc
64} // namespace simics
65
66#endif
Utility class that handles the context switching, using RAII methodology.
Definition: context.h:31
Simics pci_device interface.
Definition: pci_device_interface.h:24
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 PciDevice gasket.
Definition: pci_device_gasket_adapter.h:31
PciDeviceGasketAdapter(PciDeviceInterface *pci_device, iface::SimulationInterface *simulation)
Definition: pci_device_gasket_adapter.h:33
simics2tlm::GasketOwner * gasket_owner() const override
Definition: pci_device_gasket_adapter.h:53
void system_error() override
Definition: pci_device_gasket_adapter.h:41
void bus_reset() override
Definition: pci_device_gasket_adapter.h:37
void interrupt_lowered(int pin) override
Definition: pci_device_gasket_adapter.h:49
void interrupt_raised(int pin) override
Definition: pci_device_gasket_adapter.h:45
Definition: adapter.h:79