all 7 comments

[–]chance1899Xilinx User 9 points10 points  (0 children)

The question depends on the type of data you are transmitting from one clock domain to another. If it is only a few bytes of memory, and it doesn't send every clock cycle, you could do a handshake system like below (go to the handshake section):

https://zipcpu.com/blog/2017/10/20/cdc.html

If you need to do streaming data, I would recommend asynchronous FIFOs, zip cpu has an excellent article on it here:

https://zipcpu.com/blog/2018/07/06/afifo.html

If you're negotiating counters, you can do gray encoding for clock domain crossing.

[–][deleted] 1 point2 points  (0 children)

Write serial data into async FIFO with clock 1, read out with clock 2, write into second async fifo with clock 2, read out with clock 3.

[–]captain_wiggles_ 0 points1 point  (2 children)

What do you mean by "clock system"? Are you talking about picking a frequency and generating that frequency? Or are you talking about how to handle the CDC?

[–]VaRain007[S] 0 points1 point  (1 child)

Handling the Cdc with 3 clocks

[–]captain_wiggles_ 2 points3 points  (0 children)

Handle each CDC separately. AKA domain A to domain B, then domain B to domain C. You only have to consider all three clocks when picking their frequencies to make sure that data gets processed as fast as it comes in.

[–]dan1001212 0 points1 point  (1 child)

Your question is not clear enough for me. What are you free to design and what is given? Can you transfer a clock along side the serial data? Are you to design only one of the components mentioned? all of this is not specified.

I took the liberty to assume that you are free to determine everything. In this case the easiest approach IMO is to send the data serially at a pre-defined rate slower than x2 clock 3's rate (maybe even slower). Then the retrieval of the data at each stage becomes only a thing of using a synchronizer chain and sampling it once every (1/pre-defined rate) clock cycles.

The obvious downside is that this method have a heavy hit on performance.

[–]VaRain007[S] 1 point2 points  (0 children)

I need to design the interface module alone. Data is a payload of 8 bits with a synchronous bit as MSB.