scc 2025.09
SystemC components library
axi::pe::axi_initiator_b Class Reference
Inheritance diagram for axi::pe::axi_initiator_b:
Collaboration diagram for axi::pe::axi_initiator_b:

Classes

struct  tx_state

Public Types

using payload_type = axi::axi_protocol_types::tlm_payload_type
using phase_type = axi::axi_protocol_types::tlm_phase_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.
 axi_initiator_b (sc_core::sc_module_name nm, sc_core::sc_port_b< axi::axi_fw_transport_if< axi_protocol_types > > &port, size_t transfer_width, flavor_e flavor)
 axi_initiator_b (axi_initiator_b const &)=delete
 axi_initiator_b (axi_initiator_b &&)=delete
axi_initiator_b & operator= (axi_initiator_b const &)=delete
axi_initiator_b & operator= (axi_initiator_b &&)=delete
void add_protocol_cb (axi::fsm::protocol_time_point_e e, std::function< void(payload_type &, bool)> cb)
 register a callback for a certain time point

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< bool > data_interleaving {"data_interleaving", false}
cci::cci_param< unsigned > artv {"artv", 1}
 Read address valid to next read address valid.
cci::cci_param< unsigned > awtv {"awtv", 1}
 Write address valid to next write address valid.
cci::cci_param< unsigned > wbv {"wbv", 1}
 Write data handshake to next beat valid.
cci::cci_param< unsigned > rbr {"rbr", 0}
 Read data valid to same beat ready.
cci::cci_param< unsigned > br {"br", 0}
 Write response valid to ready.
cci::cci_param< unsigned > rla {"rla", 1}
 Read last data handshake to acknowledge.
cci::cci_param< unsigned > ba {"ba", 1}
 Write response handshake to acknowledge.
cci::cci_param< bool > enable_id_serializing {"enable_id_serializing", false}
 Quirks enable.
cci::cci_param< unsigned > outstanding_snoops {"outstanding_snoops", 8}
 number of snoops which can be handled

Protected Member Functions

unsigned calculate_beats (payload_type &p)
void snoop_thread ()

Protected Attributes

const size_t transfer_width_in_bytes
const flavor_e flavor
sc_core::sc_port_b< axi::axi_fw_transport_if< axi_protocol_types > > & socket_fw
std::unordered_map< void *, tx_state * > tx_state_by_tx
std::unordered_map< unsigned, scc::ordered_semaphore * > id_mtx
tlm_utils::peq_with_get< payload_type > snp_peq {"snp_peq"}
std::unordered_map< void *, tx_state * > snp_state_by_id
scc::ordered_semaphore rd_chnl {1}
scc::ordered_semaphore wr_chnl {1}
scc::ordered_semaphore sresp_chnl {1}
sc_core::sc_event any_tx_finished
sc_core::sc_time clk_period {10, sc_core::SC_NS}
scc::sc_variable< unsigned > rd_waiting {"RdWaiting", 0}
scc::sc_variable< unsigned > wr_waiting {"WrWaiting", 0}
scc::sc_variable< unsigned > rd_outstanding {"RdOutstanding", 0}
scc::sc_variable< unsigned > wr_outstanding {"WrOutstanding", 0}

Detailed Description

Definition at line 34 of file axi_initiator.h.

Member Typedef Documentation

◆ payload_type

using axi::pe::axi_initiator_b::payload_type = axi::axi_protocol_types::tlm_payload_type

Definition at line 41 of file axi_initiator.h.

◆ phase_type

using axi::pe::axi_initiator_b::phase_type = axi::axi_protocol_types::tlm_phase_type

Definition at line 42 of file axi_initiator.h.

Constructor & Destructor Documentation

◆ axi_initiator_b()

axi::pe::axi_initiator_b::axi_initiator_b ( sc_core::sc_module_name nm,
sc_core::sc_port_b< axi::axi_fw_transport_if< axi_protocol_types > > & port,
size_t transfer_width,
flavor_e flavor )

