14#ifndef SIMICS_SYSTEMC_SIMICS2TLM_NULL_GASKET_H
15#define SIMICS_SYSTEMC_SIMICS2TLM_NULL_GASKET_H
20#if defined(__GNUC__) && !defined(_MSC_VER)
43 tracked_instances().insert(
this);
46 tracked_instances().erase(
this);
56 return &dmi_data_table_;
74 return "unknown simics2tlm gasket";
76 return demangle(
typeid(*type_).name());
80 std::set<std::string> unique_names;
81 for (
const auto *gasket : tracked_instances()) {
82 unique_names.insert(gasket->gasket_name());
85 return std::vector<std::string>(unique_names.begin(),
90 tlm::tlm_generic_payload &
payload()
override {
101 static std::string demangle(
const char *name) {
102#if defined(__GNUC__) && !defined(_MSC_VER)
104 char *demangled = abi::__cxa_demangle(name,
nullptr,
nullptr,
106 std::string result = (status == 0 && demangled) ? demangled : name;
107 std::free(demangled);
114 typedef std::set<const NullGasket *> TrackedInstances;
115 static TrackedInstances &tracked_instances() {
120 ClassType *type_ {
nullptr};
121 simics::ConfObjectRef obj_;
122 tlm::tlm_generic_payload transaction_;
123 DmiDataTable dmi_data_table_;
Definition: class_type.h:23
Keeps track of (counts) the number of instances for this type of class.
Definition: instance_counter.h:30
static int instances()
Definition: instance_counter.h:40
Class that encapsulates a generic_payload and returns it to the TransactionPool when the Transaction ...
Definition: transaction.h:29
Definition: dmi_data_table.h:27
Interface used by simics2tlm gaskets, implemented by Gasket base class.
Definition: gasket_interface.h:33
Definition: null_gasket.h:40
bool is_dmi_enabled() override
Definition: null_gasket.h:69
sc_core::sc_object * get_target_socket() override
Definition: null_gasket.h:64
std::string gasket_name() const override
Definition: null_gasket.h:72
NullGasket()
Definition: null_gasket.h:42
void set_type(ClassType *type) override
Definition: null_gasket.h:58
bool trigger_transaction() override
Deprecated, use the trigger(iface::Transaction *transaction) instead.
Definition: null_gasket.h:93
DmiDataTable * get_dmi_data_table() override
Definition: null_gasket.h:55
bool trigger(iface::Transaction *transaction) override
Definition: null_gasket.h:49
ClassType * type() override
Definition: null_gasket.h:61
simics::ConfObjectRef & simics_obj() override
Definition: null_gasket.h:52
tlm::tlm_generic_payload & payload() override
Deprecated, use the TransactionPool::acquire() instead.
Definition: null_gasket.h:90
void set_dmi(bool enable) override
Definition: null_gasket.h:67
void set_inquiry(bool inquiry) override
Deprecated, use the TransactionExtension::set_transport_debug(bool) instead.
Definition: null_gasket.h:96
static std::vector< std::string > missing_gasket_names()
Definition: null_gasket.h:79
~NullGasket() override
Definition: null_gasket.h:45