cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
442 Views
Registered: ‎07-23-2019

Increase FIFO size of Uartlite

Jump to solution

Hello,

The defult size of the UARTLite in Vivado is 16 bytes.

Does someone understand why did they choose to make the FIFO size small?

Is there anyway to increase the FIFO size, has someone succeedded and uses the altered uartlite driver in the SDK?

Thanks.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Scholar
Scholar
384 Views
Registered: ‎04-26-2015

Re: Increase FIFO size of Uartlite

Jump to solution

I would assume that it's 16 bytes because that's how big the 16550 UART buffer is - and people have been using those for decades without problems.

 

As has been said above, UARTs are not fast. At 115200bps (about the maximum you'd normally use), 16 bytes = 160 bits (8 data bits plus start/stop bits) = 1.38ms. A long time, for a CPU.

View solution in original post

7 Replies
Highlighted
Teacher
Teacher
426 Views
Registered: ‎07-09-2009

Re: Increase FIFO size of Uartlite

Jump to solution
At the VERY slow speed RS232 happens, and the much higher speed the processor works at, 16 characters of RS232 is probably billions of CPU instructions,

even allowing for slow interrupts, why you would want a bigger fifo in the UART? It seems just a waste of silicon.



<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
Highlighted
Scholar
Scholar
418 Views
Registered: ‎08-07-2014

Re: Increase FIFO size of Uartlite

Jump to solution

mijal.kilimajerq@controp.com,

as stated above, 2 bytes is good enough. The read side of the FIFO in  most cases is many times faster than the UART baud rate.

--------------------------------------------------------------------------------------------------------
FPGA enthusiast!
All PMs will be ignored
--------------------------------------------------------------------------------------------------------
0 Kudos
Highlighted
Scholar
Scholar
385 Views
Registered: ‎04-26-2015

Re: Increase FIFO size of Uartlite

Jump to solution

I would assume that it's 16 bytes because that's how big the 16550 UART buffer is - and people have been using those for decades without problems.

 

As has been said above, UARTs are not fast. At 115200bps (about the maximum you'd normally use), 16 bytes = 160 bits (8 data bits plus start/stop bits) = 1.38ms. A long time, for a CPU.

View solution in original post

Highlighted
270 Views
Registered: ‎07-23-2019

Re: Increase FIFO size of Uartlite

Jump to solution

Thank you all for your kind answer.

I have a unit that sends 128 bytes periodically every 20ms. I've managed to read all the bytes every 20ms. What I cannot understand is that if the size of the uarlite FIFO is 16, where are the remaining bytes stored? Aren't the bytes sent all at once, and the size of FIFO is 16? So where does it hold all the bytes?

The baud rate is 115200, unit issues packets of 128 bytes every 20ms.

 

0 Kudos
Highlighted
262 Views
Registered: ‎07-23-2019

Re: Increase FIFO size of Uartlite

Jump to solution
I forgot to mention that I use the polling method.
0 Kudos
Highlighted
Teacher
Teacher
219 Views
Registered: ‎07-09-2009

Re: Increase FIFO size of Uartlite

Jump to solution
how often do you poll ?
Once you recognise there is data there, every 100 us or so, another byte is going to be present,
I'm betting your polling faster than that, and your moving the data form the fifo before it has a chance to get full.

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
187 Views
Registered: ‎07-23-2019

Re: Increase FIFO size of Uartlite

Jump to solution

@drjohnsmith you are right!!

I poll every 0.5 ms and it makes sense now why I am able to read all the bytes.

Thanks!