cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
1,954 Views
Registered: ‎06-19-2017

Building optical flow program using custom platform

Jump to solution

Hi All,

I'm creating custom platform to build revision stack(2017.4) Optical flow example. My custom platform is working well while all the function running in PS (without hardware acceleration). While enabling the hardware acceleration for any one of the functions I'm getting following errors.

 

INFO: [DMAnalysis 83-4497] Analyzing callers to hardware accelerators...
INFO: [DMAnalysis 83-4444] Scheduling data transfer graph for partition 0
INFO: [DMAnalysis 83-4446] Creating data motion network hardware for partition 0
INFO: [DMAnalysis 83-4448] Creating software stub functions for partition 0
INFO: [DMAnalysis 83-4450] Generating data motion network report for partition 0
INFO: [DMAnalysis 83-4454] Rewriting caller code
Creating block diagram (BD)
/home/fpga/software/SDx/2017.4/bin/sdx_link  -cf-system /home/fpga/ecam_workspace/of2/Release/_sds/.llvm/apsys_0.xml  -cf-db  /home/fpga/ecam_workspace/of2/Release/_sds/.cdb/xd_ip_db.xml  -xpfm /home/fpga/zcu102_ecam_platform/zcu102_ecam/export/zcu102_ecam/zcu102_ecam.xpfm   -multi-clks -trace-buffer 1024 -quiet
Creating top.bd.tcl
ERROR: [CF2XD 83-1322] Cannot allocate 'zcu102_ecam' interrupt port2
ERROR: [CF2XD 83-2396] Exhausted number of available interrupts.  Consider employing axi_dma_simple or zero_copy datamovers.
ERROR: [CF2XD 83-2009] An error has occurred during generation of the system block diagram.  For more information, please look for additional ERROR messages in the console and in log files.
Error generating intermediate design file top.xml
Error creating IPI .bd design file, exiting
ERROR: [SdsCompiler 83-5019] Exiting sds++ : Error when calling

 

Initially, the block diagram contains only 2 interrupts (one is connected to pl_ps_irq0, another one connected to pl_ps_irq1). I thought i need to increase the number interrupts in the block diagram. So I have changed My block diagram which is given below.

bd.png

 

PFM Property Tcl Script is below

 

set_property PFM_NAME "xilinx.com:zcu102_ecam:zcu102_ecam:1.1" [get_files zcu102_ecam.bd]
#set_property PFM_NAME zcu102_ecam [get_files zcu102_ecam.bd]
set_property PFM.AXI_PORT { M_AXI_HPM0_FPD {memport "M_AXI_GP"} \
M_AXI_HPM1_FPD {memport "M_AXI_GP"} \
S_AXI_HP0_FPD {memport "S_AXI_HP" sptag "HP0"} \
} [get_bd_cells zynq_ultra_ps_e_0]
set_property PFM.CLOCK { pl_clk0 {pl_clk0}} [get_bd_cells zynq_ultra_ps_e_0]
set_property PFM.CLOCK {pl_clk0 {id "0" is_default "true" proc_sys_reset \
"proc_sys_reset_0"}} [get_bd_cells /zynq_ultra_ps_e_0]

set intVar []
for {set i 0} {$i < 8} {incr i} {
lappend intVar In$i {}
}

set_property PFM.IRQ $intVar [get_bd_cells /xlconcat_0]
set_property PFM.IRQ $intVar [get_bd_cells /xlconcat_1]

 

While executing the write_dsa I'm getting following errors.

 

