scc 2026.07
SystemC components library
chi::pe::chi_rn_initiator_b Class Reference
Inheritance diagram for chi::pe::chi_rn_initiator_b:
Collaboration diagram for chi::pe::chi_rn_initiator_b:

Classes

struct  tx_state

Public Types

using payload_type = chi::chi_protocol_types::tlm_payload_type
using phase_type = chi::chi_protocol_types::tlm_phase_type
using cb_function_t = std::function<void(chi::pe::channel_e, payload_type&)>

Public Member Functions

void b_snoop (payload_type &trans, sc_core::sc_time &t) override
 snoop access to a snooped master
tlm::tlm_sync_enum nb_transport_bw (payload_type &trans, phase_type &phase, sc_core::sc_time &t) override
void invalidate_direct_mem_ptr (sc_dt::uint64 start_range, sc_dt::uint64 end_range) override
size_t get_transferwith_in_bytes () const
void transport (payload_type &trans, bool blocking) override
 The forward transport function. It behaves blocking and is re-entrant.
void snoop_resp (payload_type &trans, bool sync=false) override
 triggers a non-blocking snoop response if the snoop callback does not do so.
 chi_rn_initiator_b (sc_core::sc_module_name nm, sc_core::sc_port_b< chi::chi_fw_transport_if< chi_protocol_types > > &port, size_t transfer_width)
 chi_rn_initiator_b (chi_rn_initiator_b const &)=delete
 chi_rn_initiator_b (chi_rn_initiator_b &&)=delete
chi_rn_initiator_b & operator= (chi_rn_initiator_b const &)=delete
chi_rn_initiator_b & operator= (chi_rn_initiator_b &&)=delete
void add_protocol_cb (channel_e e, cb_function_t cb)
unsigned get_credit_count (channel_e e)

Public Attributes

sc_core::sc_in< bool > clk_i {"clk_i"}
sc_core::sc_export< tlm::scc::pe::intor_fw_bfw_i {"fw_i"}
sc_core::sc_port< tlm::scc::pe::intor_bw_b, 1, sc_core::SC_ZERO_OR_MORE_BOUND > bw_o {"bw_o"}
cci::cci_param< unsigned > src_id {"src_id", 1}
cci::cci_param< unsigned > tgt_id {"tgt_id", 0}
cci::cci_param< bool > data_interleaving {"data_interleaving", true}
cci::cci_param< bool > strict_income_order {"strict_income_order", false}
cci::cci_param< bool > use_legacy_mapping {"use_legacy_mapping", false}
cci::cci_param< unsigned > snp_req_limit {"snp_req_limit", std::numeric_limits<unsigned>::max()}
cci::cci_param< unsigned > snp_req_credit_limit {"snp_req_credit_limit", std::numeric_limits<unsigned>::max()}
cci::cci_param< unsigned > cresp_req_credit_limit {"cresp_credit_limit", std::numeric_limits<unsigned>::max()}
cci::cci_param< unsigned > rdat_req_credit_limit {"rdat_credit_limit", std::numeric_limits<unsigned>::max()}

Protected Member Functions

void end_of_elaboration () override
unsigned calculate_beats (payload_type &p)
void snoop_dispatch ()
void snoop_handler (payload_type *trans)
void grant_credit (credit_type_e type, unsigned amount=1)

Protected Attributes

const size_t transfer_width_in_bytes
std::string instance_name
scc::ordered_semaphore ReceivedReqCreditCounter {"ReceivedReqCreditCounter", 0U, true}
scc::ordered_semaphore ReceivedWdatCreditCounter {"ReceivedWdatCreditCounter", 0U, true}
scc::ordered_semaphore ReceivedSrespCreditCounter {"ReceivedSrespCreditCounter", 0U, true}
scc::sc_variable< unsigned > snp_counter {"SnpInFlight", 0}
scc::sc_variable< unsigned > ProvidedSnpCreditCounter {"ProvidedSnpCreditCounter", 0}
scc::sc_variable< unsigned > ProvidedCrespCreditCounter {"ProvidedCrespCreditCounter", 0}
scc::sc_variable< unsigned > ProvidedRdatCreditCounter {"ProvidedRdatCreditCounter", 0}
sc_core::sc_port_b< chi::chi_fw_transport_if< chi_protocol_types > > & socket_fw
std::unordered_map< uintptr_t, tx_state * > tx_state_by_trans
std::vector< tx_state * > tx_state_pool
std::unordered_map< unsigned, scc::ordered_semaphoreactive_tx_by_id
scc::ordered_semaphore strict_order_sem {1}
tlm_utils::peq_with_get< payload_type > snp_peq {"snp_peq"}
tlm_utils::peq_with_get< payload_type > snp_dispatch_que {"snp_dispatch_que"}
unsigned thread_avail {0}
unsigned thread_active {0}
scc::ordered_semaphore req_order {1}
scc::ordered_semaphore req_chnl {1}
scc::ordered_semaphore wdat_chnl {1}
scc::ordered_semaphore prio_wdat_chnl {1}
scc::ordered_semaphore sresp_chnl {1}
scc::ordered_semaphore prio_sresp_chnl {1}
sc_core::sc_event any_tx_finished
sc_core::sc_time clk_period {10, sc_core::SC_NS}

