Intel® Quartus® Prime Pro Edition用户指南: 调试工具

ID 683819
日期 9/30/2019
Public
文档目录

7.11.1. 支持的MATLAB* API命令

您可以从MATLAB*环境中执行操作,并可以通过System Console对master和slave进行读写。受支持的MATLAB* API命令使您不必启动System Console软件。支持的命令是:

  • SystemConsole.refreshMasters;
  • M = SystemConsole.openMaster(1);
  • M.write (type, byte address, data);
  • M.read (type, byte address, number of words);
  • M.close

MATLAB* API脚本实例

SystemConsole.refreshMasters; %Investigate available targets
M = SystemConsole.openMaster(1); %Creates connection with FPGA target
%%%%%%%% User Application %%%%%%%%%%%%
....
M.write('uint32',write_address,data); %Send data to FPGA target
....
data = M.read('uint32',read_address,size); %Read data from FPGA target
....
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
M.close; %Terminates connection to FPGA target