Altera_Forum
Honored Contributor
15 years agoaltera_avalon_fifo_read_fifo() not behaving as documented
I dont know if this is the right forum, but I am using "On-Chip FIFO Memory Core" using SOPC builder. Everything is good, but the altera_avalon_fifo_read_fifo() is not only returning the data correctly. The first read returns the first part (first two bytes) of FIFO data prefixed by length of the packet. Is there a FIFO option I am missing?. The documentation states that it will return data from offset 0.
altera_avalon_fifo_read_fifo() Prototype: int altera_avalon_fifo_read_fifo(alt_u32 read_address, alt_u3 ctrl_address) Thread-safe: No. Available from ISR: No. Include: <altera_avalon_fifo_regs.h>, <altera_avalon_fifo_utils.h> Parameters: read_address—the base address of the FIFO read slave ctrl_address—the base address of the FIFO control slave Returns: Returns the data from address offset 0, or 0 if the FIFO is empty. Description: Gets the data addressed by read_address.