Forum Discussion
17 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- I have a DSP Development Kit Cyclone III, but it doesn't have a RS232 and i need comunicate with nios to acces a data for the PIOs it's posible use the Physical USB-Blaster(No the Embedded) to comunicate with My PC especifically a Matlab GUI? --- Quote End --- It is possible to use the USB-Blaster to establish a connection between the host PC and logic within the device. Altera don't make it convenient though. The JTAG-to-Avalon-MM master interface can be added to an SOPC or Qsys system. This component allows you to read or write via JTAG. Unfortunately, Altera only provides procedures to use the JTAG-to-Avalon-MM master from SystemConsole, which makes it a little trickier to use from MATLAB. You have to create a Tcl server that runs in SystemConsole, and then use sockets from MATLAB to get SystemConsole to access the hardware for you. The latest version of Quartus is required, since SystemConsole in that version has support for fileevent, which is needed to run a server. Cheers, Dave - Altera_Forum
Honored Contributor
--- Quote Start --- It is possible to use the USB-Blaster to establish a connection between the host PC and logic within the device. Altera don't make it convenient though. The JTAG-to-Avalon-MM master interface can be added to an SOPC or Qsys system. This component allows you to read or write via JTAG. Unfortunately, Altera only provides procedures to use the JTAG-to-Avalon-MM master from SystemConsole, which makes it a little trickier to use from MATLAB. You have to create a Tcl server that runs in SystemConsole, and then use sockets from MATLAB to get SystemConsole to access the hardware for you. The latest version of Quartus is required, since SystemConsole in that version has support for fileevent, which is needed to run a server. Cheers, Dave --- Quote End --- Thanks for you answer Dave, and another cuestion what is the best option for the communication serial with this Development Kit? - Altera_Forum
Honored Contributor
--- Quote Start --- Thanks for you answer Dave, and another cuestion what is the best option for the communication serial with this Development Kit? --- Quote End --- Does it have a 100-mil header for GPIO? Buy an FTDI UM245R module from Digikey for $20 and it'll give you a USB-to-Serial interface to the board. The FPGA interfaces to the UM245R via an 8-bit parallel FIFO mode (8-bits data, and 4 control signals for the FIFO). MATLAB can then talk to the board like its a serial port. Cheers, Dave - Altera_Forum
Honored Contributor
--- Quote Start --- Does it have a 100-mil header for GPIO? Buy an FTDI UM245R module from Digikey for $20 and it'll give you a USB-to-Serial interface to the board. The FPGA interfaces to the UM245R via an 8-bit parallel FIFO mode (8-bits data, and 4 control signals for the FIFO). MATLAB can then talk to the board like its a serial port. Cheers, Dave --- Quote End --- So Many Thank's, Mr Dave! :) - Altera_Forum
Honored Contributor
It is possible to communicate with a JTAG avalon master by embedding SystemConsole within matlab, but it's tricky in 11.1 (you have to set up a lot of classpath variables etc).
Or if you don't want to do that then start SystemConsole with the --server option and it will provide a single use TCP server for you. - Altera_Forum
Honored Contributor
Hi Wombat,
--- Quote Start --- It is possible to communicate with a JTAG avalon master by embedding SystemConsole within matlab, but it's tricky in 11.1 (you have to set up a lot of classpath variables etc). Or if you don't want to do that then start SystemConsole with the --server option and it will provide a single use TCP server for you. --- Quote End --- Since SystemConsole in 11.1sp1 supports Tcl fileevent, it would be easier to write a Tcl server that runs under SystemConsole to provide the hardware access, and contact that from MATLAB. I have a Tcl client/server example if anyone wants it. Cheers, Dave - Altera_Forum
Honored Contributor
I wrote a tutorial showing how to implement communications via the USB-Blaster:
http://www.alterawiki.com/wiki/using_the_usb-blaster_as_an_sopc/qsys_avalon-mm_master_tutorial Enjoy! Cheers, Dave - Altera_Forum
Honored Contributor
--- Quote Start --- I wrote a tutorial showing how to implement communications via the USB-Blaster: http://www.alterawiki.com/wiki/using_the_usb-blaster_as_an_sopc/qsys_avalon-mm_master_tutorial Enjoy! Cheers, Dave --- Quote End --- Thank's dwh@ovro.caltech.edu your information very useful, the tool QSYS is the evolution of SOPC, because when i open SOPC for load an design recommends utilize QSYS to create the design instead of SOPC. - Altera_Forum
Honored Contributor
--- Quote Start --- the tool QSYS is the evolution of SOPC, because when i open SOPC for load an design recommends utilize QSYS to create the design instead of SOPC. --- Quote End --- That's right. The reason I wrote the tutorial was in part to see what differences there are between the two tools. Altera's Qsys tutorials focus on the hierarchical nature of the new tool, rather than just getting a basic design up and running. Cheers, Dave - Altera_Forum
Honored Contributor
--- Quote Start --- Does it have a 100-mil header for GPIO? Buy an FTDI UM245R module from Digikey for $20 and it'll give you a USB-to-Serial interface to the board. The FPGA interfaces to the UM245R via an 8-bit parallel FIFO mode (8-bits data, and 4 control signals for the FIFO). MATLAB can then talk to the board like its a serial port. Cheers, Dave --- Quote End --- Hi Dave, I want to plot the graph in Matlab from the results displayed on the Terminal Windows of Altera Monitor Program, I don't know how to start, I came across your post here. I have the USB-to-Serial interface module that you mentioned here, could you please tell me how to get started and could you please link me to the relevant resources as I really need it? I assume I would need to do something like iord_altera_avalon_uart_rxdata(uart_base) but I could not find further info. I wanted to do in C code. Thank you very much.