SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
pci_express_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_EXPRESS_GASKET_ADAPTER_H
15#define SIMICS_SYSTEMC_SIMICS2TLM_PCI_EXPRESS_GASKET_ADAPTER_H
16
17#if defined SIMICS_6_API || defined SHOW_OBSOLETE_API
18
23
24#include <vector>
25
26namespace simics {
27namespace systemc {
28namespace simics2tlm {
29
33class PciExpressGasketAdapter
34 : public iface::PciExpressInterface,
35 public GasketAdapter<iface::PciExpressInterface> {
36 public:
37 PciExpressGasketAdapter(PciExpressInterface *pci_express,
38 iface::SimulationInterface *simulation)
39 : pci_express_(pci_express), simulation_(simulation) {
40 }
41 int send_message(int type, const std::vector<uint8_t> &payload) override {
42 Context context(simulation_);
43 return pci_express_->send_message(type, payload);
44 }
45 simics2tlm::GasketOwner *gasket_owner() const override {
46 return dynamic_cast<simics2tlm::GasketOwner *>(pci_express_);
47 }
48
49 private:
50 PciExpressInterface *pci_express_;
51 iface::SimulationInterface *simulation_;
52};
53
54} // namespace simics2tlm
55} // namespace systemc
56} // namespace simics
57
58#endif
59#endif
Definition: adapter.h:79