Altera_Forum
Honored Contributor
20 years agoHelp writing c code for NiosII_Stratix II_2s60
Hi at all! This is my first post.
I would like to have some advice to write the c code for my thesis. I have to use a NiosII_Stratix II_2s60. I have started from the example present in kits/nios2_51/examples/vhdl/niosII_StratixII_2s60. I've added in the project a 32bits counter (up counter) and a FIFO with this features: 32bits x 32768 words, almost full at 32000, almost empty < 1000). The counter is connected to FIFO and sends repeatedly bits to fill the FIFO that is connected to Nios. The FIFO is connected to NIOS through 3 ortogonal node that connect q[31..0] present in FIFO to in_pio3[7..0] present in Nios, the signal almost_full of FIFO is connected to in_pio1[7..0] present in Nios and the signal almost_empty of FIFO is connected to in_pio2[7..0] of Nios. The port q[31..0] of the counter is connected to data[31..0] of the FIFO. Starting from the simple socket server, using a lwip, i have to write a code for my project. The counter must sends bits continuously to FIFO but the counter must stops when the FIFO is almost full and when the FIFO is almost full the baud rate must be reduced. When the FIFO returns almost_empty the counter must restarts. How can i write this code? Could you give me some advice? Please help me to write this c code. Every advice is good for me. Thank you very much Greatings