Back to search

McGill University

Hardware acceleration for elementary functions and RISC-V processor

Abstract

dc:description.abstract

Many scientific applications rely on the evaluation of elementary transcendental functions (e.g. $\log{(x)}$, $\frac{1}{x}$, $\sqrt{x}$, ex). Software math libraries are a popular approach for realizing such functions, and frequently use series expansion and/or lookup-table-based (LUT-based) methods. However, software approaches necessarily suffer from the traditional overheads of fetching/decoding instructions, limited cache sizes, and so on. To this end, we present hardware accelerators for such functions that deliver high computational throughput, high accuracy and a small circuit. We implement the reciprocal ($\frac{1}{x}$) and square root ($\sqrt{x}$) functions into pipelined hardware accelerators on FPGA. The proposed accelerators are designed with iterative, and LUT-based algorithms. Here, the LUT-based algorithm uses approximately 1 KB LUT along with a degree-2 polynomial interpolation. All algorithms are specified using C language, and synthesized into RTL with the LegUp HLS~\cite{leguplegup}. In an experimental study, we compare our LUT-based accelerators with IP cores from the Intel/Altera FPGA vendor. Results show that our LUT-based accelerators offer considerably better area usage, while Intel/Altera IP cores operate at a modestly higher throughput. Both ours and Intel/Altera IP cores achieve 1 ULP error. The LUT-based algorithm is generic in the sense that it could be used to implement an entire library of single-precision elementary functions into high-performance hardware accelerators.We also implement a 32-bit integer RISC-V~\cite{riscv} multi-cycle processor on FPGA, which consists of 39 user instructions. The processor is specified using C language, and synthesized into RTL with the LegUp HLS~\cite{leguplegup}. Custom testing programs are developed to verify if each instruction adheres to the RISC-V specification. We demonstrate that through changes to the \texttt{C} specification and HLS constraints, RISC-V processors with different performance/area trade-offs can be explored rapidly. One implementation of the multi-cycle processor uses 795 ALMs (adaptive logic modules) on an Intel/Altera Cyclone V FPGA, and is operable at 124.1 MHz. We believe that, in the future, integrating high-performance elementary transcendental function accelerators into a RISC-V soft processor on FPGAs may bring significant performance benefits to accelerate compute-intensive applications

Degree

thesis:*
Name thesis:degree_name
Doctor of Philosophy
Grantor dc:publisher
McGill University
Year dc:date.issued
2020

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Chen, Jing
Advisor dc:contributor.advisor
  • Liu, Xue (Supervisor)

Subjects

dc:subject × 1

Rights

dc:rights
Statement dc:rights
  • All items in eScholarship@McGill are protected by copyright with all rights reserved unless otherwise indicated.
Language dc:language.iso
en

Identifiers

dc:identifier.*
OCLC
1199006597
Dc Identifier Other
hyrax:jd4731773

Chain of custody

source
Harvested from
McGill University
Base URL
mcgill.scholaris.ca/server/oai/request
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
related terms
citation

Chen, Jing. Hardware acceleration for elementary functions and RISC-V processor. McGill University, 2020. https://doi.org/10.82308/28519