{"id":1677,"date":"2017-10-24T13:03:01","date_gmt":"2017-10-24T20:03:01","guid":{"rendered":"https:\/\/blogs.mentor.com\/hyperblog\/?p=1677"},"modified":"2026-03-27T09:28:44","modified_gmt":"2026-03-27T13:28:44","slug":"ddr-design-write-leveling-for-better-dq-timing","status":"publish","type":"post","link":"https:\/\/blogs.sw.siemens.com\/electronic-systems-design\/2017\/10\/24\/ddr-design-write-leveling-for-better-dq-timing\/","title":{"rendered":"DDR Design: Write leveling for better DQ timing"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1678\" src=\"https:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/47\/2017\/10\/Blog-DDR-DQ-Timing.jpg\" alt=\"\" width=\"207\" height=\"224\" \/>So far, we&#8217;ve gone through the <a href=\"https:\/\/www.mentor.com\/pcb\/blog\/post\/the-back-and-forth-of-the-ddr-data-bus-777d3634-78cd-41eb-9bd6-162f905e982b?cmpid=9049\" target=\"_blank\" rel=\"noopener\">basics of the DDR Bus<\/a>, and discussed some of the <a href=\"https:\/\/www.mentor.com\/pcb\/blog\/post\/what-causes-undesirable-si-in-ddr-designs--5512d15c-5612-4295-a027-639b0c80acae?cmpid=9049\" target=\"_blank\" rel=\"noopener\">Signal Integrity<\/a>\u00a0and <a href=\"https:\/\/www.mentor.com\/pcb\/blog\/post\/receiver-requirements-in-ddr-design-f379b3cc-f92c-4dfb-93fc-704a45a38565?cmpid=9049\" target=\"_blank\" rel=\"noopener\">timing requirements<\/a>\u00a0of the controller and the DRAMs.<\/p>\n<p>Let\u2019s now dig down into one of these timing requirements, specifically the clock-to-DQS requirement at the DRAM and the industry-standard solution of \u201cwrite-leveling\u201d used to solve the layout issues caused by the requirement.<\/p>\n<p><strong>Understanding the clock-to-DQS requirement<\/strong><\/p>\n<p>First, let\u2019s start with the basic requirement. There are three official requirement variables with extremely ogre-ish names \u2013 tDQSS, tDSS and tDSH. Rather than discuss the details of what these imply (I guarantee you\u2019ll forget them 90 seconds after reading them), let\u2019s talk about the conceptual idea behind the requirements.<\/p>\n<p>These three variables provide a way of specifying that when the clock and strobe reach the DRAM, their rising edges occur within a certain time-span of each other (often around \u00b1tCK\/4).<\/p>\n<p>For a single DRAM setup, this isn\u2019t a problem. If the clock and strobe signals are reasonably length-matched, then the clock and the strobe will arrive at the DRAM at approximately the same time.<\/p>\n<p>For DDR2 and earlier technologies, this again isn\u2019t a problem even though they had multiple DRAMs. In these setups, the clock to each DRAM was length-matched to each other by means of a tree topology. So, if there were eight DRAMs in the channel, the clock lengths from the controller to each of the DRAMs was matched to be equal to the strobe length to the DRAMs.<\/p>\n<p><strong>Problems appear as speeds get higher<\/strong><\/p>\n<p>A tree topology, however, is full of reflection segments. Each branch creates a discontinuity, not to mention that there are multiple endpoints. As the data rates get higher, managing Tree topologies becomes more difficult.<\/p>\n<p>For DDR3, the solution was to use \u201cFly-By\u201d routing. With this routing, the clock (and address) signals start at the controller and create a main channel to all the DRAMs. The DRAMs are connected to the main path by means of a very short stub from the main routed signal. This way, stubs are minimized and the main path can be terminated neatly at the end of the route.<\/p>\n<p>However, this creates a fundamental problem with respect to the clock-to-DQS requirement at the DRAM. With fly-by routing, the DRAM closest to the controller will receive the clock and address signals before the DRAM at the end of the routing. So, the data and strobe needs to arrive at the first DRAM earlier than at the last DRAM in order to line up the clock and strobe. Shortening one lane and lengthening the other won\u2019t work since this will cause an issue during read transactions.<\/p>\n<p><strong>Solving the problem<\/strong><\/p>\n<p>The solution is for the controller to automatically detect the flight-time difference of the clock signal between the different DRAMs, and then delay the data lanes appropriately so that they reach the DRAMs as the clock\/address signals reach the DRAMs. The process of detecting the required delays, which is usually done at power up, is called \u201ctraining.\u201d The entire system is called \u201cwrite leveling.\u201d<\/p>\n<p>It is similarly possible to delay each DQ bit within a lane with respect to its strobe in order to perfectly center the strobe around the DQ signal. This feature is available more commonly in DDR4 controllers and in some of the higher-end DDR3 controllers. It is known by many names, including \u201cper-bit leveling,\u201d \u201cDQ calibration,\u201d or \u201cDQ-DQS deskew\u201d (say that 10 times fast!).<\/p>\n<p>For more information about the physical design issues of high-speed interfaces, <a href=\"https:\/\/www.mentor.com\/pcb\/resources\/overview\/high-speed-pcb-layout-physical-design-issues-of-high-speed-interfaces-94b039c4-c051-4cd1-81dc-397e33e82584?cmpid=9049\" target=\"_blank\" rel=\"noopener\">read our white paper<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So far, we&#8217;ve gone through the basics of the DDR Bus, and discussed some of the Signal Integrity\u00a0and timing requirements\u00a0of&#8230;<\/p>\n","protected":false},"author":71670,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spanish_translation":"","french_translation":"","german_translation":"","italian_translation":"","polish_translation":"","japanese_translation":"","chinese_translation":"","footnotes":""},"categories":[13],"tags":[],"industry":[],"product":[],"coauthors":[],"class_list":["post-1677","post","type-post","status-publish","format-standard","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/blogs.sw.siemens.com\/electronic-systems-design\/wp-json\/wp\/v2\/posts\/1677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.sw.siemens.com\/electronic-systems-design\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.sw.siemens.com\/electronic-systems-design\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/electronic-systems-design\/wp-json\/wp\/v2\/users\/71670"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/electronic-systems-design\/wp-json\/wp\/v2\/comments?post=1677"}],"version-history":[{"count":1,"href":"https:\/\/blogs.sw.siemens.com\/electronic-systems-design\/wp-json\/wp\/v2\/posts\/1677\/revisions"}],"predecessor-version":[{"id":10613,"href":"https:\/\/blogs.sw.siemens.com\/electronic-systems-design\/wp-json\/wp\/v2\/posts\/1677\/revisions\/10613"}],"wp:attachment":[{"href":"https:\/\/blogs.sw.siemens.com\/electronic-systems-design\/wp-json\/wp\/v2\/media?parent=1677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/electronic-systems-design\/wp-json\/wp\/v2\/categories?post=1677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/electronic-systems-design\/wp-json\/wp\/v2\/tags?post=1677"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/electronic-systems-design\/wp-json\/wp\/v2\/industry?post=1677"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/electronic-systems-design\/wp-json\/wp\/v2\/product?post=1677"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/electronic-systems-design\/wp-json\/wp\/v2\/coauthors?post=1677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}