Detailed Description

Definition at line 35 of file chi_rn_initiator.h.

Member Typedef Documentation

◆ cb_function_t

using chi::pe::chi_rn_initiator_b::cb_function_t = std::function<void(chi::pe::channel_e, payload_type&)>

Definition at line 41 of file chi_rn_initiator.h.

◆ payload_type

using chi::pe::chi_rn_initiator_b::payload_type = chi::chi_protocol_types::tlm_payload_type

Definition at line 39 of file chi_rn_initiator.h.

◆ phase_type

using chi::pe::chi_rn_initiator_b::phase_type = chi::chi_protocol_types::tlm_phase_type

Definition at line 40 of file chi_rn_initiator.h.

Constructor & Destructor Documentation

◆ chi_rn_initiator_b()

chi::pe::chi_rn_initiator_b::chi_rn_initiator_b ( sc_core::sc_module_name nm,
sc_core::sc_port_b< chi::chi_fw_transport_if< chi_protocol_types > > & port,
size_t transfer_width )

Definition at line 508 of file chi_rn_initiator.cpp.

◆ ~chi_rn_initiator_b()

chi::pe::chi_rn_initiator_b::~chi_rn_initiator_b ( )
virtual

Definition at line 521 of file chi_rn_initiator.cpp.

Member Function Documentation

◆ add_protocol_cb()

void chi::pe::chi_rn_initiator_b::add_protocol_cb ( channel_e e,
cb_function_t cb )
inline

Definition at line 107 of file chi_rn_initiator.h.

◆ b_snoop()

void chi::pe::chi_rn_initiator_b::b_snoop ( payload_type & trans,
sc_core::sc_time & t )
overridevirtual

snoop access to a snooped master

Parameters
transthe payload
tannotated delay

Implements chi::bw_blocking_transport_if< chi::chi_protocol_types::tlm_payload_type >.

Definition at line 565 of file chi_rn_initiator.cpp.

◆ calculate_beats()

unsigned chi::pe::chi_rn_initiator_b::calculate_beats ( payload_type & p)
inlineprotected

Definition at line 117 of file chi_rn_initiator.h.

◆ end_of_elaboration()

void chi::pe::chi_rn_initiator_b::end_of_elaboration ( )
inlineoverrideprotected

Definition at line 115 of file chi_rn_initiator.h.

◆ get_credit_count()

unsigned chi::pe::chi_rn_initiator_b::get_credit_count ( channel_e e)

Definition at line 1420 of file chi_rn_initiator.cpp.

◆ get_transferwith_in_bytes()

size_t chi::pe::chi_rn_initiator_b::get_transferwith_in_bytes ( ) const
inline

Definition at line 55 of file chi_rn_initiator.h.

◆ grant_credit()

void chi::pe::chi_rn_initiator_b::grant_credit ( credit_type_e type,
unsigned amount = 1 )
protected

Definition at line 1389 of file chi_rn_initiator.cpp.

◆ invalidate_direct_mem_ptr()

void chi::pe::chi_rn_initiator_b::invalidate_direct_mem_ptr ( sc_dt::uint64 start_range,
sc_dt::uint64 end_range )
override

Definition at line 641 of file chi_rn_initiator.cpp.

◆ nb_transport_bw()

tlm::tlm_sync_enum chi::pe::chi_rn_initiator_b::nb_transport_bw ( payload_type & trans,
phase_type & phase,
sc_core::sc_time & t )
override

Definition at line 587 of file chi_rn_initiator.cpp.

◆ snoop_dispatch()

void chi::pe::chi_rn_initiator_b::snoop_dispatch ( )
protected

Definition at line 1312 of file chi_rn_initiator.cpp.

◆ snoop_handler()

void chi::pe::chi_rn_initiator_b::snoop_handler ( payload_type * trans)
protected

Definition at line 1341 of file chi_rn_initiator.cpp.

◆ snoop_resp()

void chi::pe::chi_rn_initiator_b::snoop_resp ( payload_type & trans,
bool sync = false )
overridevirtual