write_dsa -force /home/fpga/zcu102_ecam/zcu102_ecam.dsa -include_bit
INFO: [Vivado 12-4895] Creating DSA: /home/fpga/zcu102_ecam/zcu102_ecam.dsa ...
ERROR: [SDSoC-pfm-10] ERROR: pfm_irq - port 'In0' is not the least significant available port on instance 'xlconcat_0', expected In8
ERROR: [SDSoC-pfm-10] ERROR: pfm_irq - port 'In1' is not the least significant available port on instance 'xlconcat_0', expected In8
ERROR: [SDSoC-pfm-10] ERROR: pfm_irq - port 'In2' is not the least significant available port on instance 'xlconcat_0', expected In8
ERROR: [SDSoC-pfm-10] ERROR: pfm_irq - port 'In3' is not the least significant available port on instance 'xlconcat_0', expected In8
ERROR: [SDSoC-pfm-10] ERROR: pfm_irq - port 'In4' is not the least significant available port on instance 'xlconcat_0', expected In8
ERROR: [SDSoC-pfm-10] ERROR: pfm_irq - port 'In5' is not the least significant available port on instance 'xlconcat_0', expected In8
ERROR: [SDSoC-pfm-10] ERROR: pfm_irq - port 'In6' is not the least significant available port on instance 'xlconcat_0', expected In8
ERROR: [SDSoC-pfm-10] ERROR: pfm_irq - port 'In7' is not the least significant available port on instance 'xlconcat_0', expected In8
ERROR: [SDSoC-pfm-10] ERROR: pfm_irq - port 'In0' is not the least significant available port on instance 'xlconcat_1', expected In4
ERROR: [SDSoC-pfm-10] ERROR: pfm_irq - port 'In1' is not the least significant available port on instance 'xlconcat_1', expected In4
ERROR: [SDSoC-pfm-10] ERROR: pfm_irq - port 'In2' is not the least significant available port on instance 'xlconcat_1', expected In4
ERROR: [SDSoC-pfm-10] ERROR: pfm_irq - port 'In3' is not the least significant available port on instance 'xlconcat_1', expected In4
INFO: [Vivado 12-5881] Successfully generated hpfm file

 

Can anyone tell me what is wrong in my design?

Can anyone kindly help me to solve this?

 

SDx - 2017.4

vivado - 2017.4

SDK - 2017.4

petlinux - 2017.4

 

board - zcu102

 

Thanks

Kumar P G

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Adventurer
Adventurer
2,278 Views
Registered: ‎06-19-2017

Re: Building optical flow program using custom platform

Jump to solution

Hi All,

I have found the reason for this issue.

 

I have given full path for bitstream in Boot Image Format (linux.bif). So the bitstream didn't update as per PL accelerator functions in BOOT.BIN, It has taken the old bitstream (i.e bitstream before moving a function to PL).

Thanks

Kumar P G

View solution in original post

0 Kudos
7 Replies
Highlighted
1,912 Views
Registered: ‎02-12-2018

Re: Building optical flow program using custom platform

Jump to solution

hi kumar, 

 

Set the number of inputs to 1 in your concats for interrupts if your intent is to use them in your platform. Right now you are using these in your block design (although not connected) and simultaneously declare them in your tcl for DSA which is causing the error. 

0 Kudos
Highlighted
Adventurer
Adventurer
1,865 Views
Registered: ‎06-19-2017

Re: Building optical flow program using custom platform

Jump to solution

Hi @theultimatesource

Block diagram has changed as per your suggestion.

 

new_bd.png

 

PFM Property Tcl Script is below

 

set_property PFM_NAME "xilinx.com:zcu102_ecam:zcu102_ecam:1.1" [get_files zcu102_ecam.bd]
set_property PFM.AXI_PORT { M_AXI_HPM0_FPD {memport "M_AXI_GP"} \
M_AXI_HPM1_FPD {memport "M_AXI_GP"} \
S_AXI_HP0_FPD {memport "S_AXI_HP" sptag "HP0"} \
} [get_bd_cells zynq_ultra_ps_e_0]
set_property PFM.CLOCK { pl_clk0 {pl_clk0}} [get_bd_cells zynq_ultra_ps_e_0]
set_property PFM.CLOCK {pl_clk0 {id "0" is_default "true" proc_sys_reset \
"proc_sys_reset_0"}} [get_bd_cells /zynq_ultra_ps_e_0]

set intVar []
for {set i 0} {$i < 8} {incr i} {
lappend intVar In$i {}
}

set_property PFM.IRQ $intVar [get_bd_cells /xlconcat_0]
set_property PFM.IRQ $intVar [get_bd_cells /xlconcat_1]

 

Now Vivado didn't show any errors. In SDx moved the following functions to PL.

1) read_optflow_input,

2) DenseNonPyrLKOpticalFlow

3) write_optflow_output

SDx build successfully passed without any errors.

 

But we are getting below messages, while executing the of2.elf application in ZCU102 board from SDcard

 

/mnt/of2.elf

[ 38.860178] xdma_probe: probe dma ffffffc870c90850, nres 1, id 0

[ 38.866194] xilinx-axidma xilinx-axidma.0: AXIDMA device 0 physical base address=0x00000000a0000000

[ 38.875240] xilinx-axidma xilinx-axidma.0: AXIDMA device 0 remapped to 0xffffff800a944000

[ 38.883414] xilinx-axidma xilinx-axidma.0: has 2 channel(s)

