Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

Altera Avalon UART Speed Increase

Altera_Forum
Honored Contributor II
2,393 Views

Hi Everyone, 

 

I am currently using a nios ii cyclone 1 epc120 development fpga for an embedded application. At present I have the Altera Avalon UART set to a baud rate of 115200 within the SOPC builder.  

 

However, I need to increase this baud rate by at least a factor of 2. Does anyone know if this is possible using this FPGA? or do I need to upgrade to a different board? 

 

Cheers.
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
1,527 Views

Yes, you can change the baud rate in SOPC builder. You can also make it adjustable by the embedded software.

0 Kudos
Altera_Forum
Honored Contributor II
1,527 Views

Thanks for the reply. 

 

I know you can adjust the baud rate in SOPC builder but when I open the drop down box 115200 is the highest speed. Is there another way to increase this?
0 Kudos
Altera_Forum
Honored Contributor II
1,527 Views

1 -If you configure the UART such as to have a run-time programmable baud rate, you can program a divisor into the divisor register after power-up. See this document: 

http://www.altera.com/literature/hb/nios2/n2cpu_nii51010.pdf 

 

There are two other options I can think of which would obviously be unsupported: 

2 - Edit the "class.ptf" file found at "C:\altera\90\ip\altera\sopc_builder_ip\altera_avalon_uart". Look for this description for the baud combo box: 

COMBO baud { title = "Baud Rate (bps): "; id="baud"; values="115200,57600,38400,31250,28800,19200,14400,9600,4800,2400,1200,300"; editable = "1"; DATA { baud = "$"; } } 

 

Then obviously modify the values line to add your desired baud rate in there. I can't promise this is going to work. You may also have to modify the accompanying "em_uart.pl" perl script. Just do a search on baud in that file and you'll see where to modify it. 

 

3 - The final option is to generate your SoPC system with the undesired baud rate. Then hand modify the generated HDL file to change the divisor. There should be a line somewhere like "assign divisor_constant = X" where you would calculate and replace X with the correct divisor rate. 

 

Have fun, 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
1,527 Views

Awesome. Thanks Jake. Much appreciated.

0 Kudos
Reply