Skip to main content

Rockchip DDR DQ Eye Tool Developer Guide

ID: RK-KF-YF-168

Release Version: V1.0.0

Date: 2021-03-05

Security Level: □Top-Secret □Secret ■Internal □Public

DISCLAIMER

This document is provided "as is". Rockchip Electronics Co., Ltd. ("the Company") makes no express or implied representations or warranties regarding the accuracy, reliability, completeness, merchantability, fitness for a particular purpose, or non-infringement of any statements, information, or content in this document. This document is for reference only as a usage guide.

Due to product version upgrades or other reasons, this document may be updated or modified from time to time without any notice.

Trademark Statement

"Rockchip", "Rockchip", and "Rockchip" are registered trademarks of the Company and belong to the Company.

All other registered trademarks or trademarks mentioned in this document are owned by their respective owners.

Copyright © 2021 Rockchip Electronics Co., Ltd.

Beyond the scope of fair use, without the written permission of the Company, no individual or entity may extract, copy, or distribute any part or all of the content of this document in any form.

Rockchip Electronics Co., Ltd.

Address: No. 18, Area A, Software Park, Tongpan Road, Fuzhou, Fujian Province

Website: www.rock-chips.com

Customer Service Phone: +86-4007-700-590

Customer Service Fax: +86-591-83951833

Customer Service Email: fae@rock-chips.com


Preface

Overview

The Rockchip DDR DQ Eye Tool provides the functionality to view the read/write eye diagram of each DQ by entering commands in U-Boot, allowing customers to check whether the DQ eye width of their own board design is sufficient.

Product Versions

Chip NameSoftware Version
RV1126U-Boot 2017.09
RK356xU-Boot 2017.09

Intended Audience

This document (guide) is mainly applicable to the following engineers:

Software Development Engineers

Technical Support Engineers

Hardware Engineers

Revision History

VersionAuthorRevision DateDescription
V1.0.0Yao Xuwei2021-03-05Initial version

Table of Contents

[TOC]


Rockchip DDR DQ Eye Tool Working Principle​

This tool saves the results of DDR read eye training and write eye training during the Loader phase, and displays them graphically in the form of an eye diagram through the ddr_dq_eye command in U-Boot.

Loader Saves DDR Read & Write Eye Training Results​

(u-boot project drivers/ram/rockchip/sdram_rxxxxx.c, e.g., drivers/ram/rockchip/sdram_rv1126.c)

  1. After each read & write eye training is completed, the save_rw_trn_min_max() function saves the maximum and minimum deskew values of each DQ to rw_trn_result.rd_fsp[x].cs[x] or rw_trn_result.wr_fsp[x].cs[x]. Note that deskew min & max must be saved after each cs completes, otherwise the results will be overwritten by the next training.

  2. After the training of all cs in each fsp is completed, the save_rw_trn_deskew() function saves the deskew of each DQ to rw_trn_result.rd_fsp[x] or rw_trn_result.wr_fsp[x]; on the RV1126 platform, it also saves the min_value used by modify_dq_deskew() to restore the sampling position determined by training.

  3. After DDR initialization is complete, save_rw_trn_result_to_ddr() stores the training result rw_trn_result to DDR (address RW_TRN_RESULT_ADDR).

Viewing DDR DQ Read/Write Eye Diagram in U-Boot​

(u-boot project cmd/ddr_tool/ddr_dq_eye.c)

  1. Check whether the flag at address RW_TRN_RESULT_ADDR equals FSP_FLAG; if not, it means the Loader did not save the training result, returning CMD_RET_FAILURE.
  2. Get the input parameters of ddr_dq_eye and select the training result of the corresponding fsp. If the parameter is empty, select the highest frequency. Rockchip-User-Guide-DDR-DQ-Eye-Tool specifies that the input parameter of ddr_dq_eye is the DDR clock frequency (in MHz); in fact, the input parameter can also be fsp or DDR clock frequency (in Hz).
  3. Since the RK356x platform has 128 rd deskew and 256 wr deskew, printing the complete eye diagram may exceed the screen range. The macro PRINT_RANGE_MAX defines the maximum print length of the eye diagram, and the eye diagram length is proportionally scaled down to PRINT_RANGE_MAX.
  4. Print DDR read & write eye training results in graphical eye diagram form.

Determining the DDR DQ Minimum Eye Width Limit​

After testing multiple EVBs to obtain the minimum eye width of the EVB, take the average of the EVB test minimum eye width and the JEDEC-specified minimum eye width (rounded up and converted to deskew) as the minimum eye width limit.

RV1126 DDR DQ Minimum Eye Width Limit​

LPDDR4​

