summaryrefslogtreecommitdiffstats
path: root/main.tex
blob: 669541773f4fa684cf682a229dd5ed2036edf31b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
\documentclass[hyphens,prologue,x11names,rgb,sigconf]{acmart}

\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{siunitx}
\usepackage{minted}
\usepackage{amsthm}
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage{subcaption}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{hyperref}
%\usepackage{balance}

\copyrightyear{2020}
\acmYear{2020}
\setcopyright{acmcopyright}
\acmConference[FPGA '20]{Proceedings of the 2020 ACM/SIGDA International Symposium on Field-Programmable Gate Arrays}{February 23--25, 2020}{Seaside, CA, USA}
\acmBooktitle{Proceedings of the 2020 ACM/SIGDA International Symposium on Field-Programmable Gate Arrays (FPGA '20), February 23--25, 2020, Seaside, CA, USA}
\acmPrice{15.00}
\acmDOI{10.1145/3373087.3375310}
\acmISBN{978-1-4503-7099-8/20/02}

%%
%% The majority of ACM publications use numbered citations and
%% references.  The command \citestyle{authoryear} switches to the
%% "author year" style.
%%
%% If you are preparing content for an event
%% sponsored by ACM SIGGRAPH, you must use the "author year" style of
%% citations and references.
%% Uncommenting
%% the next command will enable that style.
%% \citestyle{acmauthoryear}

%%
%% end of the preamble, start of the body of the document source.
\begin{document}

%%
%% The "title" command has an optional parameter,
%% allowing the author to define a "short title" to be used in page headers.
\title{Fuzzing HLS}

%%
%% The "author" command and its associated commands are used to define
%% the authors and their affiliations.
%% Of note is the shared affiliation of the first two authors, and the
%% "authornote" and "authornotemark" commands
%% used to denote shared contribution to the research.
\author{Zewei Du}
\email{email@imperial.ac.uk}
\affiliation{%
  \institution{Imperial College London}
  \streetaddress{South Kensington Campus}
  \city{London}
  \country{UK}
  \postcode{SW7 2AZ}
}

\author{Yann Herklotz}
\email{yann.herklotz15@imperial.ac.uk}
\affiliation{%
  \institution{Imperial College London}
  \streetaddress{South Kensington Campus}
  \city{London}
  \country{UK}
  \postcode{SW7 2AZ}
}

\author{Nadesh Ramanathan}
\email{email@imperial.ac.uk}
\affiliation{%
  \institution{Imperial College London}
  \streetaddress{South Kensington Campus}
  \city{London}
  \country{UK}
  \postcode{SW7 2AZ}
}

\author{John Wickerson}
\email{j.wickerson@imperial.ac.uk}
\affiliation{%
  \institution{Imperial College London}
  \streetaddress{South Kensington Campus}
  \city{London}
  \country{UK}
  \postcode{SW7 2AZ}
}

%%
%% By default, the full list of authors will be used in the page
%% headers. Often, this list is too long, and will overlap
%% other information printed in the page headers. This command allows
%% the author to define a more concise list
%% of authors' names for this purpose.
\renewcommand{\shortauthors}{Short Authors}

%%
%% The abstract is a short summary of the work to be presented in the
%% article.
\begin{abstract}
Abstract
\end{abstract}

%%
%% The code below is generated by the tool at http://dl.acm.org/ccs.cfm.
%% Please copy and paste the code instead of the example below.
%%

\begin{CCSXML}
<ccs2012>
<concept>
<concept_id>10010583.10010682</concept_id>
<concept_desc>Hardware~Electronic design automation</concept_desc>
<concept_significance>500</concept_significance>
</concept>
<concept>
<concept_id>10010583.10010682.10010689</concept_id>
<concept_desc>Hardware~Hardware description languages and compilation</concept_desc>
<concept_significance>500</concept_significance>
</concept>
<concept>
<concept_id>10011007.10011074.10011099</concept_id>
<concept_desc>Software and its engineering~Software verification and validation</concept_desc>
<concept_significance>500</concept_significance>
</concept>
</ccs2012>
\end{CCSXML}

\ccsdesc[500]{Hardware~Electronic design automation}
\ccsdesc[500]{Hardware~Hardware description languages and compilation}
\ccsdesc[500]{Software and its engineering~Software verification and validation}

%%
%% Keywords. The author(s) should pick words that accurately describe
%% the work being presented. Separate the keywords with commas.
\keywords{fuzzing}

%%
%% This command processes the author and affiliation and title
%% information and builds the first part of the formatted document.
\maketitle

\section{Introduction}

High-level synthesis (HLS) is increasingly important. It is being adopted both by hardware engineers aiming to increase their productivity, and by software engineers aiming to attain the performance and energy-efficiency of custom hardware. It is even being used in safety-critical settings \cite{?}. As such, HLS tools are increasingly trusted. But are they trustworthy? In this paper, we investigate how reliable existing HLS tools are.

Our method is brought over from the compiler testing literature. We use a tool called Csmith~\cite{yang11_findin_under_bugs_c_compil} to generate well-formed C programs from the subset of the C language that is supported by all the HLS tools we test. We synthesise each C program to RTL, and use a Verilog simulator to calculate its return value. If synthesis crashes, or if this return value differs from the return value obtained by executing a binary compiled from the C program by gcc, then we have found a candidate bug. We then use trial-and-error to reduce the C program to a minimal version that still triggers a bug.

We have tested three widely used HLS tools: LegUp~\cite{canis13_legup}, Xilinx Vivado HLS~\cite{xilinx20_vivad_high_synth}, and the Intel HLS Compiler~\cite{?}. For all three tools, we were able to find valid C programs that cause crashes while compiling and valid C programs that cause wrong RTL to be generated. We have submitted a total of \ref{?} bug reports to the developers, \ref{?} of which have been confirmed and \ref{?} of which have now been fixed at the time of writing.

\section{Method}
\begin{itemize}
\item How Csmith works.
\item How we configure Csmith so that it only generates HLS-friendly programs.
\item How we process the programs generated by Csmith to add in labels on loops etc.
\item How we generate a TCL script for each program.
\item How we run each HLS tool, using timeouts as appropriate.
\end{itemize}

%\begin{acks}
%For final version of paper. 
%\end{acks}

\bibliographystyle{ACM-Reference-Format}
\bibliography{conference.bib}

\end{document}
\endinput

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End: