19 #ifndef TLM_UTILS_MULTI_PASSTHROUGH_TARGET_SOCKET_H_INCLUDED_ 20 #define TLM_UTILS_MULTI_PASSTHROUGH_TARGET_SOCKET_H_INCLUDED_ 37 template <
typename MODULE,
38 unsigned int BUSWIDTH = 32,
58 typedef unsigned int (MODULE::*
dbg_cb)(int, transaction_type& txn);
124 m_nb_f.set_function(mod, cb);
134 if (
m_b_f.is_valid()){
140 m_b_f.set_function(mod, cb);
199 display_error(
"'get_base_interface() const' not allowed for multi-sockets.");
231 for (
unsigned int i=0; i<binders.size(); i++) {
233 if (multi_binds.find(i)!=multi_binds.end())
238 base_initiator_socket_type* test=
dynamic_cast<base_initiator_socket_type*
>(binders[i]->get_other_side());
248 virtual void bind(base_type& s)
252 display_warning(
"Socket already bound hierarchically. Bind attempt ignored.");
260 s.set_hierarch_bind((base_type*)
this);
297 std::vector<tlm::tlm_bw_transport_if<TYPES>*>
m_sockets;
314 template <
typename MODULE,
315 unsigned int BUSWIDTH = 32,
328 #endif // TLM_UTILS_MULTI_PASSTHROUGH_TARGET_SOCKET_H_INCLUDED_ b_transport_functor< TYPES > b_func_type
callback_binder_fw< TYPES >::dmi_func_type m_dmi_f
nb_transport_functor< TYPES > nb_func_type
tlm::tlm_sync_enum sync_enum_type
void display_warning(const char *msg) const
~multi_passthrough_target_socket()
void register_b_transport(MODULE *mod, b_cb cb)
virtual void bind(base_type &s)
sync_enum_type(MODULE::* nb_cb)(int, transaction_type &, phase_type &, sc_core::sc_time &)
std::map< unsigned int, tlm::tlm_bw_transport_if< TYPES > * > & get_multi_binds()
base_type * m_hierarch_bind
multi_passthrough_target_socket(const char *name=default_name())
get_dmi_ptr_functor< TYPES > dmi_func_type
void operator()(base_type &s)
virtual tlm_fw_transport_if< TYPES > & get_base_interface()
callback_binder_fw< TYPES >::nb_func_type m_nb_f
virtual const tlm::tlm_fw_transport_if< TYPES > & get_base_interface() const
base_type::base_initiator_socket_type base_initiator_socket_type
virtual sc_interface * get_interface()
virtual std::map< unsigned int, tlm::tlm_bw_transport_if< TYPES > * > & get_multi_binds()=0
virtual std::vector< callback_binder_fw< TYPES > *> & get_binders()=0
void end_of_elaboration()
std::vector< callback_binder_fw< TYPES > * > m_binders
virtual BW_IF & get_base_interface()=0
multi_target_base< BUSWIDTH, TYPES, N, POL > base_type
void set_hierarch_bind(base_type *h)
virtual tlm::tlm_fw_transport_if< TYPES > & get_base_interface()
virtual const sc_core::sc_export< tlm::tlm_fw_transport_if< TYPES > > & get_base_export() const
multi_passthrough_target_socket_optional()
std::vector< tlm::tlm_bw_transport_if< TYPES > * > m_sockets
virtual sc_core::sc_export< tlm_fw_transport_if< TYPES > > & get_base_export()
void display_error(const char *msg) const
unsigned int(MODULE::* dbg_cb)(int, transaction_type &txn)
callback_binder_fw< TYPES >::debug_func_type m_dbg_f
std::map< unsigned int, tlm::tlm_bw_transport_if< TYPES > * > m_multi_binds
const char * name() const
virtual multi_target_base * get_hierarch_bind()=0
bool(MODULE::* dmi_cb)(int, transaction_type &txn, tlm::tlm_dmi &dmi)
SC_API const char * sc_gen_unique_name(const char *, bool preserve_first)
void register_get_direct_mem_ptr(MODULE *mod, dmi_cb cb)
TYPES::tlm_payload_type transaction_type
multi_passthrough_target_socket_optional(const char *name)
static const char * default_name()
TYPES::tlm_phase_type phase_type
virtual void bind(base_initiator_socket_type &s)
std::vector< callback_binder_fw< TYPES > *> & get_binders()
void register_nb_transport_fw(MODULE *mod, nb_cb cb)
virtual sc_core::sc_export< tlm::tlm_fw_transport_if< TYPES > > & get_base_export()
void(MODULE::* b_cb)(int, transaction_type &, sc_core::sc_time &)
base_type * get_hierarch_bind()
debug_transport_functor< TYPES > debug_func_type
bool m_export_callback_created
tlm::tlm_fw_transport_if< TYPES > * get_last_binder(tlm::tlm_bw_transport_if< TYPES > *other)
callback_binder_fw< TYPES >::b_func_type m_b_f
void register_transport_dbg(MODULE *mod, dbg_cb cb)
void check_export_binding()
tlm::tlm_bw_transport_if< TYPES > * operator[](int i)