cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
conanandai100
Explorer
Explorer
5,193 Views
Registered: ‎12-01-2010

how to achieve cross clock domain design

Jump to solution

Hi, all. When I work on my project, I find a problem as follow.

My DDR3 app port is 200 MHz and another memory controller is 100 MHz. There is a DMA between the DDR3 and the controller. I once think that I can use 200 MHz for the DMA design. But the interface between DMA and the controller is not that easy to be done. Especially the timing when sending and receive data and cmd.

I've search the forum for the same thread but not found.

Is there any advice?

Thanks.

0 Kudos
1 Solution

Accepted Solutions
awillen
Mentor
Mentor
6,544 Views
Registered: ‎11-29-2007

Since I use the DCM, 100MHz and the 200MHz circuits are from the same source.

Excellent, then you don't really have completely asynchronous clock domains. In fact, the 200MHz side can treat the 100MHz signals as if they were in the same domain, with the clock disabled every second cycle.

 

Use clock enables and you will be fine.



Please google your question before asking it.
If someone answers your question, mark the post with "Accept as solution". If you see a particularly good and informative post, consider giving it Kudos (the star on the left).

View solution in original post

0 Kudos
5 Replies
conanandai100
Explorer
Explorer
5,191 Views
Registered: ‎12-01-2010

I don't think FIFO can solve the problem as there is not only data but also cmd. 

And the whole design will call for too many FIFOs.

As the DMA has a BRAM for caching, things sounds more complex.

I wonder if I have to unit the system clock into 100 MHz. The only problem is that the controller is written by others, not me.

0 Kudos
awillen
Mentor
Mentor
5,179 Views
Registered: ‎11-29-2007

I don't think FIFO can solve the problem as there is not only data but also cmd.

"cmd" ist also just bits and bytes, so where is the problem? You can use several FIFOs crossing the same clock domains, just remember that two words which you push in the same cycle don't necessarily arrive at the same time.


Alternatively, you can clock the 100MHz and the 200MHz circuits from the same source. Is that feasible in your case?



Please google your question before asking it.
If someone answers your question, mark the post with "Accept as solution". If you see a particularly good and informative post, consider giving it Kudos (the star on the left).
0 Kudos
conanandai100
Explorer
Explorer
5,164 Views
Registered: ‎12-01-2010

Thanks for your reply.

Yes, the cmd is also bytes. I didn't say it clearly. What I worry about is the interface signals. 

For instance, the controller and DMA need to shockhand when sending and receiving cmd. Here comes the problem.

As the clock frequences are different, I has to keep the signal for two cycles from the DMA to the controller. Otherwise, the controller cannot receive it. That's the problem.

Also, when the controller sends a cmd with 100 MHz, and DMA receives it with 200MHz, it seems to get two same data.

I wonder if I describe the problem I met clearly.

 

Since I use the DCM, 100MHz and the 200MHz circuits are from the same source.

0 Kudos
awillen
Mentor
Mentor
6,545 Views
Registered: ‎11-29-2007

Since I use the DCM, 100MHz and the 200MHz circuits are from the same source.

Excellent, then you don't really have completely asynchronous clock domains. In fact, the 200MHz side can treat the 100MHz signals as if they were in the same domain, with the clock disabled every second cycle.

 

Use clock enables and you will be fine.



Please google your question before asking it.
If someone answers your question, mark the post with "Accept as solution". If you see a particularly good and informative post, consider giving it Kudos (the star on the left).

View solution in original post

0 Kudos
conanandai100
Explorer
Explorer
5,119 Views
Registered: ‎12-01-2010

Thank you for your quick reply.

I will search for the asynchronous clock domains related topic and see if I can solve the problem by myself.

Anyway, thanks again.

0 Kudos