본문 바로가기

Semiconductor/ASIC & FPGA

Propagation Delay

 Propagation delay is the amount of time it takes for a signal to travel from a source to a destination. Propagation delay is a fundamental concept of how digital circuits work. Inside of FPGA or ASIC there are thousands of tiny wires running everywhere. When you add up the physical length of the wires, they can easily be over a foot long, which is pretty amazing considering how small the chips are. Additionally, every piece of logic that your code goes through takes some finite delay time. Since these delays do exist, the digital designer needs to understand how they impact the FPGA or ASIC.

 

Propagation delay between two Flip-Flops

 

 Propagation delay is fundamentally important to sequential logic. Sequential logic is logic that is driven by a clock. In the figure above, there are two Flip-Flops that are connected together with some logic and routing between them. The amount of time it takes for the output of the first Flip-Flop to travel to the input of the second Flip-Flop is the propagation delay. The further apart those two Flip-Flops are or the more combinational logic in the middle, the longer the propagation delay between the two of them. The longer the propagation delay, the slower your clock is able to run.

 

 The reason for this is that both Flip-Flops use the same clock. The first Flop-Flop drives it's output at clock edge 1. The second Flip-Flop does not see the change on the output of the first Flip-Flop until clock edge 2, at which point it drives it's output. If the signal can safely travel from Flip-Flop 1 to Flip-Flop 2 in one clock period, your design is good. If not, you will run into problems.

 

 For example, consider the case where you have two Flip-Flops that are 10 nanoseconds apart from each other. If you use a clock that runs at 50MHz( 20ns period) you will be safe. You have 10ns to spare. However, if you use a 200MHz clock( 5ns period) your design will fail timing analysis and not work the way you expect.

 

 The purpose of anytiming analyzer in your FPGA or ASIC tools is to tell you if you have problems meeting timing. If your design is too slow to run at the clock frequency you want, you will get timing error and your design will likely not work correctly.

 

 How you can fix high propagation delay:

  1. Slow down your clock frequency
  2. Break your logic up into stages( Pipeline)

 Slowing down your clock frequency is the most obvious thing. If you are able to run your FPGA slower, your timing will improve. Breaking up your logic into stages is the more robust solution. If you do less stuff between two Flip-Flops, the propagation delay will decrease and your design will meet timing. 

 

How to pipelin your design to fix timing erros

 In the figure above, there is a large amount of logic between two Flip-Flops. The design has too large of a propagation delay and fails timing. If the designer breaks up the logic between three Flip-Flops, half of the logic can be done between the first two Flip-Flops and the other half of the logic can be done between the second two. Now the tools will have almost twice as much time to do what you need in a single clock cycle. this is called pipelining and it is very important to being a good digital designer. When you design your code in a pipeline it will have a much better chance at meeting timing at high clock frequencies.

'Semiconductor > ASIC & FPGA' 카테고리의 다른 글

Crossing Clock Domain  (0) 2020.11.10
Timing  (0) 2020.11.09
Shift Register  (0) 2020.11.08
Metastability  (0) 2020.10.31
What is a FPGA Latch?  (0) 2020.10.21