20#ifndef __SYSTEMC_EXT_TLM_CORE_2_GENERIC_PAYLOAD_GP_HH__
21#define __SYSTEMC_EXT_TLM_CORE_2_GENERIC_PAYLOAD_GP_HH__
31class tlm_generic_payload;
52 virtual void free() {
delete this; }
72 const static unsigned int ID;
107#define TLM_BYTE_DISABLED 0x0
108#define TLM_BYTE_ENABLED 0xff
114extern template class tlm_array<tlm_extension_base *>;
133 if (--m_ref_count == 0)
140 bool has_mm()
const {
return m_mm != 0; }
160 bool use_byte_enable_on_read=
true);
167 void free_all_extensions();
201 return m_response_status;
206 m_response_status = response_status;
208 std::string get_response_string()
const;
215 m_streaming_width = streaming_width;
223 m_byte_enable = byte_enable;
228 return m_byte_enable_length;
233 m_byte_enable_length = byte_enable_length;
338 template <
typename T>
342 return static_cast<T *
>(set_extension(T::ID, ext));
351 template <
typename T>
355 return static_cast<T *
>(set_auto_extension(T::ID, ext));
363 template <
typename T>
365 template <
typename T>
369 return static_cast<T*
>(get_extension(T::ID));
378 template <
typename T>
385 template <
typename T>
391 template <
typename T>
394 release_extension<T>();
400 template <
typename T>
403 release_extension(T::ID);
408 void clear_extension(
unsigned int index);
410 void release_extension(
unsigned int index);
418 void resize_extensions();
static unsigned int register_extension(const std::type_info &)
virtual tlm_extension_base * clone() const =0
virtual void copy_from(tlm_extension_base const &)=0
virtual ~tlm_extension_base()
static const unsigned int ID
virtual tlm_extension_base * clone() const =0
virtual void copy_from(tlm_extension_base const &ext)=0
void set_data_ptr(unsigned char *data)
void set_gp_option(const tlm_gp_option gp_opt)
unsigned char * get_data_ptr() const
T * set_auto_extension(T *ext)
void set_dmi_allowed(bool dmi_allowed)
void set_response_status(const tlm_response_status response_status)
void set_byte_enable_length(const unsigned int byte_enable_length)
void set_address(const sc_dt::uint64 address)
tlm_array< tlm_extension_base * > m_extensions
tlm_gp_option get_gp_option() const
unsigned char * get_byte_enable_ptr() const
bool is_response_ok() const
T * get_extension() const
void set_command(const tlm_command command)
void release_extension(T *ext)
unsigned int m_streaming_width
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
void set_data_length(const unsigned int length)
void get_extension(T *&ext) 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_generic_payload(const tlm_generic_payload &x)
tlm_command get_command() const
void set_streaming_width(const unsigned int streaming_width)
int get_ref_count() const
void clear_extension(const T *ext)
tlm_gp_option m_gp_option
T * set_extension(T *ext)
void set_byte_enable_ptr(unsigned char *byte_enable)
void set_mm(tlm_mm_interface *mm)
bool is_response_error() const
virtual void free(tlm_generic_payload *)=0
virtual ~tlm_mm_interface()
@ TLM_FULL_PAYLOAD_ACCEPTED
@ 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()