Forum Discussion
Altera_Forum
Honored Contributor
15 years agoTo use SystemConsole you need to first put the appropriate hardware into your design. There is a QSYS/SOPC builder component called JTAG to Avalon Master Bridge which you need to connect (in QSYS or SOPCB) to the slave which contains your registers.
Then program your board, start SystemConsole and type:get_service_paths master The systemconsole path to all the masters on your board should be displayed. At this point I normally do this:set m [lindex [get_service_paths master] n] Which sets the variable m to the name of the master you want to work with (if you have one master then n=0, otherwise use n to choose the appropriate master). Open that master with this command:set m1 [claim_service master $m myname ""] Then you can read and write to the master using the master_read_xx and master_write_xx commands against $m1. This is the systemconsole user guide (http://www.altera.com/literature/hb/qts/qts_qii53028.pdf) for 10.1. Once you have your slaves working standalone then you need to connect them to Matlab. In 11.0 there are a set of Java objects which are specially designed for this, I'm not sure if it is being properly documented. Since you're on 10.1 you'll need to unzip the attached file into your sopc_builder/model/lib directory. You can then use the Matlab Java access to create an com.altera.systemconsole.matlabapi.SystemConsoleLink object. This object can open masters using the masterOpen method, the master objects it returns have a masterRead32, masterWrite32 and close methods whose functionality should be obvious. The SystemConsoleLink in 11.0 will be able to execute TCL in the SystemConsole interpreter too, but dropping the 11.0 jar into 10.1 breaks that so please don't try it. Good Luck.