Go to the documentation of this file.
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"
86 class internalPEQTypes{
140 bool added_mm=!trans.has_mm();
151 if (trans.get_ref_count())
164 btag->event.notify();
171 unsigned int tgtSocketNumber){
184 ConnectionInfo* connInfo;
187 connInfo->alreadyComplete=
true;
202 ConnectionInfo* connInfo;
209 connInfo->fwID=
decode(trans.get_address());
210 connInfo->bwID=initiator_id;
211 connInfo->clearReq=
true;
212 connInfo->alreadyComplete=
false;
230 std::cout <<
"ERROR: '" <<
name()
231 <<
"': Illegal phase received from target." << std::endl;
248 bool doCall=btag==NULL;
291 ConnectionInfo* connInfo;
297 trans.set_address(trans.get_address()&
m_masks[connInfo->fwID]);
309 if (!connInfo->alreadyComplete) {
320 if (btag) btag->event.notify(
t);
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;
void register_nb_transport_bw(MODULE *mod, sync_enum_type(MODULE::*cb)(int, transaction_type &, phase_type &, sc_core::sc_time &))
std::vector< sc_dt::uint64 > m_masks
void start_of_simulation()
void register_b_transport(MODULE *mod, b_cb cb)
tlm_utils::multi_passthrough_target_socket< MultiSocketSimpleSwitchAT > target_socket_type
tlm_utils::peq_with_cb_and_phase< MultiSocketSimpleSwitchAT > m_bwPEQ
const sc_time SC_ZERO_TIME
tlm::tlm_sync_enum sync_enum_type
SC_HAS_PROCESS(MultiSocketSimpleSwitchAT)
sync_enum_type targetNBTransport(int portId, transaction_type &trans, phase_type &phase, sc_core::sc_time &t)
unsigned int m_target_count
void bwPEQcb(transaction_type &trans, const phase_type &phase)
void bindTargetSocket(initiator_socket_type::base_target_socket_type &target, sc_dt::uint64 low, sc_dt::uint64 high, sc_dt::uint64 mask=0xffffffffffffffffULL)
MultiSocketSimpleSwitchAT(sc_core::sc_module_name name)
tlm::tlm_phase phase_type
SimpleAddressMap m_addrMap
void initiatorNBTransport_core(transaction_type &trans, phase_type &phase, sc_core::sc_time &t, unsigned int tgtSocketNumber)
initiator_socket_type initiator_socket
void b_transport(int initiator_id, transaction_type &trans, sc_core::sc_time &t)
tlm_utils::peq_with_cb_and_phase< MultiSocketSimpleSwitchAT > m_fwPEQ
sync_enum_type initiatorNBTransport(int initiator_id, transaction_type &trans, phase_type &phase, sc_core::sc_time &t)
target_socket_type target_socket
tlm_utils::multi_passthrough_initiator_socket< MultiSocketSimpleSwitchAT > initiator_socket_type
tlm_utils::instance_specific_extension_accessor accessMySpecificExtensions
Simple address map implementation for the generic protocol.
unsigned int decode(const sc_dt::uint64 &address)
base_type::base_target_socket_type base_target_socket_type
void free(transaction_type *txn)
tlm::tlm_phase tlm_phase_type
ConnectionInfo tlm_payload_type
void register_nb_transport_fw(MODULE *mod, nb_cb cb)
const char * name() const
std::vector< std::deque< transaction_type * > > m_pendingReqs
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.
std::vector< std::deque< transaction_type * > > m_pendingResps
tlm::tlm_generic_payload transaction_type
ExtensionPool< ConnectionInfo > m_connInfoPool
void notify(tlm_payload_type &t, const tlm_phase_type &p, const sc_core::sc_time &when)
void fwPEQcb(transaction_type &trans, const phase_type &phase)
const sc_time & sc_time_stamp()
Generated on Wed Sep 30 2020 14:02:18 for gem5 by doxygen 1.8.17