The University of Southampton
University of Southampton Institutional Repository

Synthesisable recursion for C++ HLS tools

Synthesisable recursion for C++ HLS tools
Synthesisable recursion for C++ HLS tools

C-based HLS tools continue to improve in analysis and optimisation, but are still restricted to a subset of C functionality. A C language feature missing from all common HLS tools is recursion, which makes it difficult and time consuming to write many types of programs in HLS. This paper presents a technique for implementing recursion as an Embedded Domain Specific Language (EDSL) in C++, utilising the C++ front-end of a HLS compiler to build the state machines and stacks, while ensuring the code presented to the back-end is completely synthesisable. While the EDSL is not pure C, it provides a user-friendly language that can be trivially translated from a recursive C program, and can contain calls to plain C for compute-intensive leaf functions. HLSRecurse is a platform independent library that allows the same program to be compiled using g++, clang, Legup, or Vivado HLS, and have the same execution semantics. The performance of HLSRecurse is evaluated in software and hardware using three micro-benchmarks of the underlying state-machine builder, and five practical examples of real recursive programs including a Sudoku solver, Strassen multiplication, and adaptive Monte-Carlo integration. We show that for Vivado HLS the DSL provides the same area-time product as manually converted programs, while in Legup the DSL increases the area-time product by 1.5×.

1063-6862
91-98
IEEE
Thomas, David B.
5701997d-7de3-4e57-a802-ea2bd3e6ab6c
Thomas, David B.
5701997d-7de3-4e57-a802-ea2bd3e6ab6c

Thomas, David B. (2016) Synthesisable recursion for C++ HLS tools. In 2016 IEEE 27th International Conference on Application-Specific Systems, Architectures and Processors, ASAP 2016. vol. 2016-November, IEEE. pp. 91-98 . (doi:10.1109/ASAP.2016.7760777).

Record type: Conference or Workshop Item (Paper)

Abstract

C-based HLS tools continue to improve in analysis and optimisation, but are still restricted to a subset of C functionality. A C language feature missing from all common HLS tools is recursion, which makes it difficult and time consuming to write many types of programs in HLS. This paper presents a technique for implementing recursion as an Embedded Domain Specific Language (EDSL) in C++, utilising the C++ front-end of a HLS compiler to build the state machines and stacks, while ensuring the code presented to the back-end is completely synthesisable. While the EDSL is not pure C, it provides a user-friendly language that can be trivially translated from a recursive C program, and can contain calls to plain C for compute-intensive leaf functions. HLSRecurse is a platform independent library that allows the same program to be compiled using g++, clang, Legup, or Vivado HLS, and have the same execution semantics. The performance of HLSRecurse is evaluated in software and hardware using three micro-benchmarks of the underlying state-machine builder, and five practical examples of real recursive programs including a Sudoku solver, Strassen multiplication, and adaptive Monte-Carlo integration. We show that for Vivado HLS the DSL provides the same area-time product as manually converted programs, while in Legup the DSL increases the area-time product by 1.5×.

This record has no associated files available for download.

More information

Published date: 6 July 2016
Additional Information: Publisher Copyright: © 2016 IEEE. Copyright: Copyright 2017 Elsevier B.V., All rights reserved.
Venue - Dates: 27th IEEE International Conference on Application-Specific Systems, Architectures and Processors, ASAP 2016, , London, United Kingdom, 2016-07-06 - 2016-07-08

Identifiers

Local EPrints ID: 453662
URI: http://eprints.soton.ac.uk/id/eprint/453662
ISSN: 1063-6862
PURE UUID: b17b7ff8-4a18-48a2-9ea3-7bb0c89303fd
ORCID for David B. Thomas: ORCID iD orcid.org/0000-0002-9671-0917

Catalogue record

Date deposited: 20 Jan 2022 17:45
Last modified: 17 Mar 2024 04:10

Export record

Altmetrics

Contributors

Author: David B. Thomas ORCID iD

Download statistics

Downloads from ePrints over the past year. Other digital versions may also be available to download e.g. from the publisher's website.

View more statistics

Atom RSS 1.0 RSS 2.0

Contact ePrints Soton: eprints@soton.ac.uk

ePrints Soton supports OAI 2.0 with a base URL of http://eprints.soton.ac.uk/cgi/oai2

This repository has been built using EPrints software, developed at the University of Southampton, but available to everyone to use.

We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we will assume that you are happy to receive cookies on the University of Southampton website.

×