changeFPGAImage

Class: visionzynq

Load image from on-board SD card into FPGA

Description

changeFPGAImage(vz,'default') programs the FPGA with the default image included with the support package and restarts the board. The default FPGA image has pass-through logic in place of the FPGA user logic. The vz argument is a visionzynq object that defines the connection to the board. The method returns when the board reboot is complete and the board is ready to run the loaded design.

changeFPGAImage(vz,filename) programs the FPGA with a custom image from the visionzynq-customtgt subfolder on the SD card. This method then restarts the board.

changeFPGAImage(vz,'list') lists the available FPGA image files located in the visionzynq-customtgt subfolder on the SD card.

Use this method to change the image currently running on the target FPGA without having to run through the HDL Workflow Advisor or the support package guided set up process. You can use this function when:

  • You have multiple generated image files on the SD card.

  • You want to switch between the default image and the generated image.

  • You are working through the Developing Vision Algorithms for Zynq-Based Hardware example and want to see the results of targeting without actually running the HDL Workflow Advisor. The FPGA image for this example is installed with the support package and included 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, specified as a character vector. This argument must match a file name in the visionzynq-customtgt subfolder on the SD card.

Examples

expand all

For the installed board, in this case ZedBoard™ with FMC-HDMI-CAM, change the FPGA image to the default shipped with the support package.

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

Load the default FPGA image.

changeFPGAImage(vz,'default');
## Copying FPGA image located at /mnt/visionzynq-refdes/visionzynq-zedboard-hdmicam.bit to /mnt/system.bit
## Rebooting board ..........
## Reboot complete

For the installed board, in this case ZedBoard with FMC-HDMI-CAM, list the available image files in the visionzynq-customtgt directory on the SD card.

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

List the image files available to load to the FPGA.

changeFPGAImage(vz,'list')
default
visionzynq-zedboard-hdmicam-corner_overlay.bit
visionzynq-zedboard-hdmicam-edge_overlay.bit

For the installed board, in this case ZedBoard with FMC-HDMI-CAM, load a custom FPGA image from the visionzynq-customtgt directory on the SD card.

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

Load one of the files from the visionzynq-customtgt directory.

changeFPGAImage(vz,'visionzynq-zedboard-hdmicam-corner_overlay.bit')
## Copying FPGA image located at /mnt/visionzynq-customtgt/visionzynq-zedboard-hdmicam-corner_overlay.bit to /mnt/system.bit
## Rebooting board ..........
## Reboot complete

Introduced in R2016a