Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

UART with FIFO Buffer

Altera_Forum
Honored Contributor II
5,638 Views

Need to use UART with FIFO Buffer in SOPC Builder Nios II System: 

 

1> The UART RS232 available in SOPC are without FIFO is it possible to add FIFO by modifying the same UART core 

2> If not is there any other SOPC ready UART_FIFO core available as free IP 

3> If not is it possible to get estimate of 

- LE utilization without Modem Control logic 

- Is it necessary to write device driver for the same  

- Apprx how much design time it will take to  

design HDL UART, device driver for a single person? 

 

Please advice asap. running short of time. 

 

Thanks in Advance
0 Kudos
27 Replies
Altera_Forum
Honored Contributor II
566 Views

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/dry.gif what&#39;s wronged in this C file? 

 

I&#39;m using FIFOed_avalon_uart Opencore 

 

I can&#39;t transmit throught RS232 with this code using instruction 

 

fifoed_avalon_uart_write(fp,byte/*Tx Pointer*/,25344); 

 

(UART&#39;s light is always swithced off) 

 

FILE* fp; 

fp = fopen ("/dev/fifoed_avalon_uart_0", "w+"); // Read && Write 

int ret; 

if (fp!=NULL) 

printf("\nOpen file"); 

ret = fflush(fp); 

if(ret==0) 

printf("\nFlushed file"); 

else 

printf("\nNot flushed file"); 

 

//Polling 

 

int j=0,k=0,z=0,controllo; 

k=((ctrl/4)*(multi)); 

z=((ctrl/4)*(multi+1))-1; 

 

for(j=k ;j<z; j++) 

//fprintf(fp,"%x",byte[j]); 

check=fifoed_avalon_uart_write(fp,byte/*Puntatore dati da Tx*/,25344);  

 

but it seems i can transmit using (UART&#39;s light is switched on during TX) 

 

fprintf(fp,"%x",byte[j]); 

 

...anyway, the received bytes don&#39;t seems the ones transmitted....What&#39;s up? 

 

Thanks http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif
0 Kudos
Altera_Forum
Honored Contributor II
566 Views

Hi, 

 

does this IP still exist ? where can i find it ? 

 

thanks.
0 Kudos
Altera_Forum
Honored Contributor II
566 Views

If you need an UART with buffers, you can try YANU Uart from opencores. Its interface is compliant to Altera Avalon Interfaces and, as I remember, is supported in U-Boot (if you need a bootloader, too).

0 Kudos
Altera_Forum
Honored Contributor II
566 Views

thanks ! I was searching the altera one for the sopc compatibility but yanu ip seems to have the same purpose. I will try it as soon as possible.

0 Kudos
Altera_Forum
Honored Contributor II
566 Views

I use this IP instead : 

http://www.alterawiki.com/wiki/fifoed_avalon_uart 

it is based on altera_avalon_uart and is sopc ready. very fast to implement !!
0 Kudos
Altera_Forum
Honored Contributor II
566 Views

Hi 

 

I'm having issues with the fifoed avalon uart; I think it is a software issue but I am not sure. 

I previously posted here 

http://www.alteraforum.com/forum/sho...721#post181721 

 

thanks.
0 Kudos
Altera_Forum
Honored Contributor II
566 Views

Hey fates would you mind explaining how you got it to work? 

 

I'm not having much luck with my own attempts.
0 Kudos
Reply