diff options
Diffstat (limited to 'src/systemc')
6 files changed, 17 insertions, 12 deletions
diff --git a/src/systemc/ext/tlm_core/2/sockets/base_socket_if.hh b/src/systemc/ext/tlm_core/2/sockets/base_socket_if.hh index 29f3397b9..a494b683f 100644 --- a/src/systemc/ext/tlm_core/2/sockets/base_socket_if.hh +++ b/src/systemc/ext/tlm_core/2/sockets/base_socket_if.hh @@ -21,6 +21,7 @@ #define __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_BASE_SOCKET_IF_H__ #include <systemc> +#include <typeindex> namespace tlm { @@ -45,7 +46,7 @@ class tlm_base_socket_if virtual sc_core::sc_export_base &get_export_base() = 0; virtual sc_core::sc_export_base const &get_export_base() const = 0; virtual unsigned int get_bus_width() const = 0; - virtual sc_core::sc_type_index get_protocol_types() const = 0; + virtual std::type_index get_protocol_types() const = 0; virtual tlm_socket_category get_socket_category() const = 0; protected: diff --git a/src/systemc/ext/tlm_core/2/sockets/initiator_socket.hh b/src/systemc/ext/tlm_core/2/sockets/initiator_socket.hh index 91c147bc9..a7c53cc33 100644 --- a/src/systemc/ext/tlm_core/2/sockets/initiator_socket.hh +++ b/src/systemc/ext/tlm_core/2/sockets/initiator_socket.hh @@ -20,6 +20,8 @@ #ifndef __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_INITIATOR_SOCKET_HH__ #define __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_INITIATOR_SOCKET_HH__ +#include <typeindex> + #include "tlm_core/2/interfaces/fw_bw_ifs.hh" #include "tlm_core/2/sockets/base_socket_if.hh" @@ -192,7 +194,7 @@ class tlm_initiator_socket : public tlm_base_initiator_socket< virtual const char *kind() const { return "tlm_initiator_socket"; } - virtual sc_core::sc_type_index + virtual std::type_index get_protocol_types() const { return typeid(TYPES); diff --git a/src/systemc/ext/tlm_core/2/sockets/target_socket.hh b/src/systemc/ext/tlm_core/2/sockets/target_socket.hh index b412a7d5c..4ca31c9b9 100644 --- a/src/systemc/ext/tlm_core/2/sockets/target_socket.hh +++ b/src/systemc/ext/tlm_core/2/sockets/target_socket.hh @@ -20,6 +20,8 @@ #ifndef __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_TARGET_SOCKET_HH__ #define __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_TARGET_SOCKET_HH__ +#include <typeindex> + #include "tlm_core/2/interfaces/fw_bw_ifs.hh" #include "tlm_core/2/sockets/base_socket_if.hh" @@ -211,7 +213,7 @@ class tlm_target_socket : virtual const char* kind() const { return "tlm_target_socket"; } - virtual sc_core::sc_type_index + virtual std::type_index get_protocol_types() const { return typeid(TYPES); diff --git a/src/systemc/tlm_core/2/generic_payload/gp.cc b/src/systemc/tlm_core/2/generic_payload/gp.cc index ff3c92bd9..b42bdb836 100644 --- a/src/systemc/tlm_core/2/generic_payload/gp.cc +++ b/src/systemc/tlm_core/2/generic_payload/gp.cc @@ -21,8 +21,7 @@ #include <map> #include <systemc> #include <tlm> - -using sc_core::sc_type_index; +#include <typeindex> namespace tlm { @@ -39,7 +38,7 @@ namespace class tlm_extension_registry { typedef unsigned int key_type; - typedef std::map<sc_core::sc_type_index, key_type> type_map; + typedef std::map<std::type_index, key_type> type_map; public: static tlm_extension_registry & instance() @@ -52,7 +51,7 @@ class tlm_extension_registry } unsigned int - register_extension(sc_type_index type) + register_extension(std::type_index type) { type_map::const_iterator it = ids_.find(type); diff --git a/src/systemc/tlm_core/2/generic_payload/phase.cc b/src/systemc/tlm_core/2/generic_payload/phase.cc index 2c8b1e1a0..a3fb93749 100644 --- a/src/systemc/tlm_core/2/generic_payload/phase.cc +++ b/src/systemc/tlm_core/2/generic_payload/phase.cc @@ -21,9 +21,9 @@ #include <map> #include <systemc> #include <tlm> +#include <typeindex> using sc_core::sc_string_view; -using sc_core::sc_type_index; namespace tlm { @@ -43,7 +43,7 @@ struct tlm_phase_registry } unsigned int - register_phase(sc_type_index type, sc_string_view name) + register_phase(std::type_index type, sc_string_view name) { type_map::const_iterator it = ids_.find(type); @@ -77,7 +77,7 @@ struct tlm_phase_registry } private: - typedef std::map<sc_type_index, key_type> type_map; + typedef std::map<std::type_index, key_type> type_map; typedef std::vector<std::string> name_table; type_map ids_; diff --git a/src/systemc/tlm_utils/instance_specific_extensions.cc b/src/systemc/tlm_utils/instance_specific_extensions.cc index c0836cd67..91610dd02 100644 --- a/src/systemc/tlm_utils/instance_specific_extensions.cc +++ b/src/systemc/tlm_utils/instance_specific_extensions.cc @@ -23,6 +23,7 @@ #include <map> #include <systemc> #include <tlm> +#include <typeindex> namespace tlm { @@ -40,7 +41,7 @@ namespace class ispex_registry // Copied from tlm_gp.cpp. { typedef unsigned int key_type; - typedef std::map<sc_core::sc_type_index, key_type> type_map; + typedef std::map<std::type_index, key_type> type_map; public: static ispex_registry & @@ -54,7 +55,7 @@ class ispex_registry // Copied from tlm_gp.cpp. } unsigned int - register_extension(sc_core::sc_type_index type) + register_extension(std::type_index type) { type_map::const_iterator it = ids_.find(type); |