16#ifndef SIMICS_SYSTEMC_COMPOSITE_PCIE_GASKET_CLASS_H
17#define SIMICS_SYSTEMC_COMPOSITE_PCIE_GASKET_CLASS_H
22#include <simics/simulator/sim-get-class.h>
35template<
unsigned int BUSWIDTH = 32,
36 typename TYPES = tlm::tlm_base_protocol_types>
43 : ConfObject(o),
PcieGasket<BUSWIDTH, TYPES>(this) {
48 SIM_set_object_configured(obj());
51 simulation_ref_.require();
60 sc_core::sc_object *obj = sc_core::sc_find_object(
61 sc_pcie_device_name_.c_str());
64 "Invalid SystemC object name for "
65 "PcieDeviceQueryInterface and "
66 "PcieBaseAddressRegisterQueryInterface implementor");
74 if (SIM_clear_exception() == SimExc_No_Exception) {
78 auto new_cls = make_class<PcieGasketClass>(
80 "model of SystemC compsite pcie gasket class",
81 "Class for binding Simics interface to SystemC Pcie Gasket.",
82 Sim_Class_Kind_Pseudo);
84 new_cls->add(Attribute(
"device",
"s",
85 "Name of the SystemC object that implements the"
86 " PcieDeviceQueryInterface and"
87 " PcieBaseAddressRegisterQueryInterface."
88 "All TLM2 sockets returned by the object must"
89 " have BUSWIDTH = 32 and TYPES ="
90 " tlm::tlm_base_protocol_types",
92 sc_pcie_device_name_),
94 new_cls->add(Attribute(
"simulation",
"o",
95 "Simics object implementing the SystemC"
96 " Simulation interface.",
99 PcieGasketBase::initClassInternal<PcieGasketClass>(new_cls.get());
101 return *new_cls.get();
105 std::string sc_pcie_device_name_;
106 ConfObjectRef simulation_ref_;
Definition: gasket_class_interface.h:28
Interface to the SystemC simulation.
Definition: simulation_interface_proxy.h:27
void setSimulation(iface::SimulationInterface *simulation)
Definition: simulation_interface_proxy.h:32
Definition: pcie_gasket_class.h:40
virtual void createGasket(iface::SimulationInterface *simulation)
Definition: pcie_gasket_class.h:58
virtual void finalize()
Definition: pcie_gasket_class.h:46
static conf_class_t * registerGasketClass(const char *class_name)
Definition: pcie_gasket_class.h:72
virtual iface::ScVersionInterface * version()
Definition: pcie_gasket_class.h:55
PcieGasketClass(ConfObjectRef o)
Definition: pcie_gasket_class.h:42
Composite Pcie Gasket to help the wrapping of a SystemC PCIe (multifunction) endpoint in Simics.
Definition: pcie_gasket.h:121
void connect(TPcieDevice *device)
Definition: pcie_gasket.h:206
void setPcieTypeAndForwardTarget(ConfObjectRef obj)
Definition: pcie_gasket.h:257
Definition: sc_version_interface.h:27
Interface to the SystemC simulation.
Definition: simulation_interface.h:27
virtual ConfObjectRef simics_object() const =0
conf_class_t * SIM_get_class(const char *NOTNULL name)
@ Log_Configuration
Definition: adapter_log_groups.h:25