US 12,423,060 B2
Method and system for non-intrusive profiling of high-level synthesis (HLS) based applications
Nupur Sumeet, Thane West (IN); Manoj Karunakaran Nambiar, Thane West (IN); and Deeksha Kashyap, New Delhi (IN)
Assigned to TATA CONSULTANCY SERVICES LIMITED, Mumbai (IN)
Filed by Tata Consultancy Services Limited, Mumbai (IN)
Filed on Dec. 21, 2022, as Appl. No. 18/086,248.
Claims priority of application No. 20222101711.1 (IN), filed on Mar. 25, 2022.
Prior Publication US 2023/0305814 A1, Sep. 28, 2023
Int. Cl. G06F 8/20 (2018.01)
CPC G06F 8/20 (2013.01) 7 Claims
OG exemplary drawing
 
1. A processor implemented method for non-intrusive profiling of High-Level Synthesis (HLS) applications, the method comprising:
synthesizing a design for a source code for an HLS based application executed on a Field Programmable Gate Arrays (FPGA), by one or more hardware processors, using an HLS compiler, in accordance with a synthesis time period, wherein the design is specified by the HLS compiler in terms of a plurality of hardware description language (HDL) files, a synthesis report, a verbose binding report and a plurality of database files, wherein the HLS compiler converts the source code of the HLS based application developed in a high-level language to a low-level HDL implementation using steps of scheduling, binding, and control extraction, and wherein logic operations of the source code are distributed through a clock cycles of the FPGA in scheduling and a number of the logic operations depends on a clock frequency, optimization directives and a technology library of the FPGA, and the binding assigns hardware resources of the FPGA for carrying out the logic operation which are scheduled using a state machine by the step of control extraction;
co-simulating the design of the plurality of HDL files, by the one or more hardware processors using a co-simulator, based on a test bench identified for the source code to generate a Value Change Dump (VCD) file comprising a plurality of HDL signals in the plurality of HDL files cycle-by-cycle and a corresponding plurality of HDL signal values for an entire execution time at every time instant with a plurality of commands, wherein the co-simulation denotes dynamic behavior of the design depending on a run-time value of design variables, wherein a designer reviews generated waveform from co-simulation using a wave viewer to analyze temporal changes of the plurality of HDL signals captured in a form of the VCD file;
extracting structured information, by the one or more hardware processors, using an HLS profiler by:
(a) parsing the VCD file to generate a timing information for the plurality of HDL signals from the plurality of HDL files with the corresponding plurality of HDL signal values;
(b) parsing the synthesis report to generate a plurality of module names to which the plurality of HDL signals belong and a corresponding plurality of source code functions;
(c) parsing the verbose binding report to link an initial name to an HDL signal name for each of the plurality of HDL signals;
(d) parsing the plurality of HDL files to obtain whether the HDL signal name, associated with each of the plurality of HDL signals, is one of a wire and a register;
(e) parsing the source code to record a plurality of variables, a plurality of array variables, a precision data type status, and a multiplication status at a line number for each of a plurality of code lines of the source code; and
(f) parsing the plurality of database files to link the initial name for each of the HDL signals to the plurality of variables in the source code;
analyzing, by the one or more hardware processors, using the HLS profiler, the extracted structured information to form associations between every line of the source code to the clock cycle, wherein the HLS profiler analyzes the extracted structured information in accordance with one or more rules from a set of associative rules to define associations between the line number of the source code, the plurality of variables, the HDL signal name for each of the plurality of HDL signals and the corresponding plurality of HDL signal values providing visibility into cycle-by-cycle hardware execution of the source-code for entire HLS based application execution time to generate a performance profile table for the source code; and
communicating the generated performance profile table for the source code with a developer to fine-tune the performance of the design of the source code using the HLS profiler by identifying performance bottlenecks, optimizing the performance bottlenecks, and updating the source code with a pragma directive.