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

how to set those parameters of clock crossing bridge?

ZhiqiangLiang
New Contributor I
1,065 Views

Hi,

 

My FPGA model is Cyclone 10 LP 10CL120YF484.

on Platform Designer, NIOS frequency is 80MHz, and my IP is 160MHz.

In NIOS C code, I would like to read/write registers  of my IP.

In my design, I would like to add a Avalon-MM Clock Crossing Bridge between NIOS and my IP.

The questions are:

1) what do those parameters mean in Avalon-MM Clock Crossing Bridge setting?

2) in my design(NIOS 80MHz, IP 160MHz), how to set those parameters?

 

If no parameters can make my design work, what NIOS frequency should I set?

 

ZhiqiangLiang_0-1748964443784.png

 

Labels (1)
0 Kudos
1 Solution
KennyTan_Altera
Moderator
914 Views

I reviewed some diagrams on the website, and based on what I saw, option 2 is actually the correct setup. The diagrams clearly indicate that option 2 is the proper way to connect.


https://www.intel.com/content/www/us/en/docs/programmable/683364/18-1/mm-clock-crossing-bridge-example.html


View solution in original post

0 Kudos
9 Replies
KennyTan_Altera
Moderator
1,013 Views

To connect your 80 MHz Nios to a 160 MHz IP, the Avalon-MM Clock Crossing Bridge should be the right solution and should work without changing your CPU frequency. The bridge safely manages data transfers between clock domains using FIFO buffers and synchronizers.

Key settings that you can try out:

  • FIFO Depth: Start with 8–32 based on expected traffic.
  • Synchronization Depth: 2 is standard and usually sufficient.
  • Data Width: Match your system’s width (typically 32 bits for Nios and many IPs).
  • Symbol Width: Usually set to 8 (1 byte per symbol).
  • Burst Size: Set based on whether your IP supports burst transfers; otherwise use 1.
  • Command/Response FIFO Depth: Larger values help if there's a lot of traffic or delay between domains.

In your case, the bridge should be configured with the Nios side as the master clock domain and the IP side as the slave. There's no need to increase Nios frequency—80 MHz is perfectly acceptable for this setup.

If performance issues arise, consider tuning FIFO depths or optimizing memory access patterns rather than increasing the processor clock.


Let me know if you have more question.


0 Kudos
ZhiqiangLiang
New Contributor I
1,006 Views

@KennyTan_Altera 

 

Thank you! your explanation is very clear.

Your comments;

the bridge should be configured with the Nios side as the master clock domain and the IP side as the slave.

 

In my designed, I tried to connect master and slave of Clock Bridge reversed, but it can be run correctly. 

so I got confused. how should I connect master and slave.

solution 1: Clock Bridge master <---> NIOS and Clock Bridge slave <--> my IP.

solution 2: Clock Bridge master <---> my IP and Clock Bridge slave <--> NIOS.

 

ZhiqiangLiang_0-1749008495077.png

 

0 Kudos
KennyTan_Altera
Moderator
968 Views

When using an Avalon-MM Clock Crossing Bridge between an 80 MHz NIOS and a 160 MHz IP, connect the bridge’s master port to NIOS (the Avalon-MM master) and the slave port to the IP (the Avalon-MM slave). This ensures proper data flow and safe clock domain crossing. Reversing the connection may seem to work but can cause unreliable behavior. Always connect based on which side initiates the transactions.


0 Kudos
ZhiqiangLiang
New Contributor I
944 Views

@KennyTan_Altera 

Thank you!

 

solution 1: Clock Bridge master <---> NIOS and Clock Bridge slave <--> my IP.

solution 2: Clock Bridge master <---> my IP and Clock Bridge slave <--> NIOS.

 

At present,  I really use solution 2 which is proved to be able to be run correctly in FPGA. 

That is why I asked the question again, and ask your conformation.

more information:

NIOS is 80MHz, and my IP is 160MHz.

NIOS will use the bus to write and read register in my IP. so, NIOS should be master and should be the one who initiates the transactions,right?

 

Are you sure I should choose solution 1 mentioned above?

 

0 Kudos
KennyTan_Altera
Moderator
915 Views

I reviewed some diagrams on the website, and based on what I saw, option 2 is actually the correct setup. The diagrams clearly indicate that option 2 is the proper way to connect.


https://www.intel.com/content/www/us/en/docs/programmable/683364/18-1/mm-clock-crossing-bridge-example.html


0 Kudos
ZhiqiangLiang
New Contributor I
911 Views

@KennyTan_Altera 

Thank you!

according to the link you pasted above. your comments "connect the bridge’s master port to NIOS (the Avalon-MM master) and the slave port to the IP (the Avalon-MM slave)" is not correct, right?

0 Kudos
KennyTan_Altera
Moderator
790 Views

That is correct, I think In Platform Designer, connections are typically restricted to slave-to-master and master-to-slave configurations, rather than allowing master-to-master connections.




0 Kudos
ZhiqiangLiang
New Contributor I
789 Views

@KennyTan_Altera 

I got it. Thank you!

0 Kudos
KennyTan_Altera
Moderator
707 Views

I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, Please login to ‘https://supporttickets.intel.com/s/?language=en_US’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.



0 Kudos
Reply