How do we decide on the optimal buffer size in PDUR Configuration
- AutoEconnect Sessions
- Mar 28
- 2 min read
Updated: Apr 4
The PduR (PDU Router) buffer size is decided based on multiple factors related to system constraints, communication needs, and the AUTOSAR configuration. Here are the key considerations:
1. Communication Type and Data Flow
• Direct Transmission (Without Buffering): If the PDU is directly routed without needing storage, a buffer is not required.
• Buffered Transmission: If routing requires temporary storage (e.g., when using a gateway or deferred transmission), buffer size must be allocated accordingly.
2. Maximum PDU Size
• The buffer must accommodate the largest PDU that needs to be stored.
• Typically, the size is equal to or slightly larger than the largest PDU size routed through PduR.
3. Number of Pending PDUs
• If multiple PDUs need to be temporarily stored, the buffer size must be large enough to handle peak loads.
• The buffer size = Max PDU size × Number of simultaneous PDUs.
Example: If the max PDU size routed over PduR is 64 bytes and you need to store 2 PDUs at a time, set the buffer size to 128 bytes.
4. Communication Mode (Synchronous vs Asynchronous)
• In synchronous mode, PDUs are processed immediately, reducing buffer requirements.
• In asynchronous mode, buffering is required, leading to larger memory needs.
5. Routing Path and Module Dependencies
• Buffers may be required if there are delays due to routing between different communication stacks (e.g., CAN → LIN).
• The PduR must ensure compatibility with Com, DCM, SoAd, CanTp, LinTp, etc.
6. Memory Constraints
• RAM availability is a key limiting factor.
• If memory is scarce, optimization techniques (e.g., dynamic buffer allocation) may be considered.
7. AUTOSAR Configuration (PduR Configuration Tool)
• The buffer size is typically configured using AUTOSAR configuration tools.
• PduR handles Tx and Rx buffers separately, and parameters are set in the PduR_BufferConfiguration structure.

Comments