4.7.9. hrut_ddr
hrut_ddr is a tool used to monitor DDR (Double Data Rate) bandwidth and performance. It reads data from specific device files (such as /dev/axi_mon or /dev/ddrmonitor) to display real-time information about DDR read/write bandwidth, latency, and more.
4.7.9.1. Syntax Description
Below is the Usage output from running hrut_ddr -h:
DDR MONITOR HELP INFORMATION
>>> -t/--type sample type: cpu,bpu,vin,codec,gpu,sum,all
>>> -p/--period sample period: [1-1000] ms
>>> -r/--raw print raw data
4.7.9.2. Option Descriptions
The following are the options supported by hrut_ddr and their descriptions:
-t/–type: Specifies the DDR port type to monitor.
Function: Specifies the DDR port type to monitor.
Parameters:cpu: CPU port.bpu: BPU0 (BPU, hardware acceleration unit) port.vin: VIO (Video Input/Output) port.codec: Codec port.gpu: GPU (Graphics Processing Unit) port.sum: Displays the sum of all ports.all: Displays detailed information for all ports.
-p/–period:
Function: Sets the sampling period.
Parameter: Sampling period in milliseconds (ms), range [1–1000].-r/–raw:
Function: Displays detailed information in raw data format.-h/–help:
Function: Displays help information explaining how to use the command.
4.7.9.3. Command Options and Their Functionalities
Display Help Information
Command:
hrut_ddr -h
Function:
Displays help information explaining how to use the command.
Output:
DDR MONITOR HELP INFORMATION
>>> -t/--type sample type: cpu,bpu,vin,codec,gpu,sum,all
>>> -p/--period sample period: [1-1000] ms
>>> -r/--raw print raw data
Monitor DDR Bandwidth Across All Ports
Command:
hrut_ddr -t all
Function:
Monitors read and write bandwidth information across all DDR ports.
Output:
root@buildroot:/userdata/gmsl_test# hrut_ddr -t all
port_type:ALL
DDR type is: LPDDR4
Set sample period:10ms, 100 samples per seconds
Time 3546.680s
MB/S P0:CPU P1:BPU P2:VIN P3:CODEC P4:GPU SUM
Read : 19 0 0 12 0 31
Write: 7 0 0 0 0 7
Time 3546.690s
MB/S P0:CPU P1:BPU P2:VIN P3:CODEC P4:GPU SUM
Read : 1 0 0 11 0 12
Write: 0 0 0 0 0 0
Time 3546.700s
MB/S P0:CPU P1:BPU P2:VIN P3:CODEC P4:GPU SUM
Read : 0 0 0 11 0 11
Write: 0 0 0 0 0 0
Time 3546.710s
MB/S P0:CPU P1:BPU P2:VIN P3:CODEC P4:GPU SUM
Read : 3 0 0 12 0 15
Write: 1 0 37 0 0 38
Time 3546.720s
MB/S P0:CPU P1:BPU P2:VIN P3:CODEC P4:GPU SUM
Read : 3 0 0 13 0 16
Write: 0 0 77 0 0 77
Time 3546.730s
MB/S P0:CPU P1:BPU P2:VIN P3:CODEC P4:GPU SUM
Read : 0 0 0 13 0 13
Write: 0 0 77 0 0 77
Time 3546.740s
MB/S P0:CPU P1:BPU P2:VIN P3:CODEC P4:GPU SUM
Read : 31 0 334 14 0 379
Write: 19 0 383 0 0 402
Time 3546.750s
MB/S P0:CPU P1:BPU P2:VIN P3:CODEC P4:GPU SUM
Read : 342 0 563 14 0 919
Write: 323 0 607 0 0 930
Time 3546.760s
MB/S P0:CPU P1:BPU P2:VIN P3:CODEC P4:GPU SUM
Read : 40 0 0 518 0 558
Write: 10 0 0 271 0 281
Result Explanation:
Time: Indicates the current sampling time.
Read and Write: Represent bandwidth information for DDR read and write operations, respectively.
P0:CPU, P1:BPU, etc.: Represent bandwidth values for different ports, in MB/s.
SUM: Represents the total bandwidth across all ports.
Monitor DDR Bandwidth on a Specific Port
Command:
hrut_ddr -t cpu
Function:
Monitors DDR bandwidth information only for the CPU port.
Output:
root@buildroot:/userdata/gmsl_test# hrut_ddr -t cpu
port_type:CPU
DDR type is: LPDDR4
Set sample period:10ms, 100 samples per seconds
Time 4521.998s P0:CPU SUM MB/S
Read : 20 638
Write: 17 689
Time 4522.008s P0:CPU SUM MB/S
Read : 359 845
Write: 331 747
Display Detailed Information in Raw Data Format
Command:
hrut_ddr -t all -r
Function:
Displays detailed information for all DDR ports in raw data format, including latency, command count, etc.
Output:
root@buildroot:/userdata/gmsl_test# hrut_ddr -t all -r
port_type:ALL
DDR type is: LPDDR4
Set sample period:10ms, 100 samples per seconds
Time 4651.868s
Read :
CPU (bw: 17 cmd_num: 0 max_lantency: 1679 min_lantency: 50 cmd_accomulative_latency: 253955 stop_ost: 2)
BPU (bw: 0 cmd_num: 0 max_lantency: 0 min_lantency: 0 cmd_accomulative_latency: 0 stop_ost: 0)
VIN (bw: 0 cmd_num: 0 max_lantency: 0 min_lantency: 0 cmd_accomulative_latency: 0 stop_ost: 0)
CODEC(bw: 11 cmd_num: 0 max_lantency: 2147 min_lantency: 71 cmd_accomulative_latency: 2415530 stop_ost: 0)
GPU (bw: 0 cmd_num: 0 max_lantency: 0 min_lantency: 0 cmd_accomulative_latency: 0 stop_ost: 0)
Write:
CPU (bw: 6 cmd_num: 0 max_lantency: 86 min_lantency: 8 cmd_accomulative_latency: 9142 stop_ost: 0)
BPU (bw: 0 cmd_num: 0 max_lantency: 0 min_lantency: 0 cmd_accomulative_latency: 0 stop_ost: 0)
VIN (bw: 0 cmd_num: 0 max_lantency: 0 min_lantency: 0 cmd_accomulative_latency: 0 stop_ost: 0)
CODEC(bw: 0 cmd_num: 0 max_lantency: 0 min_lantency: 0 cmd_accomulative_latency: 0 stop_ost: 0)
GPU (bw: 0 cmd_num: 0 max_lantency: 0 min_lantency: 0 cmd_accomulative_latency: 0 stop_ost: 0)
Time 4651.878s
Result Explanation:
bw: Indicates bandwidth value in MB/s.
cmd_num: Indicates total number of commands.
max_latency and min_latency: Represent maximum and minimum latency.
cmd_accomulative_latency: Represents cumulative latency.
stop_ost: Represents the number of clock cycles when stopped.
Set Sampling Period
Command:
hrut_ddr -t all -p 100
Function:
Sets the sampling period to 100 milliseconds and monitors bandwidth information for all DDR ports.
Output:
root@buildroot:/userdata/gmsl_test# hrut_ddr -t all -p 100
port_type:ALL
DDR type is: LPDDR4
Set sample period:100ms, 10 samples per seconds
Time 4942.393s
MB/S P0:CPU P1:BPU P2:VIN P3:CODEC P4:GPU SUM
Read : 42 0 90 64 0 196
Write: 35 0 118 28 0 181
Time 4942.493s
MB/S P0:CPU P1:BPU P2:VIN P3:CODEC P4:GPU SUM
Read : 39 0 90 64 0 193
Write: 33 0 118 28 0 179
Time 4942.593s
MB/S P0:CPU P1:BPU P2:VIN P3:CODEC P4:GPU SUM
Read : 38 0 90 64 0 192
Write: 32 0 118 28 0 178