[ 38.889095] chan 0 name: dm_0:0

[ 38.892354] chan 0 direction: TO_DEVICE[ 38.896456] xlate_irq: hwirq 89, irq 228

[ 38.900355] chan0 irq: 228

[ 38.903179] chan0 poll mode: off

[ 38.907560] chan0 bd ring @@ 0x0000000040900000 (size: 0x200000 bytes)

[ 59.920004] INFO: rcu_sched detected stalls on CPUs/tasks:

[ 59.928044] 2-...: (0 ticks this GP) idle=e27/140000000000000/0 softirq=1388/1388 fqs=2625

[ 59.939094] (detected by 3, t=5252 jiffies, g=234, c=233, q=17)

[ 59.947730] Task dump for CPU 2:

[ 59.953572] of2.elf R running task 0 2350 2338 0x00000002

[ 59.963227] Call trace:

[ 59.968323] [] __switch_to+0x8c/0xa0

[ 59.976151] [] 0xffffffc870d835e8

[ 94.143517] random: crng init done

[ 122.940002] INFO: rcu_sched detected stalls on CPUs/tasks:

[ 122.948096] 2-...: (0 ticks this GP) idle=e27/140000000000000/0 softirq=1388/1388 fqs=10495

[ 122.959356] (detected by 3, t=21007 jiffies, g=234, c=233, q=17)

[ 122.968208] Task dump for CPU 2:

[ 122.974215] of2.elf R running task 0 2350 2338 0x00000002

[ 122.984070] Call trace:

[ 122.989365] [] __switch_to+0x8c/0xa0

[ 122.997398] [] 0xffffffc870d835e8

 

when we didnt move any functions to PL, connected camera is streaming without any disturbance.

Could anyone tell us what are we missing while moving a function to PL. Could anyone help me to solve this issue?

 

Thanks

Kumar P G

0 Kudos
Highlighted
Adventurer
Adventurer
1,788 Views
Registered: ‎06-19-2017

Re: Building optical flow program using custom platform

Jump to solution

Hi All,

Still, we are getting the above issue. Could anyone help us to solve this?

 

Thanks

Kumar P G

0 Kudos
Highlighted
Adventurer
Adventurer
1,751 Views
Registered: ‎06-19-2017

Re: Building optical flow program using custom platform

Jump to solution

Hi All,

We have built the Matrix Multiplication and Addition application in SDx (moving the functions mmult, madd into PL) using the inbuilt ZCU102 platform and our custom platform.

We have compared the rebuilt.tcl which in the following location Release\_sds\p0\_vpl\ipi

In that, we have found some difference in the set project properties.

 

Set project properties of Our custom platform in rebuilt.tcl is given below.

 

# Set project properties
set obj [current_project]
set_property -name "board_part" -value "xilinx.com:zcu102:part0:3.1" -objects $obj
set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
set_property -name "dsa.num_compute_units" -value "60" -objects $obj
set_property -name "ip_cache_permissions" -value "read write" -objects $obj
set_property -name "ip_output_repo" -value "$proj_dir/${project_name}.cache/ip" -objects $obj
set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
set_property -name "simulator_language" -value "Mixed" -objects $obj
set_property -name "xpm_libraries" -value "XPM_CDC XPM_FIFO XPM_MEMORY" -objects $obj

 

 

Set project properties of the SDx inbuilt ZCU102 platform in rebuilt.tcl is given below.

 

# Set project properties
set obj [current_project]
set_property -name "board_part" -value "xilinx.com:zcu102:part0:3.1" -objects $obj
set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
set_property -name "dsa.accelerator_binary_content" -value "bitstream" -objects $obj
set_property -name "dsa.accelerator_binary_format" -value "xclbin2" -objects $obj
set_property -name "dsa.board_id" -value "zcu102" -objects $obj
set_property -name "dsa.description" -value "Vivado generated DSA" -objects $obj
set_property -name "dsa.dr_bd_base_address" -value "0" -objects $obj
set_property -name "dsa.emu_dir" -value "emu" -objects $obj
set_property -name "dsa.flash_interface_type" -value "bpix16" -objects $obj
set_property -name "dsa.flash_offset_address" -value "0" -objects $obj
set_property -name "dsa.flash_size" -value "1024" -objects $obj
set_property -name "dsa.host_architecture" -value "x86_64" -objects $obj
set_property -name "dsa.host_interface" -value "pcie" -objects $obj
set_property -name "dsa.name" -value "zcu102" -objects $obj
set_property -name "dsa.num_compute_units" -value "60" -objects $obj
set_property -name "dsa.platform_state" -value "pre_synth" -objects $obj
set_property -name "dsa.uses_pr" -value "1" -objects $obj
set_property -name "dsa.vendor" -value "xilinx.com" -objects $obj
set_property -name "dsa.version" -value "1.0" -objects $obj
set_property -name "enable_vhdl_2008" -value "1" -objects $obj
set_property -name "ip_cache_permissions" -value "read write" -objects $obj
set_property -name "ip_output_repo" -value "$proj_dir/${project_name}.cache/ip" -objects $obj
set_property -name "sim.central_dir" -value "$proj_dir/${project_name}.ip_user_files" -objects $obj
set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
set_property -name "simulator_language" -value "Mixed" -objects $obj
set_property -name "xpm_libraries" -value "XPM_CDC XPM_FIFO XPM_MEMORY" -objects $obj

 

