cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor
Visitor
729 Views
Registered: ‎10-17-2016

Reprogramming the PL online after turning it off

Jump to solution

I'm running an application with tasks over both the PS and PL parts of a Zynq-7000 platform.

 

I kwnow that, since the PL and the PS have different dedicated power rails, it is possible to turn off the PL while keeping the PS alive and running.

In my application I would like to switch on and off the PL in order to save power.

I can succesfully control the power rails voltage by sending PMBus commands to the voltage controller on the ZC706 board.

 

Anyway, I have the following doubts:

  1. How can I reprogram the PL once it has been turned off and on again? I suppose that the PL loses its configuration when turned off. Is there a way to load a bitfile to the PL from an application running bare metal on the PS?
  2. If there's a way to perform the task in pont 1, where should I keep my bitfile? In a SPI flash memory? In a SD card? In what format?

 

Thank you very much.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
787 Views
Registered: ‎10-17-2016

Re: Reprogramming the PL online after turning it off

Jump to solution

Thank you for your answer.

I supposed thtat FSBL had some kind of code to perform the FPGA programming but I didn't know were to look for it.

 

Anyway, I found that the PL programming can be performed by using the routines in the xdevcfg driver.

Indeed in the description of this driver you can find the following lines:

 

* The is the main header file for the Device Configuration Interface of the Zynq
* device. The device configuration interface has three main functionality.
*  1. AXI-PCAP
*  2. Security Policy
*  3. XADC
* This current version of the driver supports only the AXI-PCAP and Security
* Policy blocks. There is a separate driver for XADC.
*
* AXI-PCAP is used for download/upload an encrypted or decrypted bitstream.

[...]

 

Now, I have to figure out how to use it.

View solution in original post

0 Kudos
2 Replies
Highlighted
Mentor
Mentor
708 Views
Registered: ‎02-24-2014

Re: Reprogramming the PL online after turning it off

Jump to solution

The Zynq FSBL  (First stage boot loader) has routines for loading the PL..    It's here:

https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps/zynq_fsbl/misc

 

I'm reasonably sure the FSBL had routines for loading a bitstream from both the QSPI and the SD card.     The SD card is arguably easier to swap and program, but your milage may vary.

 

from main.c:

 

* FSBL runs from OCM, Based on the boot mode selected, FSBL will copy
* the partitions from the flash device. If the partition is bitstream then
* the bitstream is programmed in the Fabric and for an partition that is
* an application , FSBL will copy the application into DDR and does a
* handoff.The application should not be starting at the OCM address,
* FSBL does not remap the DDR. Application should use DDR starting from 1MB

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Highlighted
Visitor
Visitor
788 Views
Registered: ‎10-17-2016

Re: Reprogramming the PL online after turning it off

Jump to solution

Thank you for your answer.

I supposed thtat FSBL had some kind of code to perform the FPGA programming but I didn't know were to look for it.

 

Anyway, I found that the PL programming can be performed by using the routines in the xdevcfg driver.

Indeed in the description of this driver you can find the following lines:

 

* The is the main header file for the Device Configuration Interface of the Zynq
* device. The device configuration interface has three main functionality.
*  1. AXI-PCAP
*  2. Security Policy
*  3. XADC
* This current version of the driver supports only the AXI-PCAP and Security
* Policy blocks. There is a separate driver for XADC.
*
* AXI-PCAP is used for download/upload an encrypted or decrypted bitstream.

[...]

 

Now, I have to figure out how to use it.

View solution in original post

0 Kudos