andy25
Occasional Contributor
2 years agoNios V, FIFO 8 bit width, altera_avalon_fifo_read_level
I have a project built in 22.1 Standard, that has a fifo with an 8 bit width:
I can read from my Nios V using the altera_avalon_fifo_read_level function, 1 byte at a time. Each time I call it the level drops by 1. It works as expected.
After I rebuild the project in 23.1 Standard, the altera_avalon_fifo_read_level function now reads 4 items at a time and returns a 32 bit int. The level drops by 4 each call.
There is a warning saying Nios II only supports 32-bit, and that you'll need to "access the registers directly". I don't know what that means.
I tried:
int sample = IORD_8DIRECT(IPMB_FIFO_OUT_BASE, ALTERA_AVALON_FIFO_DATA_REG);
While it returns 1 byte it also drops the level by 4.
How do I make 23.1 work like 22.1?
-Andy