Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

D flip-flop simulation problem

Status
Not open for further replies.

yann_sun

Member level 1
Member level 1
Joined
Jul 17, 2006
Messages
38
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,530
Hi,

I run some simulations on a D flip-flop.
If input signal D changes at the active edge of CLK of the DFF, it's obvious that output will delay a cycle.
But when D and CLK separately connects to a IO pad whose delay is 1ns, I get a different result that output Q follows input D without any delay.
Could you please explain why it happens and what I should do if I want the one-cycle-delay output? Many thanks.
 

I'm not sure if this called ""race condition".
The simulator doesn't know which one should be execute first since they are at the same time stick.

Back to your question, since the D and CLK are pass through IO pad and there are delay for both signals.
Which one is arrived first ? D or CLK ?

If the D is arrived first, the CLK will sample this D and output the signals as the same as input.
However, if the CLK is arrived first, the CLK will sample the previous D and output the signals which is the old D.

Basically, this type of modeling will cause such problem since in real case this is called setup time violation.
This also means that your original modeling is improper so it's better to change it as my thought.
 

which simulation tool r u using? u must use a real time simulator for eg the post route simulation mode in xilinx to observe delays in ur simulations
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top