cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
6,331 Views
Registered: ‎10-15-2010

Partial reconfiguration in linux

I'm working on partial reconfiguration in linux. Xilinx gave us a example of PR in xapp1159, and I want to do some simple experiments on Zedboard. When I look at the source code in  xapp1159, I found that in order to reconfigure FPGA, one have to write partial bit file into xdevcfg device. But I can't fine xdevcfg in the /dev/ directory.
Did anyone have finished a partial reconfiguration flow in linux?
Thank you!

0 Kudos
5 Replies
Highlighted
Visitor
Visitor
6,330 Views
Registered: ‎10-15-2010

Re: Partial reconfiguration in linux

One line in the source code main_app.c in xapp1159:
fd_is_partial = open("/sys/devices/amba.0/f8007000.devcfg/is_partial_bitstream", O_RDWR);
I don't have the is_partial_bitstream device neither. What dose the is_partial_bitstream device mean?

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
6,317 Views
Registered: ‎03-13-2012

Re: Partial reconfiguration in linux

I cannot comment regarding how this works or is to be used, but about the missing folder in sysfs:

 

You should have a fragment in your dts describing the devcfg module:

                devcfg@f8007000 {
                        compatible = "xlnx,ps7-dev-cfg-1.00.a";
                        reg = <0xf8007000 0x100>;
                        interrupts = <0 8 4>;
                        interrupt-parent = <&gic>;
                };

 

 And the driver has to be compiled with the kernel

CONFIG_XILINX_DEVCFG=y

 

And finally, when I read the logs correctly, the partial reconfiguration feature is available on kernels since the 14.3 release.

 

As reference, this is how it looks on my system:

[root@zynq f8007000.devcfg]# uname -a
Linux zynq 3.8.0-xilinx-00015-gabc285b #2 SMP PREEMPT Mon Apr 15 10:48:50 PDT 2013 armv7l GNU/Linux
[root@zynq f8007000.devcfg]# pwd
/sys/devices/amba.1/f8007000.devcfg
[root@zynq f8007000.devcfg]# ls
aes_en_lock  enable_dap         enable_sec_dbg_nonin  power      uevent
dbg_lock     enable_dbg_in      enable_seu            prog_done
driver       enable_dbg_nonin   is_partial_bitstream  seu_lock
enable_aes   enable_sec_dbg_in  modalias              subsystem

 

Highlighted
Xilinx Employee
Xilinx Employee
6,309 Views
Registered: ‎12-08-2011

Re: Partial reconfiguration in linux

Please use the sd card image provided with xapp1159. If you want to rebuild the kernel and devicetree, make sure you use the sources provided in the design zip file and you follow the instructions on the Zynq PR wiki page: http://www.wiki.xilinx.com/Zynq+7000+Partial+Reconfiguration+Reference+Design. This will ensure that you're using the correct versions and your kernel config and dts file match the design.

0 Kudos
Visitor
Visitor
6,023 Views
Registered: ‎07-09-2013

Re: Partial reconfiguration in linux

Hi Alxia,

Did you figure out your problem and if yes would you mind share your solution?

I'm also using Linux kernal to change the partial bitstream but I am wondering if I have two partial reconfigurable partitions, how I am going to assign bitstream. Basically it's a question of how to define/find a reconfigurable partition using Linux.

Thank you!
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
6,019 Views
Registered: ‎12-08-2011

Re: Partial reconfiguration in linux

there is no need to find reconfigurable partitions (RP) in linux (or bare-metal). the bitstream that you want to download to the PL has the configuration addresses encoded inside. just download the partial bitfile and set the is_partial_bitstream flag and the correct RP will be reconfigured.

0 Kudos