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// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2014 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_PCI_DEVICE_GASKET_ADAPTER_H
17#define SIMICS_SYSTEMC_SIMICS2TLM_PCI_DEVICE_GASKET_ADAPTER_H
18
23
24namespace simics {
25namespace systemc {
26namespace simics2tlm {
27
33 public GasketAdapter<iface::PciDeviceInterface> {
34 public:
35 PciDeviceGasketAdapter(PciDeviceInterface *pci_device,
37 : pci_device_(pci_device), simulation_(simulation) {
38 }
39 void bus_reset() override {
40 Context context(simulation_);
41 pci_device_->bus_reset();
42 }
43 void system_error() override {
44 Context context(simulation_);
45 pci_device_->system_error();
46 }
47 void interrupt_raised(int pin) override {
48 Context context(simulation_);
49 pci_device_->interrupt_raised(pin);
50 }
51 void interrupt_lowered(int pin) override {
52 Context context(simulation_);
53 pci_device_->interrupt_lowered(pin);
54 }
56 return dynamic_cast<simics2tlm::GasketOwner *>(pci_device_);
57 }
58
59 private:
60 PciDeviceInterface *pci_device_;
61 iface::SimulationInterface *simulation_;
62};
63
64} // namespace simics2tlm
65} // namespace systemc
66} // namespace simics
67
68#endif
Utility class that handles the context switching, using RAII methodology.
Definition: context.h:31
Simics pci_device interface.
Definition: pci_device_interface.h:26
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 PciDevice gasket.
Definition: pci_device_gasket_adapter.h:33
PciDeviceGasketAdapter(PciDeviceInterface *pci_device, iface::SimulationInterface *simulation)
Definition: pci_device_gasket_adapter.h:35
simics2tlm::GasketOwner * gasket_owner() const override
Definition: pci_device_gasket_adapter.h:55
void system_error() override
Definition: pci_device_gasket_adapter.h:43
void bus_reset() override
Definition: pci_device_gasket_adapter.h:39
void interrupt_lowered(int pin) override
Definition: pci_device_gasket_adapter.h:51
void interrupt_raised(int pin) override
Definition: pci_device_gasket_adapter.h:47
Definition: pci_bus_interface.h:24