Definition at line 39 of file axi_initiator.cpp.

◆ ~axi_initiator_b()

axi::pe::axi_initiator_b::~axi_initiator_b ( )
virtual

Definition at line 54 of file axi_initiator.cpp.

Member Function Documentation

◆ add_protocol_cb()

void axi::pe::axi_initiator_b::add_protocol_cb ( axi::fsm::protocol_time_point_e e,
std::function< void(payload_type &, bool)> cb )
inline

register a callback for a certain time point

This function allows to register a callback for certain time points of a transaction (see axi::fsm::protocol_time_point_e). The callback will be invoked after the FSM-actions are executed.

Parameters
ethe timepoint
cbthe callback taking a reference to the transaction and a bool indicating a snoop if true

Definition at line 122 of file axi_initiator.h.

◆ b_snoop()

void axi::pe::axi_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 axi::bw_blocking_transport_if< axi::axi_protocol_types::tlm_payload_type >.

Definition at line 66 of file axi_initiator.cpp.

◆ calculate_beats()

unsigned axi::pe::axi_initiator_b::calculate_beats ( payload_type & p)
inlineprotected

Definition at line 129 of file axi_initiator.h.

◆ get_transferwith_in_bytes()

size_t axi::pe::axi_initiator_b::get_transferwith_in_bytes ( ) const
inline

Definition at line 56 of file axi_initiator.h.

◆ invalidate_direct_mem_ptr()

void axi::pe::axi_initiator_b::invalidate_direct_mem_ptr ( sc_dt::uint64 start_range,
sc_dt::uint64 end_range )
override

Definition at line 91 of file axi_initiator.cpp.

◆ nb_transport_bw()

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

Definition at line 74 of file axi_initiator.cpp.

◆ snoop_resp()

void axi::pe::axi_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 362 of file axi_initiator.cpp.

◆ snoop_thread()

void axi::pe::axi_initiator_b::snoop_thread ( )
protected

Definition at line 320 of file axi_initiator.cpp.

◆ transport()

void axi::pe::axi_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

Timing

Timing

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

Definition at line 113 of file axi_initiator.cpp.

Member Data Documentation

◆ any_tx_finished

sc_core::sc_event axi::pe::axi_initiator_b::any_tx_finished
protected

Definition at line 159 of file axi_initiator.h.

◆ artv

cci::cci_param<unsigned> axi::pe::axi_initiator_b::artv {"artv", 1}

Read address valid to next read address valid.

Definition at line 95 of file axi_initiator.h.

◆ awtv

cci::cci_param<unsigned> axi::pe::axi_initiator_b::awtv {"awtv", 1}

Write address valid to next write address valid.

Definition at line 97 of file axi_initiator.h.

◆ ba

cci::cci_param<unsigned> axi::pe::axi_initiator_b::ba {"ba", 1}

Write response handshake to acknowledge.

Definition at line 107 of file axi_initiator.h.

◆ br

cci::cci_param<unsigned> axi::pe::axi_initiator_b::br {"br", 0}

Write response valid to ready.

Definition at line 103 of file axi_initiator.h.

◆ bw_o

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

Definition at line 48 of file axi_initiator.h.

◆ clk_i

sc_core::sc_in<bool> axi::pe::axi_initiator_b::clk_i {"clk_i"}

Definition at line 44 of file axi_initiator.h.

◆ clk_period

sc_core::sc_time axi::pe::axi_initiator_b::clk_period {10, sc_core::SC_NS}
protected

Definition at line 161 of file axi_initiator.h.

◆ data_interleaving

cci::cci_param<bool> axi::pe::axi_initiator_b::data_interleaving {"data_interleaving", false}

Definition at line 93 of file axi_initiator.h.

◆ enable_id_serializing

cci::cci_param<bool> axi::pe::axi_initiator_b::enable_id_serializing {"enable_id_serializing", false}

Quirks enable.

Definition at line 109 of file axi_initiator.h.

◆ flavor

const flavor_e axi::pe::axi_initiator_b::flavor
protected

