We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 
Registered: ‎11-23-2018

SDS compiler error with multidimensional arrays

Hi All,

I'm compiling a project on SDx and a compiler error appear when I want to synthesize and accelerator with multidimensional arrays as input parameters.

This is the error generated:

Generating data motion network
INFO: [DMAnalysis 83-4494] Analyzing hardware accelerators...
INFO: [DMAnalysis 83-4497] Analyzing callers to hardware accelerators...
WARNING: [DMAnalysis 83-4492] Unable to determine the memory attributes passed to rMb1 of function inter_luma_double_bizero_skip at /home/lorenzo/phd/ws_vivado/sdx/h264/src/slice.c:214, please use mem_attribute pragma to specify
opt: /scratch/builds/2018.3/continuous/2018_12_06_2405991/build/swig/products/sdx/soc/ext/llvm_clang/v3.9/llvm/lnx64/llvm/include/llvm/IR/CallSite.h:159: ValTy* llvm::CallSiteBase<FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy>::getArgument(unsigned int) const [with FunTy = llvm::Function; BBTy = llvm::BasicBlock; ValTy = llvm::Value; UserTy = llvm::User; UseTy = llvm::Use; InstrTy = llvm::Instruction; CallTy = llvm::CallInst; InvokeTy = llvm::InvokeInst; IterTy = llvm::Use*]: Assertion `arg_begin() + ArgNo < arg_end() && "Argument # out of range!"' failed.
#0 0x000000000129cef5 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/tools2/Xilinx/SDx/2018.3/bin/../llvm-clang/lnx64/llvm/bin/opt+0x129cef5)
#1 0x000000000129af1e llvm::sys::RunSignalHandlers() (/tools2/Xilinx/SDx/2018.3/bin/../llvm-clang/lnx64/llvm/bin/opt+0x129af1e)
#2 0x000000000129b042 SignalHandler(int) (/tools2/Xilinx/SDx/2018.3/bin/../llvm-clang/lnx64/llvm/bin/opt+0x129b042)
#3 0x00007fa3f4fce6d0 __restore_rt (/lib64/libpthread.so.0+0xf6d0)
#4 0x00007fa3f3b44277 __GI_raise (/lib64/libc.so.6+0x36277)
#5 0x00007fa3f3b45968 __GI_abort (/lib64/libc.so.6+0x37968)
#6 0x00007fa3f3b3d096 __assert_fail_base (/lib64/libc.so.6+0x2f096)
#7 0x00007fa3f3b3d142 (/lib64/libc.so.6+0x2f142)
#8 0x00007fa3f37fccb4 (/tools2/Xilinx/SDx/2018.3/bin/../lib/lnx64.o/XidanePass.so+0x6acb4)
#9 0x00007fa3f37dd710 _init (/tools2/Xilinx/SDx/2018.3/bin/../lib/lnx64.o/XidanePass.so+0x4b710)
#10 0x00007fa3f37f4874 (/tools2/Xilinx/SDx/2018.3/bin/../lib/lnx64.o/XidanePass.so+0x62874)
#11 0x0000000000e86094 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/tools2/Xilinx/SDx/2018.3/bin/../llvm-clang/lnx64/llvm/bin/opt+0xe86094)
#12 0x00000000005ff0a3 main (/tools2/Xilinx/SDx/2018.3/bin/../llvm-clang/lnx64/llvm/bin/opt+0x5ff0a3)
#13 0x00007fa3f3b30445 __libc_start_main (/lib64/libc.so.6+0x22445)
#14 0x0000000000642e99 _start (/tools2/Xilinx/SDx/2018.3/bin/../llvm-clang/lnx64/llvm/bin/opt+0x642e99)
Stack dump:
0.	Program arguments: /tools2/Xilinx/SDx/2018.3/bin/../llvm-clang/lnx64/llvm/bin/opt -load /tools2/Xilinx/SDx/2018.3/bin/../lib/lnx64.o/XidanePass.so -disable-output -mem2reg -basicaa -XidanePass --dmclkid 1 --repo /home/lorenzo/phd/ws_vivado/sdx/h264/Release/_sds/.cdb/xd_ip_db.xml --dmdb /tools2/Xilinx/SDx/2018.3/data/DM.db -os linux -processor cortex-a53 -partition 0 -perfest 
1.	Running pass 'Data motion analysis and network generation' on module '<stdin>'.
/tools2/Xilinx/SDx/2018.3/bin/XidanePass: line 9:  5766 Aborted                 (core dumped) ${BIN_DIR}/../llvm-clang/lnx64/llvm/bin/opt -load ${BIN_DIR}/../lib/lnx64.o/XidanePass.so -disable-output -mem2reg -basicaa -XidanePass ${ARGS} < sds_all.o
Data motion generation exited with return code -2
- exited unexpectedly
sds++ log file saved as /home/lorenzo/phd/ws_vivado/sdx/h264/Release/_sds/reports/sds.log
ERROR: [SdsCompiler 83-5004] Build failed

make: *** [h264.elf] Error 1

I've been able to avoid this error only flattening the arrays - form multidimensional to monodimensional. Applying the SDS pragma mem_attrribute does not solve the problem in my case.

Does it mean that the C/C++ code defining the hardware accelerators have to be written such that all the input arrays of the target functions are monodimensional? Or there is another way to avoid this problem?




0 Kudos
2 Replies
Scholar xilinxacct
Registered: ‎10-23-2018

Re: SDS compiler error with multidimensional arrays


Are the sizes of the dimension fully specified where they are used?

e.g. a[10][20]   not a[ ][ ] or *a ... or something like that    

Hope that helps

If so, please mark as solution accepted. Kudos also welcomed. :-)

Registered: ‎11-23-2018

Re: SDS compiler error with multidimensional arrays

Yes, the sizes of the array dimensions are fully specified.

The only way I have found to get rid of the error is flattening the arrays completely, also in this case specifying the single resulting dimension.


0 Kudos