triggers a non-blocking snoop response if the snoop callback does not do so.

Parameters
trans
syncwhen true send response with next rising clock edge otherwise send immediately

Implements tlm::scc::pe::intor_fw< type::BL >.

Definition at line 573 of file chi_rn_initiator.cpp.

◆ transport()

void chi::pe::chi_rn_initiator_b::transport ( payload_type & trans,
bool blocking )
overridevirtual

The forward transport function. It behaves blocking and is re-entrant.

This function initiates the forward transport either using b_transport() if blocking=true or the nb_transport_* interface.

Parameters
transthe transaction to send
blockingexecute in using the blocking interface

Timing

Implements tlm::scc::pe::intor_fw< type::BL >.

Definition at line 1092 of file chi_rn_initiator.cpp.

Member Data Documentation

◆ active_tx_by_id

std::unordered_map<unsigned, scc::ordered_semaphore> chi::pe::chi_rn_initiator_b::active_tx_by_id
protected

Definition at line 153 of file chi_rn_initiator.h.

◆ any_tx_finished

sc_core::sc_event chi::pe::chi_rn_initiator_b::any_tx_finished
protected

Definition at line 173 of file chi_rn_initiator.h.

◆ bw_o

sc_core::sc_port<tlm::scc::pe::intor_bw_b, 1, sc_core::SC_ZERO_OR_MORE_BOUND> chi::pe::chi_rn_initiator_b::bw_o {"bw_o"}

Definition at line 47 of file chi_rn_initiator.h.

◆ clk_i

sc_core::sc_in<bool> chi::pe::chi_rn_initiator_b::clk_i {"clk_i"}

Definition at line 43 of file chi_rn_initiator.h.

◆ clk_period

sc_core::sc_time chi::pe::chi_rn_initiator_b::clk_period {10, sc_core::SC_NS}
protected

Definition at line 175 of file chi_rn_initiator.h.

◆ cresp_req_credit_limit

cci::cci_param<unsigned> chi::pe::chi_rn_initiator_b::cresp_req_credit_limit {"cresp_credit_limit", std::numeric_limits<unsigned>::max()}

Definition at line 103 of file chi_rn_initiator.h.

◆ data_interleaving

cci::cci_param<bool> chi::pe::chi_rn_initiator_b::data_interleaving {"data_interleaving", true}

Definition at line 93 of file chi_rn_initiator.h.

◆ fw_i

sc_core::sc_export<tlm::scc::pe::intor_fw_b> chi::pe::chi_rn_initiator_b::fw_i {"fw_i"}

Definition at line 45 of file chi_rn_initiator.h.

◆ instance_name

std::string chi::pe::chi_rn_initiator_b::instance_name
protected

Definition at line 128 of file chi_rn_initiator.h.

◆ prio_sresp_chnl

scc::ordered_semaphore chi::pe::chi_rn_initiator_b::prio_sresp_chnl {1}
protected

Definition at line 171 of file chi_rn_initiator.h.

◆ prio_wdat_chnl

scc::ordered_semaphore chi::pe::chi_rn_initiator_b::prio_wdat_chnl {1}
protected

Definition at line 167 of file chi_rn_initiator.h.

◆ ProvidedCrespCreditCounter

scc::sc_variable<unsigned> chi::pe::chi_rn_initiator_b::ProvidedCrespCreditCounter {"ProvidedCrespCreditCounter", 0}
protected

Definition at line 137 of file chi_rn_initiator.h.

◆ ProvidedRdatCreditCounter

scc::sc_variable<unsigned> chi::pe::chi_rn_initiator_b::ProvidedRdatCreditCounter {"ProvidedRdatCreditCounter", 0}
protected

Definition at line 138 of file chi_rn_initiator.h.

◆ ProvidedSnpCreditCounter

scc::sc_variable<unsigned> chi::pe::chi_rn_initiator_b::ProvidedSnpCreditCounter {"ProvidedSnpCreditCounter", 0}
protected

Definition at line 136 of file chi_rn_initiator.h.

◆ rdat_req_credit_limit

cci::cci_param<unsigned> chi::pe::chi_rn_initiator_b::rdat_req_credit_limit {"rdat_credit_limit", std::numeric_limits<unsigned>::max()}

Definition at line 105 of file chi_rn_initiator.h.

◆ ReceivedReqCreditCounter

scc::ordered_semaphore chi::pe::chi_rn_initiator_b::ReceivedReqCreditCounter {"ReceivedReqCreditCounter", 0U, true}
protected

Definition at line 130 of file chi_rn_initiator.h.

◆ ReceivedSrespCreditCounter

