SPRUIM2H May 2020 – October 2023 AM2431 , AM2432 , AM2434 , AM6411 , AM6412 , AM6421 , AM6422 , AM6441 , AM6442
The statistics engine module (PA_STATS) is used to accelerate the task of incrementing and collecting statistics of traffic inside Packet Accelerator subsystem.
Figure 6-261 shows an overview of the PA_STATS module.
The statistics engine has 4 PRU statistics ports, which allow 4 PRU cores or other modules to write statistics commands to the engine simultaneously. In order to allow the engine to accept multiple commands, each port has a 8 entry command FIFO, allowing for up to 8 statistics commands to be written per port before a command could be dropped due to lack of storage. Each PRU in the PA (Packet Accelerator) flow exports byte strobes for both R0 and R31 registers to the statistics engine, however, only a write to R31 register will trigger statistics operation. That trigger is the assertion of request for 1 cycle and at the same clock request is asserted index, inc_val and inc_type must be valid.
The below Table 6-490 shows statistic input ports.
Statistic Input Ports | |||
---|---|---|---|
Bit Field | PRU Registers | Bits | Definition |
req | R31[15] | 1 | Asserted for 1 cycle for each stat increment. |
inc_type | R31[14] | 1 | 0h: indicates that the statistic should increment by 1. 1h: indicates that the statistic should increment by the ’inc_val’ field. |
index | R31[13:0] | 14 | Indicates which statistic in the memory will be incremented. Acceptable input range for this implementation is 1 … FFFh. |
inc_val | R0[16:0] | 17 | Indicates the increment value if inc_type is 1. If inc_type is 0 this field is ignored. |
The statistics engine outputs three status bits per statistics port, as shown in Table 6-491
Statistic Input Ports | |||
---|---|---|---|
Bit Field | PRU Registers | Bits | Definition |
2 | R31[2] | 1 | Set when at least 8 entries in the statistics port FIFO are free. |
1 | R31[1] | 1 | Set when at least 4 entries in the statistics port FIFO are free. |
0 | R31[0] | 1 | Set when at least 1 entry in the statistics port FIFO is free. |
The ‘ready’ output port is provided for future compatibility.