Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16606 Discussions

Asynchronous FIFO implementation (clock domain crossing)

Altera_Forum
Honored Contributor II
1,698 Views

Let's say I have a shift register (called system A) that is operating at a clock frequency of 3f. The output of system A is fed into another shift register, system B, that operates at a frequency of f. 

 

I want system B to read every 3rd output from system A. So do I even need to use any clock domain crossing systems such as an asynchronous FIFO or due to the unique nature of my problem (where I care about every 3rd output) can I just connect the two systems together? 

 

P.S. If you are wondering why I care about every 3rd output, it has to do with a RAM based implementation of a shift register in Quartus. 

 

Thanks!
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
890 Views

Hi, 

 

are the two clocks derived from a common source, e.g. by using one PLL with two different clock outputs? If so, you should be able to define a multicycle exception in your timing constraints, and let TimeQuest figure out whether that works or not. I have to admit I've never done that, though, but there are various articles about that specific problem, e.g. here: http://www.alterawiki.com/wiki/timing_constraints#multicycles (http://www.alterawiki.com/wiki/timing_constraints#multicycles), or in the TimeQuest Cookbook (https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/manual/mnl_timequest_cookbook.pdf). 

 

It's just a gut feeling, but even if you use a single PLL I'd rather use some phase shift between the two clocks, so that the launch and latch clock are well apart. 

 

If the two clocks come from different sources (e.g. a 25 MHz XO and a 75 MHz XO), the two clocks must be seen as asynchronous, and proper clock domain crossing synchronization is inevitable. 

 

I know that's not exactly your question, but the Altera MegaWizard offers asynchronous FIFOs (i.e. with separate clocks on either side), if you need synchronization. 

 

 

Best regards, 

GooGooCluster
0 Kudos
Altera_Forum
Honored Contributor II
890 Views

You can directly connect the A output to the B input if 3f and f clocks are synchronous, namely if they have a fixed and well defined phase relationship.

0 Kudos
Reply