20#ifndef __SIMPLESWITCHAT_H__
21#define __SIMPLESWITCHAT_H__
25#include "tlm_utils/multi_passthrough_initiator_socket.h"
26#include "tlm_utils/multi_passthrough_target_socket.h"
29#include "tlm_utils/instance_specific_extensions.h"
30#include "tlm_utils/peq_with_cb_and_phase.h"
140 bool added_mm=!trans.
has_mm();
171 unsigned int tgtSocketNumber){
172 switch (
initiator_socket[tgtSocketNumber]->nb_transport_fw(trans, phase, t)) {
210 connInfo->
bwID=initiator_id;
230 std::cout <<
"ERROR: '" <<
name()
231 <<
"': Illegal phase received from target." << std::endl;
248 bool doCall=btag==NULL;
328 <<
" Pending requests:"<<std::endl;
330 std::cout<<
" "<<
m_pendingReqs[i].size()<<
" pending requests for target number "<<i<<std::endl;
331 std::cout<<
" Pending responses:"<<std::endl;
333 std::cout<<
" "<<
m_pendingResps[i].size()<<
" pending responses for initiator number "<<i<<std::endl;
334 std::cout<<
" The address map is:"<<std::endl;
ConnectionInfo tlm_payload_type
tlm::tlm_phase tlm_phase_type
initiator_socket_type initiator_socket
MultiSocketSimpleSwitchAT(sc_core::sc_module_name name)
tlm_utils::multi_passthrough_target_socket< MultiSocketSimpleSwitchAT > target_socket_type
tlm::tlm_sync_enum sync_enum_type
sync_enum_type targetNBTransport(int portId, transaction_type &trans, phase_type &phase, sc_core::sc_time &t)
tlm_utils::multi_passthrough_initiator_socket< MultiSocketSimpleSwitchAT > initiator_socket_type
std::vector< std::deque< transaction_type * > > m_pendingReqs
void start_of_simulation()
tlm_utils::peq_with_cb_and_phase< MultiSocketSimpleSwitchAT > m_fwPEQ
tlm::tlm_phase phase_type
void initiatorNBTransport_core(transaction_type &trans, phase_type &phase, sc_core::sc_time &t, unsigned int tgtSocketNumber)
tlm::tlm_generic_payload transaction_type
void free(transaction_type *txn)
void bwPEQcb(transaction_type &trans, const phase_type &phase)
unsigned int decode(const sc_dt::uint64 &address)
sync_enum_type initiatorNBTransport(int initiator_id, transaction_type &trans, phase_type &phase, sc_core::sc_time &t)
ExtensionPool< ConnectionInfo > m_connInfoPool
void bindTargetSocket(initiator_socket_type::base_target_socket_type &target, sc_dt::uint64 low, sc_dt::uint64 high, sc_dt::uint64 mask=0xffffffffffffffffULL)
SC_HAS_PROCESS(MultiSocketSimpleSwitchAT)
std::vector< std::deque< transaction_type * > > m_pendingResps
target_socket_type target_socket
SimpleAddressMap m_addrMap
void fwPEQcb(transaction_type &trans, const phase_type &phase)
tlm_utils::instance_specific_extension_accessor accessMySpecificExtensions
tlm_utils::peq_with_cb_and_phase< MultiSocketSimpleSwitchAT > m_bwPEQ
unsigned int m_target_count
void b_transport(int initiator_id, transaction_type &trans, sc_core::sc_time &t)
std::vector< sc_dt::uint64 > m_masks
Simple address map implementation for the generic protocol.
unsigned int decode(sc_dt::uint64 address_)
Decode slave address.
void insert(sc_dt::uint64 baseAddress_, sc_dt::uint64 highAddress_, unsigned int portNumber_)
Insert a slave into the address map.
const char * name() const
void set_address(const sc_dt::uint64 address)
sc_dt::uint64 get_address() const
int get_ref_count() const
void set_mm(tlm_mm_interface *mm)
void register_nb_transport_bw(MODULE *mod, sync_enum_type(MODULE::*cb)(int, transaction_type &, phase_type &, sc_core::sc_time &))
void register_b_transport(MODULE *mod, b_cb cb)
void register_nb_transport_fw(MODULE *mod, nb_cb cb)
An event queue that can contain any number of pending notifications.
void notify(tlm_payload_type &t, const tlm_phase_type &p, const sc_core::sc_time &when)
const sc_time SC_ZERO_TIME
const sc_time & sc_time_stamp()