38.3.4.5 Calculation of Required Message Memory
The size of required RAM depends on the configuration of each FIFO. Equation 38-9 through Equation 38-11 specify the sizes of the TEF, TXQ and the FIFOs in bytes. The TEF or TXQ is not used if their size is zero.
Since the size of the integrated RAM is limited, the user must check that the memory configuration fits into RAM. Equation 38-12 can be used to calculate the total RAM usage in bytes.
The size of the TEF objects depends on the enabling of timestamping. If TEFTSEN is set, then tefts = 4, else tefts = 0.
The PayLoad(i) is defined in data bytes.
The size of a message object of an RX FIFO varies dependent on the enabling
of timestamping. If RXTSEN = 1
and TXEN = 0
for
FIFO(i), then rxts(i) = 4, else rxts(i) = 0.
N is defined as the number of FIFOs used in addition to the TEF and the TXQ.
- If TEF is 4 messages deep (NElements (TEF) = 4) and TEFTSEN is clear, then the size of TEF = STEF = 4 x (0 + 8) = 32 bytes
- If NElements (TXQ) = 1, PayLoad (TXQ) = 12, then the size of TXQ = STXQ = 1 x (8 + 12) = 20 bytes
- If NElements (FIFO) = 3, PayLoad (FIFO) = 8, then the size of FIFO = SFIFO = 3 x (8 + 8) = 48 bytes
Therefore, SRAM = STEF + STXQ + SFIFO = 32 + 20 + 48 = 100 bytes.