scc  2022.4.0
SystemC components library
axi::pe::rate_limiting_buffer Class Reference
Inheritance diagram for axi::pe::rate_limiting_buffer:
Collaboration diagram for axi::pe::rate_limiting_buffer:

Public Member Functions

 rate_limiting_buffer (const sc_core::sc_module_name &nm, scc::sc_attribute_randomized< int > &rd_resp_delay, scc::sc_attribute_randomized< int > &wr_resp_delay)
 
void transport (tlm::tlm_generic_payload &payload, bool lt_transport=false) override
 
void snoop_resp (tlm::tlm_generic_payload &payload, bool sync=false) override
 

Public Attributes

sc_core::sc_in< bool > clk_i {"clk_i"}
 
sc_core::sc_export< tlm::scc::pe::intor_fw_nbfw_i {"fw_i"}
 
sc_core::sc_port< tlm::scc::pe::intor_bw_nb, 1, sc_core::SC_ZERO_OR_MORE_BOUND > bw_o {"bw_o"}
 
scc::sc_attribute_randomized< int > & rd_resp_delay
 the latency between request and response phase. Will be overwritten by the return of the callback function (if registered) -> RIV
 
scc::sc_attribute_randomized< int > & wr_resp_delay
 the latency between request and response phase. Will be overwritten by the return of the callback function (if registered) -> BV
 
cci::cci_param< double > rd_bw_limit_byte_per_sec {"rd_bw_limit_byte_per_sec", -1.0}
 the bandwidth limit for read accesses
 
cci::cci_param< double > wr_bw_limit_byte_per_sec {"wr_bw_limit_byte_per_sec", -1.0}
 the bandwidth limit for write accesses
 
cci::cci_param< double > total_bw_limit_byte_per_sec {"total_bw_limit_byte_per_sec", -1.0}
 the bandwidth limit for read accesses
 

Protected Member Functions

void end_of_elaboration () override
 
void start_of_simulation () override
 
void process_req2resp_fifos ()
 
void start_rd_resp_thread ()
 
void start_wr_resp_thread ()
 

Protected Attributes

sc_core::sc_clock * clk_if {nullptr}
 
sc_core::sc_time time_per_byte_rd
 
sc_core::sc_time time_per_byte_wr
 
sc_core::sc_time time_per_byte_total
 
scc::fifo_w_cb< std::tuple< tlm::tlm_generic_payload *, unsigned > > rd_req2resp_fifo {"rd_req2resp_fifo"}
 queues realizing the min latency
 
scc::fifo_w_cb< std::tuple< tlm::tlm_generic_payload *, unsigned > > wr_req2resp_fifo {"wr_req2resp_fifo"}
 
scc::fifo_w_cb< tlm::tlm_generic_payload * > rd_resp_fifo {"rd_resp_fifo"}
 queues to handle bandwidth limit
 
scc::fifo_w_cb< tlm::tlm_generic_payload * > wr_resp_fifo {"wr_resp_fifo"}
 
scc::ordered_semaphore total_arb {1}
 
double total_residual_clocks {0.0}
 

Detailed Description

Definition at line 27 of file ordered_target.h.

Member Function Documentation

◆ snoop_resp()

void axi::pe::rate_limiting_buffer::snoop_resp ( tlm::tlm_generic_payload &  payload,
bool  sync = false 
)
inlineoverridevirtual

send a response to a backward transaction if not immediately answered

Parameters
payloadobject with (optional) extensions
syncif true send with next rising clock edge of the pe otherwise send it immediately

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

Definition at line 72 of file ordered_target.h.

◆ transport()

void axi::pe::rate_limiting_buffer::transport ( tlm::tlm_generic_payload &  payload,
bool  lt_transport = false 
)
overridevirtual

execute the transport of the payload. Independent of the underlying layer this function is blocking

Parameters
payloadobject with (optional) extensions
lt_transportuse b_transport instead of nb_transport*

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

Definition at line 41 of file ordered_target.cpp.


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