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// -*- 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_EXPRESS_GASKET_ADAPTER_H
17#define SIMICS_SYSTEMC_SIMICS2TLM_PCI_EXPRESS_GASKET_ADAPTER_H
18
19#if defined SIMICS_5_API || defined SIMICS_6_API
20
25
26#include <vector>
27
28namespace simics {
29namespace systemc {
30namespace simics2tlm {
31
35class PciExpressGasketAdapter
36 : public iface::PciExpressInterface,
37 public GasketAdapter<iface::PciExpressInterface> {
38 public:
39 PciExpressGasketAdapter(PciExpressInterface *pci_express,
40 iface::SimulationInterface *simulation)
41 : pci_express_(pci_express), simulation_(simulation) {
42 }
43 int send_message(int type, const std::vector<uint8_t> &payload) override {
44 Context context(simulation_);
45 return pci_express_->send_message(type, payload);
46 }
47 simics2tlm::GasketOwner *gasket_owner() const override {
48 return dynamic_cast<simics2tlm::GasketOwner *>(pci_express_);
49 }
50
51 private:
52 PciExpressInterface *pci_express_;
53 iface::SimulationInterface *simulation_;
54};
55
56} // namespace simics2tlm
57} // namespace systemc
58} // namespace simics
59
60#endif
61#endif
Definition: pci_bus_interface.h:24