scc 2025.09
SystemC components library
apb::pe::apb_target_b Class Reference

#include <apb_target.h>

Inheritance diagram for apb::pe::apb_target_b:
Collaboration diagram for apb::pe::apb_target_b:

Public Types

using payload_type = tlm::tlm_base_protocol_types::tlm_payload_type
using phase_type = tlm::tlm_base_protocol_types::tlm_phase_type

Public Member Functions

 SC_HAS_PROCESS (apb_target_b)
void b_transport (payload_type &trans, sc_core::sc_time &t) override
tlm::tlm_sync_enum nb_transport_fw (payload_type &trans, phase_type &phase, sc_core::sc_time &t) override
bool get_direct_mem_ptr (payload_type &trans, tlm::tlm_dmi &dmi_data) override
unsigned int transport_dbg (payload_type &trans) override
void set_operation_cb (std::function< unsigned(payload_type &trans)> cb)
 Set the operation callback function.

Public Attributes

sc_core::sc_in< bool > clk_i {"clk_i"}

Protected Member Functions

 apb_target_b (const sc_core::sc_module_name &nm, sc_core::sc_port_b< tlm::tlm_bw_transport_if< tlm::tlm_base_protocol_types > > &port, size_t transfer_width)
 apb_target_b (apb_target_b const &)=delete
 apb_target_b (apb_target_b &&)=delete
apb_target_boperator= (apb_target_b const &)=delete
apb_target_boperator= (apb_target_b &&)=delete
void response ()
void end_of_elaboration () override

Protected Attributes

tlm::tlm_generic_payload * active_tx {nullptr}
sc_core::sc_port_b< tlm::tlm_bw_transport_if< tlm::tlm_base_protocol_types > > & socket_bw
std::function< unsigned(payload_type &trans)> operation_cb
sc_core::sc_clock * clk_if {nullptr}
sc_core::sc_process_handle mhndl

Detailed Description

the target protocol engine base class

Definition at line 31 of file apb_target.h.

Member Typedef Documentation

◆ payload_type

using apb::pe::apb_target_b::payload_type = tlm::tlm_base_protocol_types::tlm_payload_type

Definition at line 36 of file apb_target.h.

◆ phase_type

using apb::pe::apb_target_b::phase_type = tlm::tlm_base_protocol_types::tlm_phase_type

Definition at line 37 of file apb_target.h.

Constructor & Destructor Documentation

◆ apb_target_b()

apb::pe::apb_target_b::apb_target_b ( const sc_core::sc_module_name & nm,
sc_core::sc_port_b< tlm::tlm_bw_transport_if< tlm::tlm_base_protocol_types > > & port,
size_t transfer_width )
explicitprotected

the constructor. Protected as it should only be called by derived classes

Parameters
nmthe module name
port
transfer_width

Member Function Documentation

◆ b_transport()

void apb_target_b::b_transport ( payload_type & trans,
sc_core::sc_time & t )
override

Definition at line 42 of file apb_target.cpp.

◆ end_of_elaboration()

void apb_target_b::end_of_elaboration ( )
overrideprotected

Definition at line 40 of file apb_target.cpp.

◆ get_direct_mem_ptr()

bool apb_target_b::get_direct_mem_ptr ( payload_type & trans,
tlm::tlm_dmi & dmi_data )
override

Definition at line 76 of file apb_target.cpp.

◆ nb_transport_fw()

tlm_sync_enum apb_target_b::nb_transport_fw ( payload_type & trans,
phase_type & phase,
sc_core::sc_time & t )
override

Definition at line 53 of file apb_target.cpp.

◆ response()

void apb_target_b::response ( )
protected

Definition at line 83 of file apb_target.cpp.

◆ set_operation_cb()

void apb::pe::apb_target_b::set_operation_cb ( std::function< unsigned(payload_type &trans)> cb)
inline

Set the operation callback function.

This callback is invoked once a transaction arrives. This function is not allowed to block and returns the latency of the operation i.e. the duration until the reponse phase starts

Todo
refine API
Parameters
cbthe callback function

Definition at line 58 of file apb_target.h.

◆ transport_dbg()

unsigned int apb_target_b::transport_dbg ( payload_type & trans)
override

Definition at line 81 of file apb_target.cpp.

Member Data Documentation

◆ active_tx

tlm::tlm_generic_payload* apb::pe::apb_target_b::active_tx {nullptr}
protected

Definition at line 81 of file apb_target.h.

◆ clk_i

sc_core::sc_in<bool> apb::pe::apb_target_b::clk_i {"clk_i"}

Definition at line 39 of file apb_target.h.

◆ clk_if

sc_core::sc_clock* apb::pe::apb_target_b::clk_if {nullptr}
protected

Definition at line 85 of file apb_target.h.

◆ mhndl

sc_core::sc_process_handle apb::pe::apb_target_b::mhndl
protected

Definition at line 87 of file apb_target.h.

◆ operation_cb

std::function<unsigned(payload_type& trans)> apb::pe::apb_target_b::operation_cb
protected

Definition at line 84 of file apb_target.h.

◆ socket_bw

sc_core::sc_port_b<tlm::tlm_bw_transport_if<tlm::tlm_base_protocol_types> >& apb::pe::apb_target_b::socket_bw
protected

Definition at line 83 of file apb_target.h.


The documentation for this class was generated from the following files:
  • /home/eyck/Projects/MINRES/SystemC-Components/src/interfaces/apb/pe/apb_target.h
  • /home/eyck/Projects/MINRES/SystemC-Components/src/interfaces/apb/pe/apb_target.cpp