+ Post New Thread
Results 1 to 10 of 10

11th March 2019, 19:39 #1
 Join Date
 Dec 2014
 Posts
 172
 Helped
 3 / 3
 Points
 1,560
 Level
 9
Clock domain crossing problem
This is an interview question I found:
I have three clock domains A, B and C.
I have some data coming from clock domain A and clock domain B.
I want to do some combinational operation and send the resulting data to clock domain C.
How can I do this?

11th March 2019, 19:46 #2
 Join Date
 Apr 2016
 Posts
 1,610
 Helped
 277 / 277
 Points
 7,604
 Level
 20
Re: Clock domain crossing problem
Why not simple synchronizers?
Really, I am not Sam.

Advertisment

11th March 2019, 19:50 #3
 Join Date
 Dec 2014
 Posts
 172
 Helped
 3 / 3
 Points
 1,560
 Level
 9

11th March 2019, 20:10 #4
Awards:
 Join Date
 Apr 2014
 Posts
 14,505
 Helped
 3299 / 3299
 Points
 70,890
 Level
 64
Re: Clock domain crossing problem
Hi,
This is how I´d do it.
In detail it depends on signal timings and clock frequencies.
Example:
It will fail if signal A is a 100ns pulse and Clock_C frequency is 1MHz (1000ns).
It will work when signal A is a 1000ns pulse while Clock_C frequency is 10MHz (100ns).
KlausPlease don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.

Advertisment

11th March 2019, 20:26 #5
 Join Date
 May 2018
 Posts
 37
 Helped
 3 / 3
 Points
 315
 Level
 3
Re: Clock domain crossing problem
1. You cannot simply synchronize data from clock domain A and B to clock domain C and then perform the combinational operation. This will result in classic problem of reconvergence. With synchronizers you cannot guarantee that data will be sampled in 2 clock cycles (assuming double flops for synchronizers). There can be delay. Hence, when output of 2 synchronizers reconverge at a combinational logic, you cannot guarantee that it is functionally correct.
2. Because of #1, you will have to sample data from clock domain A to clock domain B (i.e add synchronizer from A>B), then perform combinational logic operation. Now one more problems arise. You cannot simply synchronize data of combinational logic to clock domain C. Combinational logic in front of synchronizer might result in glitch to be sampled (again functional problem)
3. Because of #2, you will have to add a flop to output of combinational logic (clock of course from B). Now you are good to add synchronizer to move to clock domain C.
Let me know if you have any more questions.
1 members found this post helpful.

11th March 2019, 23:17 #6
 Join Date
 Apr 2016
 Posts
 1,610
 Helped
 277 / 277
 Points
 7,604
 Level
 20

12th March 2019, 03:35 #7
 Join Date
 May 2018
 Posts
 37
 Helped
 3 / 3
 Points
 315
 Level
 3

12th March 2019, 08:57 #8
 Join Date
 Dec 2014
 Posts
 172
 Helped
 3 / 3
 Points
 1,560
 Level
 9

Advertisment

13th March 2019, 09:07 #9
 Join Date
 Feb 2014
 Posts
 93
 Helped
 1 / 1
 Points
 1,333
 Level
 8

14th March 2019, 19:45 #10
 Join Date
 May 2018
 Posts
 37
 Helped
 3 / 3
 Points
 315
 Level
 3
+ Post New Thread
Please login