{"id":280,"date":"2016-03-28T10:00:47","date_gmt":"2016-03-28T17:00:47","guid":{"rendered":"http:\/\/www.verilogpro.com\/?p=280"},"modified":"2022-09-29T00:40:06","modified_gmt":"2022-09-29T07:40:06","slug":"clock-domain-crossing-part-1","status":"publish","type":"post","link":"https:\/\/www.verilogpro.com\/clock-domain-crossing-part-1\/","title":{"rendered":"Clock Domain Crossing Design – 3 Part Series"},"content":{"rendered":"\n
Thank you for all your interest in my last post on Dual-Clock Asynchronous FIFO in SystemVerilog<\/a>! I decided to continue the theme of clock domain crossing (CDC) design techniques, and look at several other methods for passing control signals and data between asynchronous clock domains. This is perfect timing because I’m just about to create a new revision of one of my design blocks at work, which incorporates many of these concepts. I, too, can use a refresher \ud83d\ude42<\/p>\n\n\n\n The concepts in this article are mostly taken from Cliff Cumming's very comprehensive paper Clock Domain Crossing (CDC) Design & Verification Techniques Using SystemVerilog<\/a>. I’ve broken the topics into 3 parts:<\/p>\n\n\n\n Let’s get right to it!<\/p>\n\n\n\n Any discussion of clock domain crossing (CDC) should start with a basic understanding of metastability and synchronization. In layman’s terms, metastability refers to an unstable intermediate state, where the slightest disturbance will cause a resolution to a stable state. When applied to flip-flops in digital circuits, it means a state where the flip-flop’s output may not have settled to the final expected value.<\/p>\n\n\n\n One of the ways a flip-flop can enter a metastable state is if its setup or hold time is violated. In an asynchronous clock domain crossing (CDC), where the source and destination clocks have no frequency relationship, a signal from the source domain has a non-zero probability of changing within the setup or hold time of a destination flip-flop it drives. Synchronization failure occurs when the output of the destination flip-flop goes metastable and does not converge to a legal state by the time its output must be sampled again (by the next flip-flop in the destination domain). Worse yet, that next flip-flop may also go metastable, causing metastability to propagate through the design!<\/p>\n\n\n\nWhat is Metastability?<\/h2>\n\n\n\n