--- Quote Start ---
It's just a means-to-an-end, the main task is related with the polynomial coefficients (generating primitive polynomials), but my teacher said that in the future(on the masters degree project) I would need asynchronous data transfer and the USB-blaster has some problems with it (is this true?, I guess UART is all about asynchronous data transfer so if the USB blaster supports it...), so it seems the connection is *part* of the project (but if i can't get it to work then I will probably consider your idea).
--- Quote End ---
I have not had any major issues with using the USB-Blaster as shown in the tutorial.
--- Quote Start ---
a) This is correct, it is in fact a FTDI FT232BM on the board. I downloaded the VCP(com port) driver from the ftdi site but my PC can't seem to see the device(this is why I thought that maybe i would have to supply power to it), don't know if it's broken for some reason, will try to find out.
b) It says that the board supports 3.3V and 5V
--- Quote End ---
What is the part number of the board? I'll take a look for you.
--- Quote Start ---
If I understand correctly, the idea is to use the NIOS II processor on the de-0 nano but this would be impossible as I MUST use VHDL in this project (unless the NIOS is only used to connect the gpio pins to the inputs of my vhdl symbol).
--- Quote End ---
Look at the block diagram on the tutorial link above.
Your coefficients block and logic would be implemented in VHDL. The control interface to that logic could either be via an Avalon-MM slave interface, i.e., it would be a slave in the block diagram like the SRAM and PIO blocks. You could also create an interface, where the PIO blocks are used to transfer the coefficients, or using dual-ported SRAM, you write the coefficients to SRAM, and then you write to a PIO to tell your logic the coefficients are 'ready', and it goes and reads them. This latter idea eliminates you having to understand how to create an Avalon-MM component - you just need to write a state machine to read from SRAM. Regardless of what you want to do, you will be able to get help here on the forum.
--- Quote Start ---
This also rises another question I had, if I somehow correctly connected the boards, what type of data would I receive on the de-0 nano(rs232-how do I then convert this to std_logic_vector which I use in the logic for example)? For example if what kind of data would I need to send from the c++ program(int, char, coefficients are 0,1,2)? Does this even depend on the de-0 or on the ftdi controller? Again forgive my low knowledge about this subject(I thought it would be enough to connect the GPIO pins in a BDF file to the symbol block in quartus).
--- Quote End ---
This is why I suggested using the tried-and-tested USB-Blaster route :)
If you use a NIOS II processor plus UART, then you have to do less work. The FTDI device is a USB-to-Serial (or USB-to-UART) which takes bytes you write to the serial port driver (whatever you type into Hyperterminal, or a buffer you pass to write()) and serializes them as 8-bits, no parity, 1 stop bit at 115k2 baud (or whatever you configure your FTDI device to transmit). The UART in your NIOS II system gets configured to expect that same data. As every byte is received over the USB-to-UART interface, the UART buffers it, and generates an interrupt to your NIOS II processor. You then read that data and use software to parse it. What gets sent over the serial port is up to your software.
For example, I use this very simple ASCII protocol
r <addr>\n
w <addr> <data>\n
where <addr> and <data> are hex values.
I can run hyper-terminal on my PC and talk to a DE0-nano using a C232HM (an FT232H) cable.
In my case, I have coded the UART interface entirely in VHDL, and implemented a UART-to-Avalon-MM master. I could give you the code, but that would spoil the learning process for you. So if you want to go the "interface-entirely-in-VHDL" route, then I can provide help when you get stuck.
--- Quote Start ---
Thanks a lot for the help, the first post was very informative and you were kind enough answer the questions about my idea(even though it might not be, as you stated, the most efficient one).
--- Quote End ---
Take my advice and follow this philosophy:
"Get it working, then get it right"
which is to say, take the easy way out (minimum time/effort solution) whenever you can, until you get the entire system working.
For example, you have a design goal, with the primary task of getting the logic that uses your coefficients working. Is that logic finished? If not, don't fall into the trap of spending a lot of time learning how to implement the communications interface. You may waste valuable time on that task, without realizing you have a bigger problem in the coefficients logic.
Take the time now to go through the USB-Blaster tutorial. Add your logic and control it with the PIO blocks, eg., 8-bits data and a couple of control bits to indicate coefficient updates etc.
Get that working - even if its clunky or slow, it still works.
Then go back and optimize. We can talk about the RS232 interface in VHDL at that time.
Cheers,
Dave