3
\$\begingroup\$

I have the following circuit where I need to find if there are any problems with timings: enter image description here

The first thing I did is "simplify" this circuit, all the delays in wires (IMO please correct me if I'm wrong) can be grouped together in the following way: enter image description here

Now I need to check that t_setup and t_hold conditions are met, but first of all I'm not sure how to deal with this "skew" in the clock signal. We've heard about regular clock skew but here the clock skew has a minimum and max values, also I'm not sure but can I simplify it even further and subtract the small buffer before the clock of FF1 from the second clock buffer?

I would like to see a timing diagram and the process of creating it, and generally the method for solving these problems, since I understand circuits better when I'm given their timing diagrams.

Another question I have about mostly skew and how to deal with it, in the following circuit: enter image description here

We need to determine if the t_hold and t_setup conditions are met with a positive skew of 1ns, so is it fair to say that when we look at the path from FF2 to FF1 the skew is actually -1 ns? or is it still a positive skew no matter your reference frame?

(also just to be sure, when I check for t_setup it goes like this: T_c >= t_pcq(FF1) + t_pd(CL2) + t_setup(FF2) + t_skew , and for t_hold: t_hold(FF2) + t_skew <= t_ccq(FF1) + t_cd(CL2) talking here about the order, you can use the last pic as a refrence?)

\$\endgroup\$
1
  • \$\begingroup\$ Please do not ask two questions in one. Cut your independent second question and post it separately. \$\endgroup\$ Commented Nov 21 at 6:49

2 Answers 2

3
\$\begingroup\$

We've heard about regular clock skew but here the clock skew has a minimum and max values.

The propagation delay (\$t_{pd}\$) of a logic gate is the time taken to produce a valid output given a valid input. Now, \$t_{pd}\$ typically depends on gate inputs and environmental factors like temperature and voltage and therefore takes on a range of values. The maximum possible delay for a given spec is denoted as (\$t_{pd_{max}}\$ or \$t_{max}\$).

The contamination delay (\$t_{cd}\$) of a logic gate is the time taken to produce an invalid output given an invalid input and takes on a range of values. The minimum possible delay for a given spec is denoted as (\$t_{cd_{min}}\$ or \$t_{min}\$). Note that given an input to a logic gate it first transitions from its stable or valid state to an invalid state before settling to the final valid state. Thus, \$t_{min}\$ is always in terms of \$t_{cd}\$ and \$t_{max}\$ in terms of \$t_{pd}\$.

The same logic applies to clock skew. Clock skew between two registers, occurs due to delays introduced in the clock path due to routing, buffers etc. whose delay can take on a range of values. The 'corner' case delays being \$t_{skew_{max}}\$ and \$t_{skew_{min}}\$

also I'm not sure but can I simplify it even further and subtract the small buffer before the clock of FF1 from the second clock buffer?

Your simplification is correct and no, don't move the buffer delay. You need it to calculate clock skew.

I would like to see a timing diagram and the process of creating it, and generally the method for solving these problems, since I understand circuits better when I'm given their timing diagrams.

Here is a simple timing diagram with a positive skew \$t_{skew}\$. The D_FF input denotes the inputs of the flip-flop and Q_FF its output. Q_FF1 changes after \$t_{cq_{FF1}}\$ and D_FF2 changes after \$t_{pd}\$.

waveform

Setup time constraint

Initially, I'll assume zero clock skew. To prevent setup violations, we need to ensure that the data launched from FF1 at clock edge 1 should arrive at FF2 (D_FF2) before it's clock edge 2 is triggered.

Data path delay = \$t_{cq_{FF1}} + t_{pd} + t_{setup_{FF2}}\$

Clock path delay = \$T_{clk}\$ (Since data is captured at clock edge 2)

Setup time constraint $$ T_{clk} \geq t_{cq_{FF1}} + t_{pd} + t_{setup_{FF2}} $$

Now, when there is a positive clock skew in the circuit, you are essentially pushing clock edge 2 of FF2 further by \$t_{skew}\$ (check waveform), and thus relaxing the constraint. So now the constraint becomes

$$ T_{clk}+t_{skew} \geq t_{cq_{FF1}} + t_{pd} + t_{setup_{FF2}} $$

Now to bring in the worst case scenarios for the inequality. The clock should assume the max possible data path delay. And the min possible clock path delay (or skew).

$$ min(T_{clk}+t_{skew}) \geq max(t_{cq_{FF1}} + t_{pd} + t_{setup_{FF2}}) $$

Hold time constraint

Hold violations at FF2 occur when the its input D_FF2 is not held constant for atleast \$t_{hold}\$ after clock edge 1. But at clock edge 1 we also have FF1 data being launched which will eventually propagate its way to D_FF2 and change its value. We should ensure that this propagation from FF1 to D_FF2 happens only after \$t_{hold}\$. $$ t_{cq_{FF1}} + t_{pd} \geq t_{hold_{FF2}} $$ When a positive skew is introduced, clock edge 1 of FF2 is being pushed by an additional \$t_{skew}\$ with respect FF1's clock edge. Data propagation from FF1 now needs to wait an additional \$t_{skew}\$ in addition to \$t_{hold}\$. The hold constraint becomes $$ t_{cq_{FF1}} + t_{pd} \geq t_{hold_{FF2}} + t_{skew} $$ Considering the worst case scenario $$ min(t_{cq_{FF1}} + t_{pd}) \geq max(t_{hold_{FF2}} + t_{skew}) $$

We need to determine if the t_hold and t_setup conditions are met with a positive skew of 1ns, so is it fair to say that when we look at the path from FF2 to FF1 the skew is actually -1 ns?

When data flow is from FF1 (launch FF) to FF2 (capture FF), skew is always defined as the difference between clock arrival at FF2 with respect to FF1 (\$t_{clk_{FF2}}-t_{clk_{FF1}}\$). Negative skew arises when the clock edge triggers at the capture FF before the launch FF.

\$\endgroup\$
10
  • \$\begingroup\$ thank you! I understand now the min/max timings, but still have a little difficulty understanding and visualizing your method of solving such questions. also, can you give your thoughts about what I've written from the last pic downwards? this too confuses me very much \$\endgroup\$
    – Nate3384
    Commented Nov 22 at 10:35
  • \$\begingroup\$ Could you be more specific as to what you do not understand? As to your second question on the last pic, could you post it as another question? \$\endgroup\$ Commented Nov 22 at 16:51
  • \$\begingroup\$ I plugged all the numbers and got the following (for the first pic): T_c >= to 11 (t_pcq of FF1) + 13 (t_pd of combinatorial which in this case is just the inverter) + 4 (t_setup of FF2) + (15-1) (here I added the difference between the max of the clock skew, since FF2 see the clock rise at most their difference, I can be wrong about this logic please correct me if so) so we get T_c >=42ns, as for the t_hold: 2 (t_hold of FF2) + (9-1) (the minimum relative clock skew) <=9 (t_ccq of FF1) + 8 (t_cd of the inverter) so I can just assume from this this circuit works while T_c >= 42ns? \$\endgroup\$
    – Nate3384
    Commented Nov 23 at 20:04
  • 1
    \$\begingroup\$ Yes, that's right! \$\endgroup\$ Commented Nov 27 at 16:46
  • 1
    \$\begingroup\$ thank you very much, your answer went into detail and helped me really grasp the concepts I asked for, I appreciate it \$\endgroup\$
    – Nate3384
    Commented Nov 27 at 17:57
0
\$\begingroup\$

Due to the NOT gate and the second non-inverting gate there are delays so the network is not synchronous. I present the timing diagrams for the case of low and high D input: enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.