Currently working with Quartus 9.1 and will later move to latest.
Need a Uart with FIFOs and found this:
http://www.alterawiki.com/wiki/fifoed_avalon_uart Grabbed this from the above link:
Got a basic tx working in no time simply writing the tx reg at offset 1 with test byte 0xA1 as here:
IOWR(FIFOED_AVALON_UART_0_BASE, 1, 0xA1);
Installed a loopback to the receive and then writing same data and looking then for it to
be in the receive buffers. 6 is the offset for "uartrxfifoused" which should be number of chars
in receive FIFO.
read_val = IORD(FIFOED_AVALON_UART_0_BASE, 6);
...however read_val is always 0.
I also looked at the status reg and bit 7 (RRDY=receive character ready) is also always 0.
The status reg is sometimes 0x60 and sometimes 0x40 but bit 7 is always 0.
I saw this particular question in a past post and it never got an answer.
Seems there were quite a few issues folks were having so perhaps this module is not recommended.
From the defaults, in SOPC, I change only the baud to 9600 and include rx and tx buffers both 256 deep.
Thanks, all.
Cos