Definition at line 138 of file axi_initiator.h.

◆ fw_i

sc_core::sc_export<tlm::scc::pe::intor_fw_b> axi::pe::axi_initiator_b::fw_i {"fw_i"}

Definition at line 46 of file axi_initiator.h.

◆ id_mtx

std::unordered_map<unsigned, scc::ordered_semaphore*> axi::pe::axi_initiator_b::id_mtx
protected

Definition at line 147 of file axi_initiator.h.

◆ outstanding_snoops

cci::cci_param<unsigned> axi::pe::axi_initiator_b::outstanding_snoops {"outstanding_snoops", 8}

number of snoops which can be handled

Definition at line 111 of file axi_initiator.h.

◆ rbr

cci::cci_param<unsigned> axi::pe::axi_initiator_b::rbr {"rbr", 0}

Read data valid to same beat ready.

Definition at line 101 of file axi_initiator.h.

◆ rd_chnl

scc::ordered_semaphore axi::pe::axi_initiator_b::rd_chnl {1}
protected

Definition at line 153 of file axi_initiator.h.

◆ rd_outstanding

scc::sc_variable<unsigned> axi::pe::axi_initiator_b::rd_outstanding {"RdOutstanding", 0}
protected

Definition at line 165 of file axi_initiator.h.

◆ rd_waiting

scc::sc_variable<unsigned> axi::pe::axi_initiator_b::rd_waiting {"RdWaiting", 0}
protected

Definition at line 163 of file axi_initiator.h.

◆ rla

cci::cci_param<unsigned> axi::pe::axi_initiator_b::rla {"rla", 1}

Read last data handshake to acknowledge.

Definition at line 105 of file axi_initiator.h.

◆ snp_peq

tlm_utils::peq_with_get<payload_type> axi::pe::axi_initiator_b::snp_peq {"snp_peq"}
protected

Definition at line 149 of file axi_initiator.h.

◆ snp_state_by_id

std::unordered_map<void*, tx_state*> axi::pe::axi_initiator_b::snp_state_by_id
protected

Definition at line 151 of file axi_initiator.h.

◆ socket_fw

sc_core::sc_port_b<axi::axi_fw_transport_if<axi_protocol_types> >& axi::pe::axi_initiator_b::socket_fw
protected

Definition at line 140 of file axi_initiator.h.

◆ sresp_chnl

scc::ordered_semaphore axi::pe::axi_initiator_b::sresp_chnl {1}
protected

Definition at line 157 of file axi_initiator.h.

◆ transfer_width_in_bytes

const size_t axi::pe::axi_initiator_b::transfer_width_in_bytes
protected

Definition at line 136 of file axi_initiator.h.

◆ tx_state_by_tx

std::unordered_map<void*, tx_state*> axi::pe::axi_initiator_b::tx_state_by_tx
protected

Definition at line 146 of file axi_initiator.h.

◆ wbv

cci::cci_param<unsigned> axi::pe::axi_initiator_b::wbv {"wbv", 1}

Write data handshake to next beat valid.

Definition at line 99 of file axi_initiator.h.

◆ wr_chnl

scc::ordered_semaphore axi::pe::axi_initiator_b::wr_chnl {1}
protected

Definition at line 155 of file axi_initiator.h.

◆ wr_outstanding

scc::sc_variable<unsigned> axi::pe::axi_initiator_b::wr_outstanding {"WrOutstanding", 0}
protected

Definition at line 166 of file axi_initiator.h.

◆ wr_waiting

scc::sc_variable<unsigned> axi::pe::axi_initiator_b::wr_waiting {"WrWaiting", 0}
protected

Definition at line 164 of file axi_initiator.h.


The documentation for this class was generated from the following files:
  • /home/eyck/Projects/MINRES/SystemC-Components/third_party/axi_chi/axi/pe/axi_initiator.h
  • /home/eyck/Projects/MINRES/SystemC-Components/third_party/axi_chi/axi/pe/axi_initiator.cpp