cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
4,650 Views
Registered: ‎11-08-2016

download SDK program and fpga image through matlab

I am working on a project on Zynq Ultrascale+ MPSoc using vivado.2016.3. I have created my block design in vivado and software program in SDK. The software is working fine with SDK through Jtag. Right now, I want to create communication interface between host (PC) and fpga through Matlab/USB_JTAG(For example, I want to read/write register to fpga in matlab). How to implement this kind of interface? Are there any example design?

 

Thank you in advance!

0 Kudos
7 Replies
Highlighted
Adventurer
Adventurer
4,633 Views
Registered: ‎11-09-2016

Re: download SDK program and fpga image through matlab

If you use a xilinx board, jtag port must be dual purpose.Both programming and UART. If you don't mean programming,you can open simple Serial Port on Matlab. You can use AXILite UART or Zyq drivers on PS side to communicate with PC. Of course you should use an application code which registers want to read/write.

Berker

0 Kudos
Highlighted
Observer
Observer
4,605 Views
Registered: ‎11-08-2016

Re: download SDK program and fpga image through matlab

What I want to do is downloading the system.bit file generated from vivado and application.elf file from SDK to zynq board through matlab.

 

In SDK, we have command 'source' to load the psu_init, rst to reset fpga and dow command to download images, I am wondering if matlab has equivalent drivers to do the same thing through the jtag.

0 Kudos
Observer
Observer
4,574 Views
Registered: ‎11-08-2016

Re: download SDK program and fpga image through matlab

Any clues about how to use matlab to download the fpga image generated from vivado (system.bit) to the zynq board?

0 Kudos
Highlighted
Observer
Observer
4,559 Views
Registered: ‎11-08-2016

Re: download SDK program and fpga image through matlab

Hi everyone,

 

I found in Altera, they provide Matlab API, SystemConsole, to allow matlab to establish Jtag connection and control fpga. I am wondering if XIlinx has similar API functions for matlab.

 

The second thought is, In vivado hw debugger, when we connect the board using tcl command 'connect_hw_server' in tcl console, I believe the console indeed are calling some low level driver's API funcion in background to establish connection with Itag, and the whole process is not visible. Is that possible to find out what it calls while we type those tcl commands, and the location of those low level functions?

 

Many thanks!!

0 Kudos
Highlighted
Adventurer
Adventurer
4,279 Views
Registered: ‎11-09-2016

Re: download SDK program and fpga image through matlab

You can check Hardware in the Loop(HWIL) concept in Matlab.

https://www.mathworks.com/products/hdl-verifier/features.html#fpga-in-the-loop-verification

 

It works HDL Coder generated .bit fle. You must test it also with your custom .bit file. 

 

0 Kudos
Highlighted
Observer
Observer
3,698 Views
Registered: ‎11-08-2016

Re: download SDK program and fpga image through matlab

@berker_atel How about sdk software? Is there anyway to download sdk application to PS through matlab?

0 Kudos
Highlighted
Moderator
Moderator
3,670 Views
Registered: ‎10-06-2016

Re: download SDK program and fpga image through matlab

Hi @linwei8

 

I don't really understand why you are trying to control Xilinx SDK from matlab if you are not generating code at all from Matlab by itself...

 

Matlab/Simulink Embedded Coder (SW) and HDL coder (HW) can be used to generate code and the third party support packages to program those applications/bitstreams into your target. Currently as far as I know they don't provide a SP for ZynqMP as they do for Zynq-7000.

 

Using this third party package definitively allows to control Xilinx tools, but commonly this is commonly used for code generated within matlab rather than in SDK/Vivado tools.


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos