上海大学学报(自然科学版) ›› 2015, Vol. 21 ›› Issue (4): 393-401.doi: 10.3969/j.issn.1007-2861.2014.01.006

• 通信与信息工程 •    下一篇

基于训练方式的存储器时钟信号的自适应同步

陆辰鸿1,2, 胡越黎1,2, 周俊2   

  1. (1. 上海大学新型显示技术及应用集成教育部重点实验室, 上海200072; 2. 上海大学机电工程与自动化学院, 上海200072)
  • 收稿日期:2013-11-27 出版日期:2015-08-31 发布日期:2015-08-31
  • 通讯作者: 胡越黎(1959—), 男, 教授, 博士生导师, 博士, 研究方向为机器视觉、汽车电子、动力电池管理、IC设计. E-mail:huyueli@shu.edu.cn
  • 基金资助:

    国家自然科学基金资助项目(61376028); 上海市科委基金资助项目(13111104600)

Self-adaptive synchronization of memory interface based on training

LU Chen-hong1,2, HU Yue-li1,2, ZHOU Jun2   

  1. (1. Key Laboratory of Advanced Display and System Applications, Shanghai University, Shanghai 200072, China; 2. School of Mechatronic Engineering and Automation, Shanghai University, Shanghai 200072, China)
  • Received:2013-11-27 Online:2015-08-31 Published:2015-08-31

摘要: 存储器是现代电子系统的核心器件之一, 常用于满足不同层次的数据交换与存储需求. 然而频率提高、时钟抖动、相位漂移以及不合理的布局布线等因素, 都可能导致CPU对存储器访问稳定性的下降. 针对同步动态随机读写存储器(synchronous dynamic random access memory, SDRAM)接口的时钟信号提出了一种自适应同步的训练方法, 即利用可控延迟链使时钟相位按照训练模式偏移到最优相位, 从而保证了存储器访问的稳定性. 在芯片内部硬件上提供了一个可通过CPU控制的延迟电路, 用来调整SDRAM时钟信号的相位. 在系统软件上设计了训练程序, 并通过与延迟电路的配合来达到自适应同步的目的:当CPU访问存储器连续多次发生错误时, 系统抛出异常并自动进入训练模式. 该模式令CPU在SDRAM中写入测试数据并读回, 比对二者是否一致. 根据测试数据比对结果, 按训练模式调整延迟电路的延迟时间. 经过若干次迭代, 得到能正确访问存储器的延迟时间范围, 即“有效数据采样窗口”,取其中值即为SDRAM最优时钟相位偏移. 完成训练后对系统复位, 并采用新的时钟相位去访问存储器, 从而保证读写的稳定性. 仿真实验结果表明, 本方法能迅速而准确地捕捉到有效数据采样窗口的两个端点位置, 并以此计算出最佳的延迟单元数量, 从而实现提高访问外部SDRAM存储器稳定性的目的.

关键词: 同步动态随机读写存储器, 训练, 延迟电路, 自适应

Abstract: Memory is a core device in system on a chip (SoC) and other electronic systems for data exchange and storage at different levels. However, memory access errors may occur due to factors such as raise of frequency, jitter, phase drift, unreasonable placement and routing. An adaptive synchronize method focusing on the training of clock signal is designed for synchronous dynamic random access memory (SDRAM) interface to enhance stability of memory access. A CPU-controlled delay circuit is used to shift the phase of SDRAM clock signal. A training program is designed to cooperate with the delay module hardware for memory interface tuning. In the training mode, CPU writes test data to the memory and reads them back, judging whether they are matching or not. Training program tunes the delay circuit according to the test results. A valid data sampling window is obtained rapidly and accurately after several iterations. Using the method, the middle of the window is calculated, which is the optimal phase drift for SDRAM clock signal and can improve stability of memory access.

Key words: adaptive, delay circuit, synchronous dynamic random access memory (SDRAM), training

中图分类号: