Forum Discussion
altera_avalon_fifo_write_ienable IE_ALMOSTFULL
- 2 years ago
No, you don't understand.
I obviously read the documentation and that's where I got the names IE_FULL, etc.
Then I wrote some C code:
status = altera_avalon_fifo_write_ienable(IPMB_0_FIFO_IN_CSR_BASE, IE_FULL | IE_ALMOSTFULL);
And tried to compile it, and it errors saying IE_FULL (and friends) are not defined.
grepping the hal_bsp directory reveals those names are not defined anywhere.
But that was 5 days ago.
The correct answer is:
#include "altera_avalon_fifo_regs.h"
Use:
ALTERA_AVALON_FIFO_IENABLE_F_MSK
ALTERA_AVALON_FIFO_IENABLE_AF_MSK
etc.
But the real real correct answer is:
You cant call altera_avalon_fifo_write_ienable() function after altera_avalon_fifo_init(). Instead, pass the ienable flags you want as the second parameter of altera_avalon_fifo_init().
-Andy
Hi,
Here are the descriptions:
IE_FULL Enables an interrupt if the FIFO is currently full. 0 IE_EMPTY Enables an interrupt if the FIFO is currently empty.
IE_ALMOSTFULL Enables an interrupt if the fill level of the FIFO is greater than the value of the almostfull register.
Reference:
https://www.intel.com/content/www/us/en/docs/programmable/683130/23-4/software-control.html
- andy252 years ago
Occasional Contributor
No, you don't understand.
I obviously read the documentation and that's where I got the names IE_FULL, etc.
Then I wrote some C code:
status = altera_avalon_fifo_write_ienable(IPMB_0_FIFO_IN_CSR_BASE, IE_FULL | IE_ALMOSTFULL);
And tried to compile it, and it errors saying IE_FULL (and friends) are not defined.
grepping the hal_bsp directory reveals those names are not defined anywhere.
But that was 5 days ago.
The correct answer is:
#include "altera_avalon_fifo_regs.h"
Use:
ALTERA_AVALON_FIFO_IENABLE_F_MSK
ALTERA_AVALON_FIFO_IENABLE_AF_MSK
etc.
But the real real correct answer is:
You cant call altera_avalon_fifo_write_ienable() function after altera_avalon_fifo_init(). Instead, pass the ienable flags you want as the second parameter of altera_avalon_fifo_init().
-Andy