SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
pcie_device_query_interface.h
Go to the documentation of this file.
1/* -*- C++ -*-
2
3 © 2024 Intel Corporation
4
5 This software and the related documents are Intel copyrighted materials, and
6 your use of them is governed by the express license under which they were
7 provided to you ("License"). Unless the License provides otherwise, you may
8 not use, modify, copy, publish, distribute, disclose or transmit this software
9 or the related documents without Intel's prior written permission.
10
11 This software and the related documents are provided as is, with no express or
12 implied warranties, other than those that are expressly stated in the License.
13*/
14
15#ifndef SIMICS_SYSTEMC_IFACE_PCIE_DEVICE_QUERY_INTERFACE_H
16#define SIMICS_SYSTEMC_IFACE_PCIE_DEVICE_QUERY_INTERFACE_H
17
18#include <systemc>
19#include <vector>
20
21namespace simics {
22namespace systemc {
23namespace iface {
24
28//:: pre PcieDeviceQueryInterface {{
30 public:
31 virtual ~PcieDeviceQueryInterface() = default;
32
33 // A multi-function device should pass a multi_passthrough_target_socket
34 // for the config space of all functions, and that each function is
35 // connected to this target socket in ascending id order.
36 virtual sc_core::sc_object *getConfigTargetSocket() = 0;
37 // Returns the target socket to receive PCIe message
38 virtual sc_core::sc_object *getMsgTargetSocket() = 0;
39 // Returns the initiator socket to send upstream transaction
40 virtual sc_core::sc_object *getPcieMapInitiatorSocket() = 0;
41};
42// }}
43
49//:: pre PcieBaseAddressRegisterQueryInterface/Header {{
51 public:
52// }}
54
70 //:: pre PcieBaseAddressRegisterQueryInterface/BAR {{
71 struct PCIeBar {
73 int offset;
74 bool is_memory;
75 bool is_64bit;
77 sc_core::sc_object *target_socket;
78 };
79 // }}
80
87 //:: pre PcieBaseAddressRegisterQueryInterface/Footer {{
88 virtual std::vector<PCIeBar> getBarInfo() = 0;
89};
90// }}
91
93 public:
94 virtual ~PcieResetInterface() = default;
95
96 virtual void functionLevelReset(int function_number) = 0;
97 virtual void warmReset() = 0;
98 virtual void hotReset() = 0;
99};
100
101} // namespace iface
102} // namespace systemc
103} // namespace simics
104
105#endif
Interface that allows the Simics glue to perform snooping and automatic connection of the device's ta...
Definition: pcie_device_query_interface.h:50
virtual std::vector< PCIeBar > getBarInfo()=0
BAR register information.
Interface required from a SystemC PCIe device in order to connect to Simics.
Definition: pcie_device_query_interface.h:29
virtual sc_core::sc_object * getMsgTargetSocket()=0
virtual sc_core::sc_object * getConfigTargetSocket()=0
virtual sc_core::sc_object * getPcieMapInitiatorSocket()=0
Definition: pcie_device_query_interface.h:92
virtual void functionLevelReset(int function_number)=0
Definition: adapter.h:80
Base Address Register (BAR) configuration.
Definition: pcie_device_query_interface.h:71
int size_bits
Size of BAR, in number of bits.
Definition: pcie_device_query_interface.h:76
bool is_memory
If it is a Memory BAR?
Definition: pcie_device_query_interface.h:74
int function
Function number of the device.
Definition: pcie_device_query_interface.h:72
sc_core::sc_object * target_socket
Where to direct the access.
Definition: pcie_device_query_interface.h:77
bool is_64bit
For memory BAR, is it 64-bit or 32-bit?
Definition: pcie_device_query_interface.h:75
int offset
BAR offset in Configuration Space Header.
Definition: pcie_device_query_interface.h:73