Hardware Function Options

Hardware function options provide a means to consolidate sdsccoptions within a Makefileto simplify command line calls and make minimal modifications to a pre-existing Makefile. The Makefilefragment below illustrates the use of –sds-hwblocks to collect all options in the SDSFLAGS Makefilevariable and to replace an original definition of CCwith sdscc ${SDSFLAGS}or sds++ ${SDSFLAGS}. Thus the original Makefilefor an application can be converted to an sdscc/ sds++compiler Makefilewith minimal changes.
APPSOURCES = add.cpp main.cpp EXECUTABLE = add.elf CROSS_COMPILE = arm-xilinx-linux-gnueabi- AR = ${CROSS_COMPILE}ar LD = ${CROSS_COMPILE}ld #CC = ${CROSS_COMPILE}g++ PLATFORM = zc702 SDSFLAGS = -sds-pf ${PLATFORM} \ -sds-hw add add.cpp -clkid 1 -sds-end \ -dmclkid 2 CC = sds++ ${SDSFLAGS} INCDIRS = -I.. LDDIRS = LDLIBS = CFLAGS = -Wall -g -c ${INCDIRS} LDFLAGS = -g ${LDDIRS} ${LDLIBS} SOURCES := $(patsubst %,../%,$(APPSOURCES)) OBJECTS := $(APPSOURCES:.cpp=.o) .PHONY: all all: ${EXECUTABLE} ${EXECUTABLE}: ${OBJECTS} ${CC} ${OBJECTS} -o $@ ${LDFLAGS} %.o: ../%.cpp ${CC} ${CFLAGS} $<

-sds-hw function_name file [[-files file_list] [-hls-tcl hls_tcl_directives_file] [-clkid ] [-mno-lint]] –sds-end

Ansdscccommand line may include zero or more–sds-hwblocks, and each block is associated with a top-level hardware function specified as the first argument and its containing source file specified as the second argument. If the file name associated with an-sds-hwblock matches the source file to be compiled, the options are applied. Options outside of–sds-hwblocks are applied where applicable.

When using the AuvizCV library, thefunction_nameis the template function instantiation enclosed in double quotes, for example "auCanny<1080,1920,0,0,3,2,1,1,1>", and the file is the source file containing the template function instantiation, for exampleau_canny_tb.cpp.

-clkid

Set the accelerator clock ID to, wherehas one of the values listed in the table below. (You can use the commandsdscc –sds-pf-info platform_nameto display the information about a platform.) If theclkidoption is not specified, the default value for the platform is used. Use the commandsdscc –sds-pf-listto list available platforms and settings.

Platform Value of
zc702 0 – 166 MHz
1 – 142 MHz
2 – 100 MHz
3 – 200 MHz
zc706 0 – 166 MHz
1 – 142 MHz
2 – 100 MHz
3 – 200 MHz
zed and microzed 0 – 166 MHz
1 – 142 MHz
2 – 100 MHz
3 – 200 MHz
zybo 0 – 25 MHz
1 – 100 MHz
2 – 125 MHz
3 – 50 MHz
zcu102_es1 0 – 100 MHz
1 – 150 MHz
2 – 200 MHz
3 – 300 MHz
zcu102_es2 0 – 100 MHz
1 – 150 MHz
2 – 200 MHz
3 – 300 MHz

-files file_list

Specify a comma-separated list (without white space) of one or more files required to compile the current top-level function into hardware using Vivado® HLS. If any of these files contain source code that is not used by HLS but is required to produce the application executable, they must be compiled separately to create object files (.o), and linked with other object files during the link phase.

When using the AuvizCV library, the-filesoption specifies the path to the source file containing the function template definition, for exampleau_canny.hpp.

-hls-tcl hls_tcl_directives_file

When using the Vivado® HLS tool to synthesize the hardware accelerator, source the specified Tcl file containing HLS directives. During HLS synthesis, sdscccreates a run.tclfile used to drive the Vivado HLS tool and in this Tcl file, the following commands are inserted:
# synthesis directives create_clock -period  set_clock_uncertainty 27.0% config_rtl -reset_level low source  # end synthesis directives

If the-hls-tcloption is used, the user-defined Tcl file is sourced after the synthesis directives generated by the SDSoC environment.

-mno-lint

Suppress the static analysis of hardware accelerator source files. This linting process checks for potential errors or issues in the source file. This option should only be used if the analysis prevents generation of the hardware accelerator and you are certain that you can continue.

-shared-aximm

Share AXIMM ports instead of enabling multiple ports.