DDR Clock FrequencyRead/WriteEVB Test Min Eye WidthJEDEC Specified Min Eye WidthDetermined Min Eye Width Limit
1056MHzRead18612
1056MHzWrite19613
924MHzRead23715
924MHzWrite22715
784MHzRead27818
784MHzWrite26817

LPDDR4 tested on 15 EVBs total.

DDR4​

DDR Clock FrequencyRead/WriteEVB Test Min Eye WidthJEDEC Specified Min Eye WidthDetermined Min Eye Width Limit
1056MHzRead19613
1056MHzWrite1169
924MHzRead22715
924MHzWrite14711
784MHzRead27818
784MHzWrite19814

DDR4 tested on 14 EVBs total.

LPDDR3​

DDR Clock FrequencyRead/WriteEVB Test Min Eye WidthJEDEC Specified Min Eye WidthDetermined Min Eye Width Limit
1056MHzRead22715
1056MHzWrite18713
924MHzRead24816
924MHzWrite22815
784MHzRead291020
784MHzWrite271019

Only 5 of the RV1126 EVBs running normally from the Quality Department have LPDDR3, so the test sample is small.

DDR3​

DDR Clock FrequencyRead/WriteEVB Test Min Eye WidthJEDEC Specified Min Eye WidthDetermined Min Eye Width Limit
1056MHzRead21614
1056MHzWrite22614
924MHzRead26817
924MHzWrite25817
784MHzRead31518
784MHzWrite31518

DDR3 tested on 20 EVBs total.

RK356x DDR DQ Minimum Eye Width Limit​

LPDDR4​

DDR Clock FrequencyRead/WriteEVB Test Min Eye WidthJEDEC Specified Min Eye WidthDetermined Min Eye Width Limit
1560MHzRead331625
1560MHzWrite321624
1332MHzRead411528
1332MHzWrite371526
1184MHzRead441530
1184MHzWrite421529
1056MHzRead461531
1056MHzWrite441530

LPDDR4 tested on 14 EVBs total.

DDR4​

DDR Clock FrequencyRead/WriteEVB Test Min Eye WidthJEDEC Specified Min Eye WidthDetermined Min Eye Width Limit
1560MHzRead441530
1560MHzWrite291522
1332MHzRead461531
1332MHzWrite341525
1184MHzRead501332
1184MHzWrite381326
1056MHzRead521333
1056MHzWrite411327

DDR4 tested on 13 EVBs total.

LPDDR3​

DDR Clock FrequencyRead/WriteEVB Test Min Eye WidthJEDEC Specified Min Eye WidthDetermined Min Eye Width Limit
1184MHzRead491834
1184MHzWrite321825
1056MHzRead521634
1056MHzWrite341625
920MHzRead601739
920MHzWrite391728
780MHzRead721845
780MHzWrite381828

LPDDR3 tested on 7 EVBs total.

DDR3​

DDR Clock FrequencyRead/WriteEVB Test Min Eye WidthJEDEC Specified Min Eye WidthDetermined Min Eye Width Limit
1184MHzRead471732
1184MHzWrite441731
1056MHzRead521534
1056MHzWrite461531
920MHzRead601739
920MHzWrite511724
780MHzRead73941
780MHzWrite53931

DDR3 tested on 9 EVBs total.

Notes​

  1. The Rockchip DDR DQ Eye Tool is integrated into the DDR Test Tool. Before compiling U-Boot, enable it in menuconfig: Command line interface -> Enable ddr test tool.
  2. The DDR initialization code for RV1126 (drivers/ram/rockchip/sdram_rv1126.c) is open source. The code for saving Read/Write Eye Training results during DDR initialization in the Loader is enabled via the CONFIG_CMD_DDR_TEST_TOOL macro. You can directly flash the Loader packaged after enabling this tool via menuconfig. The DDR initialization code for RK356x is not open source; the Loader compiled under dram_init in the updated u-boot-ddr project already supports this tool.
  3. The Loader saves the training result at RW_TRN_RESULT_ADDR. RW_TRN_RESULT_ADDR is currently defined as (0x2000000 | 0x8000). 0x2000000 (32M) is the Kernel location, which is relatively safe during the Loader to U-Boot phase. The first 0x8000 (32K) space is reserved for FSP_PARAM_STORE_ADDR, used for DDR suspend/resume functionality in Trust.
  4. The unit delay time of deskew varies across platforms. Each deskew on RV1126 is approximately 18.5ps. For details, refer to points 5 and 6 under "About de-skew" in the internal-docs\DDR\Internal\RV1126_DDR_note document. The unit deskew on RK356x is UI / 64.
  5. In the eye diagram printed by this tool, the Sample position of RV1126 is not actually the final DQ perbit deskew used. To save power, the modify_dq_deskew() function in the Loader phase shifts all deskews together to the smallest possible position.