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.

two different clocks .. .. solve it plzz

Status
Not open for further replies.

shiv_emf

Advanced Member level 2
Joined
Aug 31, 2005
Messages
605
Helped
22
Reputation
44
Reaction score
6
Trophy points
1,298
Activity points
4,106
We have One Flip flop with Clock(Clk1) and another Flip flop with Clk2) now data is passing from one Flip flop to another i.e., ff1 to ff2
If clk1>clk2 then there is chance of data getting lost
If clk<clk2 then my data will be repeating.

so wht shud be ideal soln ?? clk1 n clk2 can be any frequency !!
 

if clk1 > clk2, you must use async fifo to solve it.
if clk1 < clk2, you can add some handshake signals to void data repeating.
 

    shiv_emf

    Points: 2
    Helpful Answer Positive Rating
can u provide some more info .. regarding async fifo!!
 

Shiv your requirements are too vague. The solution provided is also vague and incomplete until the specifications are fully understood. In general, when we try and interface signals between two clock domain there are three possible ways to do it correctly:
1. have synchronizers to take care of metastability issue (a pair/triplet of flops in series clocked with receiving clocks)
2. replace the protocol with req/ack protocol to ensure you've sampled it only as much as the design requires
3. asynch fifos when the number of signals to be transmitted is a large group of similar data wires

do you understand why we shouldn't directly interface two flops clocked with different clocks and start using the data at the output of the second flop?
 

do you understand why we shouldn't directly interface two flops clocked with different clocks and start using the data at the output of the second flop?


Tell us about it..
 

Switching of a signal in clock domain A may seem to be asynchronous at the input of the flop clocked by clock B. This may potentially violate both setup and hold time of the second flop resulting in a metastable state of the sequential node
 

darylz said:
if clk1 > clk2, you must use async fifo to solve it.
if clk1 < clk2, you can add some handshake signals to void data repeating.

how many bits do you need in your async fifo? it may full in some day.
 

If the two clocks are relative i.e clock1 = 1/2clock2 or 1/4clock2 or 1/8clock2 then handshaking can be used or else there needs to be much control on the handshaking using some metastable flip flops.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top