14#ifndef SIMICS_SYSTEMC_COMPOSITE_PCIE_GASKET_CLASS_H
15#define SIMICS_SYSTEMC_COMPOSITE_PCIE_GASKET_CLASS_H
20#include <simics/simulator/sim-get-class.h>
33template<
unsigned int BUSWIDTH = 32,
34 typename TYPES = tlm::tlm_base_protocol_types>
41 : ConfObject(o),
PcieGasket<BUSWIDTH, TYPES>(this, o) {
45 SIM_set_object_configured(obj());
48 simulation_ref_.require();
57 sc_core::sc_object *obj = sc_core::sc_find_object(
58 sc_pcie_device_name_.c_str());
61 "Invalid SystemC object name for "
62 "PcieDeviceQueryInterface and "
63 "PcieBaseAddressRegisterQueryInterface implementor");
71 if (SIM_clear_exception() == SimExc_No_Exception) {
75 auto new_cls = make_class<PcieGasketClass>(
77 "model of SystemC compsite pcie gasket class",
78 "Class for binding Simics interface to SystemC Pcie Gasket.",
79 Sim_Class_Kind_Pseudo);
81 new_cls->add(Attribute(
"device",
"s",
82 "Name of the SystemC object that implements the"
83 " PcieDeviceQueryInterface and"
84 " PcieBaseAddressRegisterQueryInterface."
85 "All TLM2 sockets returned by the object must"
86 " have BUSWIDTH = 32 and TYPES ="
87 " tlm::tlm_base_protocol_types",
89 sc_pcie_device_name_),
91 new_cls->add(Attribute(
"simulation",
"o",
92 "Simics object implementing the SystemC"
93 " Simulation interface.",
96 PcieGasketBase::initClassInternal<PcieGasketClass>(new_cls.get());
98 return *new_cls.get();
102 std::string sc_pcie_device_name_;
103 ConfObjectRef simulation_ref_;
Definition: gasket_class_interface.h:26
Interface to the SystemC simulation.
Definition: simulation_interface_proxy.h:25
void setSimulation(iface::SimulationInterface *simulation)
Definition: simulation_interface_proxy.h:30
Definition: pcie_gasket_class.h:38
void finalize() override
Definition: pcie_gasket_class.h:43
static conf_class_t * registerGasketClass(const char *class_name)
Definition: pcie_gasket_class.h:69
PcieGasketClass(ConfObjectRef o)
Definition: pcie_gasket_class.h:40
void createGasket(iface::SimulationInterface *simulation) override
Definition: pcie_gasket_class.h:55
iface::ScVersionInterface * version() override
Definition: pcie_gasket_class.h:52
Composite Pcie Gasket to help the wrapping of a SystemC PCIe (multifunction) endpoint in Simics.
Definition: pcie_gasket.h:127
void connect(TPcieDevice *device)
Definition: pcie_gasket.h:212
Definition: sc_version_interface.h:25
Interface to the SystemC simulation.
Definition: simulation_interface.h:25
virtual ConfObjectRef simics_object() const =0
conf_class_t * SIM_get_class(const char *NOTNULL name)
@ Log_Configuration
Definition: adapter_log_groups.h:23