downloadImage

Class: visionzynq

Write image file to on-board SD card and load into FPGA

Syntax

downloadImage(vz,'FPGAImage')
downloadImage(vz,'FPGAImage',filename)

Description

downloadImage(vz,'FPGAImage') writes the default FPGA image, from the support package install directory, to the SD card of the visionzynq target. The default FPGA image has pass-through logic in place of the FPGA user logic. It then loads the default FPGA image to the chip and restarts the board. The method does not return until the board restart is complete.

downloadImage(vz,'FPGAImage',filename) downloads a custom FPGA image to the on-board SD card, and then loads the image into the FPGA and restarts the board.

Use the downloadImage method when the image you want is not yet on the hardware SD card. Use the changeFPGAImage method when the file is already on the SD card.

Input Arguments

expand all

A visionzynq object that connects from the host computer to the Zynq® board.

The FPGA image file name and relative or absolute folder location, specified as a character vector. This argument specifies the image to download to the SD card and load into the FPGA.

Examples

expand all

Create an object that contains a connection to the board, if you do not have one in the workspace already.

vz = visionzynq
vz = 


visionzynq

   Device Information:
       DeviceName: 'ZC706 FMC-HDMI-CAM'
    DeviceAddress: '192.168.4.2'
         Username: 'root'
         Password: 'root'
             Port: 22

Download the default FPGA image to the Zynq device.

downloadImage(vz,'FPGAImage')
## Transferring image to hardware SD card:
           DownloadKind: 'FPGAImage'
         DownloadSource: 'C:\ML\SupportPackages\R2016a\toolbox\shared\supportpackages\visionzynq\bin\target\sdcard\visionzynq-zc706-hdmicam\visionzynq-refdes…'
    DownloadDestination: '/mnt/visionzynq-refdes'

File exists.  Overwrite? Y/N [N]:Y
## Copying FPGA image located at /mnt/visionzynq-refdes/visionzynq-zedboard-hdmicam.bit to /mnt/system.bit
## Rebooting board ..........
## Reboot complete

Create an object that contains a connection to the board, if you do not have one in the workspace already.

vz = visionzynq
vz = 


visionzynq

   Device Information:
       DeviceName: 'ZedBoard FMC-HDMI-CAM'
    DeviceAddress: '192.168.4.2'
         Username: 'root'
         Password: 'root'
             Port: 22

Download a custom FPGA image file, such as one you created using the IP core generation workflow in HDL Workflow Advisor, to the Zynq device.

downloadImage(vz,'FPGAImage','C:\work\hdl_prj\vivado_ip_prj\mydesign.bit');
## Transferring image to hardware SD card:
           DownloadKind: 'FPGAImage'
         DownloadSource: 'C:\work\hdl_prj\vivado_ip_prj\mydesign.bit'
    DownloadDestination: '/mnt/visionzynq-customtgt'
## Copying FPGA image located at /mnt/visionzynq-customtgt/mydesign.bit to /mnt/system.bit
## Rebooting board ..........
## Reboot complete
Introduced in R2016a