Now our doubt is this difference will cause this issue?

Also could anyone help me how to set project properties in our custom platform ?

 

Thanks

Kumar P G

 

0 Kudos
Highlighted
Moderator
Moderator
1,746 Views
Registered: ‎09-12-2007

Re: Building optical flow program using custom platform

Jump to solution

What issue are you seeing when accellerating the functions in the PL?

0 Kudos
Adventurer
Adventurer
1,742 Views
Registered: ‎06-19-2017

Re: Building optical flow program using custom platform

Jump to solution

Hi @stephenm

Thanks for your reply.

We didn't get any errors in SDx when we are accelerating a function into PL. It is successfully building using our custom platform but while running that .elf in ZCU102 board, it is hanging with following messages

 

[ 38.860178] xdma_probe: probe dma ffffffc870c90850, nres 1, id 0

[ 38.866194] xilinx-axidma xilinx-axidma.0: AXIDMA device 0 physical base address=0x00000000a0000000

[ 38.875240] xilinx-axidma xilinx-axidma.0: AXIDMA device 0 remapped to 0xffffff800a944000

[ 38.883414] xilinx-axidma xilinx-axidma.0: has 2 channel(s)

[ 38.889095] chan 0 name: dm_0:0

[ 38.892354] chan 0 direction: TO_DEVICE[ 38.896456] xlate_irq: hwirq 89, irq 228

[ 38.900355] chan0 irq: 228

[ 38.903179] chan0 poll mode: off

[ 38.907560] chan0 bd ring @@ 0x0000000040900000 (size: 0x200000 bytes)

[ 59.920004] INFO: rcu_sched detected stalls on CPUs/tasks:

[ 59.928044] 2-...: (0 ticks this GP) idle=e27/140000000000000/0 softirq=1388/1388 fqs=2625

[ 59.939094] (detected by 3, t=5252 jiffies, g=234, c=233, q=17)

[ 59.947730] Task dump for CPU 2:

[ 59.953572] of2.elf R running task 0 2350 2338 0x00000002

[ 59.963227] Call trace:

[ 59.968323] [] __switch_to+0x8c/0xa0

[ 59.976151] [] 0xffffffc870d835e8

[ 94.143517] random: crng init done

[ 122.940002] INFO: rcu_sched detected stalls on CPUs/tasks:

[ 122.948096] 2-...: (0 ticks this GP) idle=e27/140000000000000/0 softirq=1388/1388 fqs=10495

[ 122.959356] (detected by 3, t=21007 jiffies, g=234, c=233, q=17)

[ 122.968208] Task dump for CPU 2:

[ 122.974215] of2.elf R running task 0 2350 2338 0x00000002

[ 122.984070] Call trace:

[ 122.989365] [] __switch_to+0x8c/0xa0

[ 122.997398] [] 0xffffffc870d835e8

 

We don't know what we are missing while creating vivado, petalinux, and custom platform project.

Could you help me to solve this issue?

 

Thanks 

Kumar P G 

0 Kudos
Highlighted
Adventurer
Adventurer
2,279 Views
Registered: ‎06-19-2017

Re: Building optical flow program using custom platform

Jump to solution

Hi All,

I have found the reason for this issue.

 

I have given full path for bitstream in Boot Image Format (linux.bif). So the bitstream didn't update as per PL accelerator functions in BOOT.BIN, It has taken the old bitstream (i.e bitstream before moving a function to PL).

Thanks

Kumar P G

View solution in original post

0 Kudos