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, o) {
47 SIM_set_object_configured(obj());
50 simulation_ref_.require();
59 sc_core::sc_object *obj = sc_core::sc_find_object(
60 sc_pcie_device_name_.c_str());
63 "Invalid SystemC object name for "
64 "PcieDeviceQueryInterface and "
65 "PcieBaseAddressRegisterQueryInterface implementor");
73 if (SIM_clear_exception() == SimExc_No_Exception) {
77 auto new_cls = make_class<PcieGasketClass>(
79 "model of SystemC compsite pcie gasket class",
80 "Class for binding Simics interface to SystemC Pcie Gasket.",
81 Sim_Class_Kind_Pseudo);
83 new_cls->add(Attribute(
"device",
"s",
84 "Name of the SystemC object that implements the"
85 " PcieDeviceQueryInterface and"
86 " PcieBaseAddressRegisterQueryInterface."
87 "All TLM2 sockets returned by the object must"
88 " have BUSWIDTH = 32 and TYPES ="
89 " tlm::tlm_base_protocol_types",
91 sc_pcie_device_name_),
93 new_cls->add(Attribute(
"simulation",
"o",
94 "Simics object implementing the SystemC"
95 " Simulation interface.",
98 PcieGasketBase::initClassInternal<PcieGasketClass>(new_cls.get());
100 return *new_cls.get();
104 std::string sc_pcie_device_name_;
105 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 finalize()
Definition: pcie_gasket_class.h:45
static conf_class_t * registerGasketClass(const char *class_name)
Definition: pcie_gasket_class.h:71
PcieGasketClass(ConfObjectRef o)
Definition: pcie_gasket_class.h:42
void createGasket(iface::SimulationInterface *simulation) override
Definition: pcie_gasket_class.h:57
iface::ScVersionInterface * version() override
Definition: pcie_gasket_class.h:54
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:209
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