Forum Discussion
Altera_Forum
Honored Contributor
12 years agoQsys - Nios write to FIFO
Hello, In my design project, Nios needs to write to an external FIFO. I created a custom Avalon MM component for the purpose. When Nios write to the custom component, the design expects to see the...
Altera_Forum
Honored Contributor
12 years agoThank you, Daixiwen, for the reply. I thought I was writing to the correct address. But, since you asked, I am not positive any more. Something weird happens in EDS software side that I cannot explain.
In my design, the base address of the out_fifo interface is defined as "#define OUT_FIFO_AVALON_INTERFACE_0_BASE 0x5060" in system.h. The data is byte wide. Therefore in sending the data to fifo, "*out_fifo=0xaa;" is used: where out_fifo is defined by "#define out_fifo (unsigned char *) OUT_FIFO_AVALON_INTERFACE_0_BASE". I think this part is probably okay. The weird thing I am having on EDS is about symbol resolution. Even though OUT_FIFO_AVALON_INTERFACE_0_BASE is defined in system.h and the application c file does include the system.h file, EDS says "Symbol 'OUT_FIFO_AVALON_INTERFACE_0_BASE' could not be resolved". To keep going, I define out_fifo by "#define out_fifo (unsigned char *) 0x5060" in the local app file. In the same app file, the app program refer to other symbols defined in system.h without problems. I have not been able to figure out what is going on yet. Have you seen anything like that? Thanks