SPRUIM2H May 2020 – October 2023 AM2431 , AM2432 , AM2434 , AM6411 , AM6412 , AM6421 , AM6422 , AM6441 , AM6442
The SUM32 module is a simple hardware accelerator which is used to help generate UDP checksum (User Datagram Protocol) for data integrity. The operation takes 2 clock cycles, read pipe is another 1 clock cycle. The operation is pipelined. The PRUn or RTU_PRUn core (where n = 0 or 1) will not see any hardware backpressure for back to back XOUT 32 Byte operations. The PRU or RTU_PRU core can see up to 2 cycle stall if there is no time between the last XOUT and the XIN to get the SUM value. The FW must insure you have 3 NOPs or 3 clock cycle delay between the last XOUT to the XIN to get the correct SUM value. The XIN operation self clears the SUM.
Figure 6-209 shows the SUM32 module integration. Each PRUn core (where n = 0 or 1) has a dedicated SUM32 module, used to snoop or continuously monitor the Broadside (BS) RAM and facilitate software to detect a UDP Checksum error. There are also two SUM32 modules attached to each auxiliary PRU core (RTU_PRU0 and RTU_PRU1).
Note that there are two modes of operation for the PRU to interact with the SUM32:
The Device ID for each mode is shown in Table 6-436. An XOUT with the BS RAM + XOUT SUM32 snoop Device ID will write the data to the Broadside (BS) RAM and the SUM32 at the same time. An XOUT with the SUM32 only Device ID will write the data only to SUM32. An XIN with either mode’s Device ID will read the SUM32 value.
Mode | Device ID | PRU/ PRU_RTU core |
---|---|---|
XOUT (write) data to SUM32 | ||
BS RAM + SUM32 snoop | 49 (31h) | PRU |
38 (26h) | RTU_PRU | |
SUM32 only | 47 (2Fh) | PRU |
39 (27h) | RTU_PRU | |
XIN (read) sum result | ||
02 (2h) | Both PRU & RTU_PRU |
The SUM32 directly connects with the PRU internal register R2-R10 and R29 through use of the PRU broadside interface and XFR instructions. Figure 6-210 and Table 6-437 shows the functionality of each register.
Register | Function | Description |
---|---|---|
R2 – R9 | Data | Write only. Always write 32 Bytes for SUM32 XFR IDs. |
R29 | Sum | Read only. Always read 4 Bytes. This will get the current 32-bit SUM value. The read event will self-clear the SUM. |