--- Quote Start ---
Still based on the project I would like to do I have another question (and I am sure many more in a near future :o) ).
--- Quote End ---
Feel free to ask questions!
--- Quote Start ---
I have seen that to make the connection work with the host PC, it is necessary to have a C code to be run by the NiOS 2. My question is: if I have my Verilog module which generates data bits continuously and that I need to assemble them. Should I perform this operation via a piece of code in C or should it be described in Verilog? It is not clear to me what is performed at the hardware level and at the software level.
--- Quote End ---
The hardware will always be able to perform more operations per clock cycle than software, so you want to use the hardware to create blocks of data that software can then handle.
For example, lets say you decide you want to send data in 4kB blocks to your processing logic. Your logic that generates a bit per clock cycle can pack bits into bytes, and then write those bytes into a memory block. When the 4kB packet is ready, it can interrupt the processor. The hardware can then write to a different 4kB memory. The processor than has 4k clocks to remove the data from the memory before the hardware needs it again. The processor interrupt service routine can be used to schedule a task which creates a UDP packet, and then copies (via DMA) the 4kB payload your logic just created. As you work with the design, you may find you can optimize, by creating the UDP packet 'in place'. Once the UDP packet is ready, it can be given to the TSE interface to be transported.
Since you are just beginning, my advice is to attach the problem one small piece at a time.
1) Get your bit generation logic working.
2) Create some simple NIOS II projects and understand how to write code, use the IDE, and handle interrupts.
3) Write some UDP code on a Linux machine or Windows machine. Send data between two machines.
4) Look at the NIOS II UDP examples, simple socket server examples, etc. Once you understand them, modify them.
5) Once you understand all the pieces, then assemble them into the system described above.
Cheers,
Dave