WR Streamer statistics
The xrtx_streamers_stats
module included in the xwr_streamer
module produces performance-related data that can be used for advanced diagnostics and monitoring. The module generates information on streamer module function in terms of:
- Data integrity: includes the number of frames sent, frames received as well as information on the number of lost frames and lost blocks.
- Timing Performance: includes information such as maximum and minimum latency values and the accumulated latency.
- Fixed-latency operation: includes the number of frames that missed the latency deadline or were released because the intended latency required too much waiting (timeout)
This information can be read using wishbone interface and it is available via WR PTP Core, WR PTP Core exposes this information via shell command (diag) and SNMP agent.
The xrtx_streamers_stats
can be reset and one can take a
snapshot via any type of access (from wishbone interface and via WR PTP
Core via diag command or SNMP set command):
- reset - resets the Data integrity, Timing Performance and Fixed-latency operation information and timestamps the reset time. The timestamp can be useful when reading the available information to know since when this information has been accumulated.
- snapshot - freezes all available information to provide coherent
data (the acquisition of the information is not stopped, it is
maintained in the background). Such a freeze of registers is
important since most of the information is made available through a
number of 32-bit values (32-bit WB registers or SNMP reads of 32-bit
values). Moreover, to calculate the average latency, the accumulated
latency (
latency_acc_o
), and the count of the accumulated latency values (latency_cnt_o
) must be read coherently.
NOTE: The statistics are collected from the beginning of the system operation (as soon as the system reset is released). However, at the very beginning of system operation, there is no valid WR time, thus the initial timestamp is meaningless (it is zero thus the epoch in 1970). Moreover, the latency statistics are taken only when WR time is valid. To avoid the necessity of the user resetting the statistics each time the system is started and WR synchronization achieved, the reset is performed automatically as soon as the WR time is available, the first time after the system reset/powerup.
Module structure
xrtx_streamers_stats
Interface of I/F name | Description |
---|---|
g_streamers_op_mode | Generic to specify whether the stats module needs to collect information from (set as approriate to) TX_ONLY, RX_ONLY, or TX_AND_RX |
g_cnt_width | Width of frame counters (50-bit default should be sufficient, min 15, max 64 bits) |
g_acc_width | Width of cumulated latency counter (64-bit Default is also the maximum possible value) |
g_clk_ref_rate |
Input from Transceiver
I/F name | Description |
---|---|
sent_frame_i | 1 pulse signal when frame is successfuly sent (Provided by Tx streamer) |
rcvd_frame_i | 1 pulse signal when frame is successfuly received (Provided by Rx streamer) |
lost_block_i | 1 pulse signal when a block is lost (Provided by Rx) |
lost_frame_i | 1 pulse signal when a frame is lost (Provided by Rx) |
lost_frames_cnt_i | Number of frames lost (Provided by Rx) |
rcvd_latency_i | Latency of frame received (Provided by Rx) |
rcvd_latency_valid_i | 1 pulse signal when latency value is valid (Provided by Rx) |
rx_stat_match_p1_i | 1 pulse signal that data with fixed-latency configured was correctly provided |
rx_stat_late_p1_i | 1 pulse signal that data with fixed-latency configured was provided later than required |
Statistics control
I/F name | Description |
---|---|
reset_stats_i | Reset all statistics counters |
snapshot_ena_i | Enable snapshot of the statistics values so as to have a coherent view of performance |
Output statistics
I/F name | Description |
---|---|
reset_time_tai_o | Time of last statistics reset in seconds, expressed with TAI |
reset_time_cycles_o | Time of last statistics reset in clk_ref cycles within the second (i.e the sub-second part) |
sent_frame_cnt_o | Counter of sent frames |
rcvd_frame_cnt_o | Counter of received frames |
lost_frame_cnt_o | Counter of lost frames |
lost_block_cnt_o | Counter of lost blocks |
latency_acc_o | Accumulated latency since last reset, expressed in clk_ref cycles (sum of latencies of all received frames, the number of accumulated latency values is provided by latency_cnt_o allowing to calculate average latency) |
latency_cnt_o | Number of latency values accumulated in latency_acc_o |
latency_acc_overflow_o | Signals overflow of latency accumulator (latency_acc_o ) |
latency_max_o | Maximum latency since last reset, expressed in clk_ref cycles |
latency_min_o | Minimum latency since last reset, expressed in clk_ref cycles |
rx_stat_match_cnt_o | Count of received frames with data that was delivered to the user on time in the fixed latency mode |
rx_stat_late_cnt_o | Count of received frames with data that missed their fixed-latency deadline for delivery to the user |
rx_stat_timeout_cnt_o | Count of received frames with data that had their execution timestamp too far in the future (exceeding the timeout value) |
SNMP I/O arrays
-
snmp_array_i
: snmp input consists of two bits (from LSB to MSB)-
rest_stats_remote
: remotely reset streamer statistics -
snapshot_remote_ena
: remotely enable statistics snapshot
-
-
snmp_array_o
: snmp output consists of 24 words of 32 bits.
The table below shows the mapping of streamer statistics to SNMP array words.
Since counters can be up to 64 bits in width, two SNMP words are assigned to these counters.
Word | bit | Content |
---|---|---|
snmp_array_o(0) | 0 | reset_stats |
snmp_array_o(0) | 1 | latency_acc_overflow_out |
snmp_array_o(1) | 27 | reset_time_cycles |
snmp_array_o(2) and snmp_array_o(3) | 40 | reset_time_tai |
snmp_array_o(4) | 27 | latency_max_out |
snmp_array_o(5) | 27 | latency_min_out |
snmp_array_o(6) and snmp_array_o(7) | g_cnt_width | sent_frame_cnt_out |
snmp_array_o(8) and snmp_array_o(9) | g_cnt_width | rcvd_frame_cnt_out |
snmp_array_o(10) and snmp_array_o(11) | g_cnt_width | lost_frame_cnt_out |
snmp_array_o(12) and snmp_array_o(13) | g_cnt_width | lost_block_cnt_out |
snmp_array_o(14) and snmp_array_o(15) | g_cnt_width | latency_cnt_out |
snmp_array_o(16) and snmp_array_o(17) | g_acc_width | latency_acc_out |
snmp_array_o(18) and snmp_array_o(18) | g_cnt_width | rx_stat_match_cnt_out |
snmp_array_o(20) and snmp_array_o(21) | g_cnt_width | rx_stat_late_cnt_out |
snmp_array_o(22) and snmp_array_o(23) | g_cnt_width | rx_stat_timeout_cnt_out |
12 May 2020