ProfCounter: LineLevel Cycle Counter for Xilinx OpenCL HighLevel Synthesis Wide adoption of FieldProgrammable Gate Arrays for computeintensive problems has always been barred by the complex development flow, requiring hardware expert staff and extensive exploration effort. With the recent developments in HighLevel Synthesis, it is possible to use highlevel languages (e.g. C, C, OpenCL) to produce hardware projects with reasonable results. However, several software development assist tools are still absent or provided with limited functionalities. In this paper ProfCounter is presented, consisting of a module capable of providing finegrain profiling by measuring the latency of inner segments of OpenCL kernels. Thus, developers are able to perform analyses of specific parts of the code which can assist on code optimisations, by considering complex interactions between the kernel and other modules (e.g. DDR memory, cache) where cycleaccurate simulators are not able to properly model. Results show that ProfCounter is able to measure the cycle count of OpenCL kernels segments in the Xilinx environment and its overhead does not scale according to hardware complexity nor with the amount of measurements.

Synchronizing OnChip Software and Hardware Traces for HLSAccelerated Programs Complex designs generated from modern highlevel synthesis tools allow users to take advantage of heterogeneous systems, splitting the execution of programs between conventional processors, and hardware accelerators. While modern HLS tools continue to improve in efficiency and capability, debugging these designs has received relatively minor attention. Fortunately, recent academic work has provided the first means to debug these designs using hardware and software traces. Though these traces allow the user to analyze the flow of execution on both the software and hardware individually, they provide no means of synchronization to determine how operations on one device affect the other. We address this challenge by introducing a synchronization technique that keeps track of operations on shared objects. We identify objects shared between hardware and software and their memory operations, and use unique identifiers to synchronize the traces around these operations. We explore the added costs of this technique on execution time and hardware and software resources, and ways to reduce it through multiple synchronization schemes. This is demonstrated in an opensource prototype targeting the hybrid flow of the opensource HLStool LegUp.