scc::ordered_semaphore chi::pe::chi_rn_initiator_b::ReceivedSrespCreditCounter {"ReceivedSrespCreditCounter", 0U, true}
protected

Definition at line 132 of file chi_rn_initiator.h.

◆ ReceivedWdatCreditCounter

scc::ordered_semaphore chi::pe::chi_rn_initiator_b::ReceivedWdatCreditCounter {"ReceivedWdatCreditCounter", 0U, true}
protected

Definition at line 131 of file chi_rn_initiator.h.

◆ req_chnl

scc::ordered_semaphore chi::pe::chi_rn_initiator_b::req_chnl {1}
protected

Definition at line 163 of file chi_rn_initiator.h.

◆ req_order

scc::ordered_semaphore chi::pe::chi_rn_initiator_b::req_order {1}
protected

Definition at line 161 of file chi_rn_initiator.h.

◆ snp_counter

scc::sc_variable<unsigned> chi::pe::chi_rn_initiator_b::snp_counter {"SnpInFlight", 0}
protected

Definition at line 134 of file chi_rn_initiator.h.

◆ snp_dispatch_que

tlm_utils::peq_with_get<payload_type> chi::pe::chi_rn_initiator_b::snp_dispatch_que {"snp_dispatch_que"}
protected

Definition at line 157 of file chi_rn_initiator.h.

◆ snp_peq

tlm_utils::peq_with_get<payload_type> chi::pe::chi_rn_initiator_b::snp_peq {"snp_peq"}
protected

Definition at line 157 of file chi_rn_initiator.h.

◆ snp_req_credit_limit

cci::cci_param<unsigned> chi::pe::chi_rn_initiator_b::snp_req_credit_limit {"snp_req_credit_limit", std::numeric_limits<unsigned>::max()}

Definition at line 101 of file chi_rn_initiator.h.

◆ snp_req_limit

cci::cci_param<unsigned> chi::pe::chi_rn_initiator_b::snp_req_limit {"snp_req_limit", std::numeric_limits<unsigned>::max()}

Definition at line 99 of file chi_rn_initiator.h.

◆ socket_fw

sc_core::sc_port_b<chi::chi_fw_transport_if<chi_protocol_types> >& chi::pe::chi_rn_initiator_b::socket_fw
protected

Definition at line 142 of file chi_rn_initiator.h.

◆ src_id

cci::cci_param<unsigned> chi::pe::chi_rn_initiator_b::src_id {"src_id", 1}

Definition at line 89 of file chi_rn_initiator.h.

◆ sresp_chnl

scc::ordered_semaphore chi::pe::chi_rn_initiator_b::sresp_chnl {1}
protected

Definition at line 169 of file chi_rn_initiator.h.

◆ strict_income_order

cci::cci_param<bool> chi::pe::chi_rn_initiator_b::strict_income_order {"strict_income_order", false}

Definition at line 95 of file chi_rn_initiator.h.

◆ strict_order_sem

scc::ordered_semaphore chi::pe::chi_rn_initiator_b::strict_order_sem {1}
protected

Definition at line 155 of file chi_rn_initiator.h.

◆ tgt_id

cci::cci_param<unsigned> chi::pe::chi_rn_initiator_b::tgt_id {"tgt_id", 0}

Definition at line 91 of file chi_rn_initiator.h.

◆ thread_active

unsigned chi::pe::chi_rn_initiator_b::thread_active {0}
protected

Definition at line 159 of file chi_rn_initiator.h.

◆ thread_avail

unsigned chi::pe::chi_rn_initiator_b::thread_avail {0}
protected

Definition at line 159 of file chi_rn_initiator.h.

◆ transfer_width_in_bytes

const size_t chi::pe::chi_rn_initiator_b::transfer_width_in_bytes
protected

Definition at line 126 of file chi_rn_initiator.h.

◆ tx_state_by_trans

std::unordered_map<uintptr_t, tx_state*> chi::pe::chi_rn_initiator_b::tx_state_by_trans
protected

Definition at line 149 of file chi_rn_initiator.h.

◆ tx_state_pool

std::vector<tx_state*> chi::pe::chi_rn_initiator_b::tx_state_pool
protected

Definition at line 151 of file chi_rn_initiator.h.

◆ use_legacy_mapping

cci::cci_param<bool> chi::pe::chi_rn_initiator_b::use_legacy_mapping {"use_legacy_mapping", false}

Definition at line 97 of file chi_rn_initiator.h.

◆ wdat_chnl

scc::ordered_semaphore chi::pe::chi_rn_initiator_b::wdat_chnl {1}
protected

Definition at line 165 of file chi_rn_initiator.h.


The documentation for this class was generated from the following files: