SDSCC/SDS++ Performance Estimation Flow Options

A full bitstream compile can take much more time than a software compile, so sdscc provides performance estimation options to compute the estimated run-time improvement for a set of hardware function calls. In the SDSoC environment Project Overview window, invoke the estimator by clicking on Estimate Performance, which enables performance estimation for the current build configuration and builds the project.

Estimating the speed-up is a two phase process. First, the SDSoC environment compiles the hardware functions and generates the system. Instead of synthesizing the system to bitstream, sdscc computes an estimate of the performance based on estimated latencies for the hardware functions and data transfer time estimates for the callers of hardware functions. In the generated Performance report, select Click Here to run an instrumented version of the software on the target to determine a performance baseline and the performance estimate (see Introduction for more information).

You can also generate a performance estimate from the command line. As a first pass to gather data about software runtime, you use the -perf-funcs option to specify functions to profile and -perf-root to specify the root function encompassing calls to the profiled functions. The sdscc compiler then automatically instruments these functions to collect run-time data when the application is run on a board. When you run an "instrumented" application on the target, the program creates a file on the SD card called swdata.xml, which contains the run-time performance data for the run.

Copy swdata.xml to the host and run a build that estimates the performance gain on a per hardware function caller basis and for the top-level function specified by the –perf-root function in the first pass run. Use the –perf-est option to specify swdata.xml as input data for this build.

The following table specifies the sdscc options normally used to build an application.

Option Description
-perf-funcs function_name_list Specify a comma separated list of all functions to be profiled in the instrumented software application.
-perf-root function_name Specify the root function encompassing all calls to the profiled functions. The default is the function main.
-perf-est data_file Specify the file contain runtime data generated by the instrumented software application when run on the target. Estimate performance gains for hardware accelerated functions. The default name for this file is swdata.xml.
-perf-est-hw-only Run the estimation flow without running the first pass to collect software run data. Using this option provides hardware latency and resource estimates without providing a comparison against baseline.

After running the sd_card image on the board for collecting profile data, run cd /; sync; umount /mnt;. This ensures that the swdata.xml file is written out to the SD card.

A complete example of the makefile-based flow for performance estimation can be found in <sdsoc_root>/samples/mmult_performance_estimation.