Forum Discussion
Altera_Forum
Honored Contributor
11 years ago --- Quote Start --- Go through a NIOS II tutorial and create a "Hello World!" example. Have that example send data to a regular UART, and connect your FTDI interface to those pins. At that point you have a communications channel between your FPGA NIOS II processor, and your PC. Modify the NIOS II code so that it receives commands or data over the serial port, and then processes that data, eg., write to memory or read from memory. Write some MATLAB code to create and send the serial commands to the NIOS II processor, and then parse the response. Once you have the ability to write and read FPGA memory from MATLAB, you can then modify your FPGA code to add custom logic, eg., an FFT, and then you can send data to memory, program a DMA controller to stream it to the FFT, and stream the result back to memory, and once the FFT completes, you can read the destination memory from MATLAB and compare the result to the FFT model. Cheers, Dave --- Quote End --- Hi Dave, Thank you. I managed to get the hello world example working. I have two questions in mind: I got data from fpga to my Nios processor where I can display the values on the Terminal window in Altera Monitor Program, I am thinking that I can save these data in sdram or a file and plot these data directly from Nios in pc, why do I still need the uart? forgive my poor understanding, i know this is definitely a newbie question, please forgive The second question is , i just want to plot graph to Matlab, does it mean I just need txdata but not rxdata? The third question is, i have created uart component in Qsys, I also have Matlab coding to plot graph, but I guess I need a bridge to interconnect these two, does it have to do with iord_altera_avalon_uart_rxdata(uart_base)? Could you please link me to an example that use this command (iord_altera_avalon_uart_rxdata(uart_base))? Thanks a lot!