29template class tlm_array<tlm_extension_base *>;
38class tlm_extension_registry
40 typedef unsigned int key_type;
41 typedef std::map<std::type_index, key_type> type_map;
43 static tlm_extension_registry &
54 register_extension(std::type_index type)
56 type_map::const_iterator it =
ids_.find(type);
58 if (it ==
ids_.end()) {
60 type_map::value_type
v(type,
static_cast<key_type
>(
ids_.size()));
70 return (
instance_) ? instance().ids_.size() : 0;
76 tlm_extension_registry() {}
80tlm_extension_registry *tlm_extension_registry::instance_ = NULL;
87 return tlm_extension_registry::max_num_extensions();
93 return tlm_extension_registry::instance().register_extension(type);
103 m_byte_enable_length(0), m_streaming_width(0),
111 m_byte_enable_length(0), m_streaming_width(0),
151 for (
unsigned int i = 0; i < other.
m_extensions.size(); i++) {
200 for (
unsigned int i = 0; i <
m_length; i += 8) {
202 *
reinterpret_cast<u
>(&
m_data[i]) &=
204 *
reinterpret_cast<u
>(&
m_data[i]) |=
205 *
reinterpret_cast<u
>(&other.
m_data[i]) &
210 for (
unsigned int i = 0; i <
m_length; i += 4) {
211 typedef unsigned int *u;
212 *
reinterpret_cast<u
>(&
m_data[i]) &=
214 *
reinterpret_cast<u
>(&
m_data[i]) |=
215 *
reinterpret_cast<u
>(&other.
m_data[i]) &
220 for (
unsigned int i = 0; i <
m_length; i++) {
236 for (
unsigned int i = 0; i <
m_extensions.size(); i++) {
254 for (
unsigned int i = 0; i <
m_extensions.size(); i++) {
264 for (
unsigned int i = 0; i <
m_extensions.size(); i++) {
279 return "TLM_OK_RESPONSE";
281 return "TLM_INCOMPLETE_RESPONSE";
283 return "TLM_GENERIC_ERROR_RESPONSE";
285 return "TLM_ADDRESS_ERROR_RESPONSE";
287 return "TLM_COMMAND_ERROR_RESPONSE";
289 return "TLM_BURST_ERROR_RESPONSE";
291 return "TLM_BYTE_ENABLE_ERROR_RESPONSE";
293 return "TLM_UNKNOWN_RESPONSE";
static unsigned int register_extension(const std::type_info &)
void update_extensions_from(const tlm_generic_payload &other)
T * set_auto_extension(T *ext)
void free_all_extensions()
tlm_array< tlm_extension_base * > m_extensions
tlm_gp_option get_gp_option() const
void deep_copy_from(const tlm_generic_payload &other)
T * get_extension() const
unsigned int m_streaming_width
void update_original_from(const tlm_generic_payload &other, bool use_byte_enable_on_read=true)
tlm_response_status m_response_status
sc_dt::uint64 get_address() const
unsigned int get_byte_enable_length() const
tlm_response_status get_response_status() const
unsigned char * m_byte_enable
bool is_dmi_allowed() const
unsigned int get_streaming_width() const
unsigned int m_byte_enable_length
unsigned int get_data_length() const
tlm_command get_command() const
virtual ~tlm_generic_payload()
tlm_gp_option m_gp_option
T * set_extension(T *ext)
std::string get_response_string() const
static ispex_registry * instance_
@ TLM_ADDRESS_ERROR_RESPONSE
@ TLM_BURST_ERROR_RESPONSE
@ TLM_BYTE_ENABLE_ERROR_RESPONSE
@ TLM_GENERIC_ERROR_RESPONSE
@ TLM_COMMAND_ERROR_RESPONSE
@ TLM_INCOMPLETE_RESPONSE
unsigned int max_num_extensions()