cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Newbie
Newbie
3,822 Views
Registered: ‎06-01-2017

Support for arbitrary precision floating point types in SDSOC

Jump to solution

I want to use half data type (FP16) from hls_half.h. When I compile my code in Vivado HLS 2016.4, the code is complied, but, when I copy the same code to SDSoC 2016.4 and mark the function for hardware implementation, I get the following error

 

 

INFO: [SDSoC 0-0] Link application ELF file
C:/Users/Sachin/xilinxworkspace/Conv10/Debug/_sds/swstubs/Conv10.o: In function `half::xip_fpo_get_data(__xip_fpo_struct*) const':
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:1086: undefined reference to `xip_fpo_set_zero'
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:1089: undefined reference to `xip_fpo_set_inf'
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:1092: undefined reference to `xip_fpo_set_nan'
C:/Users/Sachin/xilinxworkspace/Conv10/Debug/_sds/swstubs/Conv10.o: In function `half::xip_fpo_half_get_flt() const':
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:1100: undefined reference to `xip_fpo_init2'
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:1110: undefined reference to `xip_fpo_get_flt'
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:1112: undefined reference to `xip_fpo_clear'
C:/Users/Sachin/xilinxworkspace/Conv10/Debug/_sds/swstubs/Conv10.o: In function `half::xip_fpo_half_set_flt(float)':
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:1138: undefined reference to `xip_fpo_init2'
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:1139: undefined reference to `xip_fpo_set_flt'
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:1141: undefined reference to `xip_fpo_clear'
C:/Users/Sachin/xilinxworkspace/Conv10/Debug/_sds/swstubs/Conv10.o: In function `detail::enable<detail::expr, half, half, void>::type detail::operator+<half, half>(half, half)':
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:2173: undefined reference to `xip_fpo_add'
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:2173: undefined reference to `xip_fpo_add'
C:/Users/Sachin/xilinxworkspace/Conv10/Debug/_sds/swstubs/Conv10.o: In function `detail::enable<detail::expr, half, half, void>::type detail::operator*<half, half>(half, half)':
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:2175: undefined reference to `xip_fpo_mul'
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:2175: undefined reference to `xip_fpo_mul'
C:/Users/Sachin/xilinxworkspace/Conv10/Debug/_sds/swstubs/Conv10.o: In function `half detail::binary_operator<int (*)(__xip_fpo_struct*, __xip_fpo_struct const*, __xip_fpo_struct const*)>(int (*)(__xip_fpo_struct*, __xip_fpo_struct const*, __xip_fpo_struct const*), half, half)':
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:2164: undefined reference to `xip_fpo_inits2'
C:/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:2169: undefined reference to `xip_fpo_clears'
collect2.exe: error: ld returned 1 exit status
ERROR: [SDSoC 0-0] Exiting sds++ : Error when calling 'arm-linux-gnueabihf-g++ C:/Users/Sachin/xilinxworkspace/Conv10/Debug/_sds/swstubs/Conv10.o C:/Users/Sachin/xilinxworkspace/Conv10/Debug/_sds/swstubs/TestConv10.o -L C:/Xilinx/SDx/2016.4/aarch32-linux/lib -LC:/Users/Sachin/xilinxworkspace/Conv10/Debug/_sds/swstubs -Wl,--start-group -Wl,--end-group -Wl,--start-group -lpthread -lsds_lib -lxlnk_stub -Wl,--end-group -o C:/Users/Sachin/xilinxworkspace/Conv10/Debug/_sds/swstubs/Conv10.elf'
sds++ log file saved as C:/Users/Sachin/xilinxworkspace/Conv10/Debug/_sds/reports/sds.log
ERROR: [SDSoC 0-0] Build failed

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

 

Does SDSoC support half precision data type? If so, how to fix this issue.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer
Observer
6,335 Views
Registered: ‎05-26-2016

Try adding "-DHLS_NO_XIL_FPO_LIB" to your compilation settings.

View solution in original post

0 Kudos
5 Replies
Highlighted
Teacher
Teacher
3,765 Views
Registered: ‎03-31-2012

@bssachin somehow you are not linking with the proper xilinx library which implements the FP IP. You need to figure out what library to link and add it to your -L list show at the bottom of the log here. Alas I don't remember off-hand what that library is called.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Highlighted
Observer
Observer
6,336 Views
Registered: ‎05-26-2016

Try adding "-DHLS_NO_XIL_FPO_LIB" to your compilation settings.

View solution in original post

0 Kudos
Highlighted
Observer
Observer
2,950 Views
Registered: ‎09-01-2017

May I ask how could I find the 'compilation settings' option in SDSoC environment?

Thank you very much

0 Kudos
Highlighted
Explorer
Explorer
2,946 Views
Registered: ‎09-19-2017

Hi 

 

SDSoC is built on Eclipse. In Eclipse, if you right click on the blue project folder at the bottom of the pop-up menu is "C/C++ Build Settings".


Sam

0 Kudos
Highlighted
Observer
Observer
2,929 Views
Registered: ‎09-01-2017

 

Do you mean 'C/C++ Build' -> 'settings' -> 'Command'?

Thank you very much

0 Kudos