03-setup.tex 11.9 KB
Newer Older
Stefan Tauner's avatar
Stefan Tauner committed
1
\section{Configuration}
2
\label{sec:setup}
Christian Fibich's avatar
Christian Fibich committed
3

Christian Fibich's avatar
Christian Fibich committed
4
5
The \textit{\ac{FIJI} Setup} Tool provides a graphical user interface to
create and edit a \textit{\ac{FIJI} Configuration} that can be used to
6
7
8
9
10
instrument a netlist and run fault injection tests. It helps the user
by checking the sanity of entered values, and eases
net and driver selection by displaying suggestions parsed from the
netlist.

Christian Fibich's avatar
Christian Fibich committed
11
Although \textit{\ac{FIJI} Setup} is a graphical tool, it accepts the
12
13
14
15
16
following \underline{optional} command-line arguments:

\begin{itemize}
    \item \texttt{-s, {-}{-}settings-file=<filename>}

Christian Fibich's avatar
Christian Fibich committed
17
    Specifies a \textit{\ac{FIJI} Settings} file to load at startup
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

    \item \texttt{-n, {-}{-}netlist-file=<filename>}

    Specifies a netlist file to load at startup
    
    \item \texttt{-h, {-}{-}help}

   Displays usage information on the terminal and exits
\end{itemize}


The main GUI elements can be seen in Figure~\ref{fig:setup}. The user
interface consists of (1) the \textit{Control Area}, (2) \textit{Tabs}
for selecting different categories of values to be entered, (3) the
\textit{Main Panel}, (4) the \textit{Resource Panel} and (5) the \textit{Navigation Panel}.


\begin{figure}[ht]
Christian Fibich's avatar
Christian Fibich committed
36
\centering
37
\input{img/fiji_setup_screenshot_marked}
Christian Fibich's avatar
Christian Fibich committed
38
39
%\includegraphics[width=0.85\linewidth]{img/\ac{FIJI}_setup_screenshot.png}
\caption{\ac{FIJI} Setup Tool}
40
41
42
43
\label{fig:setup}
\end{figure}

Using the \textit{Control Area}, file operations can be performed:
Christian Fibich's avatar
Christian Fibich committed
44
The user can select to load a \textit{\ac{FIJI} Configuration} file from disk
45
46
47
48
49
50
51
52
53
or save the current configuration to a file. Additionally, a Verilog
netlist file can be loaded.
These actions can be performed both via the buttons in the \textit{Control
Area} and the Menubar above. The settings file currently edited is 
displayed along with the currently loaded netlist.
Using the \textit{Help} menu entry, license information as well as 
this help document can be retrieved.

Upon startup, when no configuration file is specified via command-line
Christian Fibich's avatar
Christian Fibich committed
54
options, \textit{\ac{FIJI} Setup} starts with a default configuration with
55
56
57
58
59
some values already filled in. This configuration can either be used to
create a customized configuration using the GUI, or saved to a file and
edited manually using a text editor.

A netlist must be loaded to perform netlist-related tasks 
Christian Fibich's avatar
Christian Fibich committed
60
(choosing nets, pin names, and drivers). When a netlist is loaded, \ac{FIJI}
61
analyzes the contained Verilog modules and builds an internal representation
Christian Fibich's avatar
Christian Fibich committed
62
using Perl objects. Thus, larger netlists may take a while to load. During
63
64
65
66
67
68
69
70
71
72
73
this time, a loading screen barring the user from interaction with the
GUI is displayed.

For clarity, the GUI separates the different configuration topics into
different \textit{Tabs}. The following topics are available for
configuration:

\begin{itemize}
    \item \underline{General Settings}

          Settings for the instrumentation and synthesis process,
Christian Fibich's avatar
Christian Fibich committed
74
          as well as settings for the serial communication between \ac{FIJI} and host
75
76
77
78
          and the fault injection timers are subsumed under this tab.

    \item \underline{Clock Settings}
    
Christian Fibich's avatar
Christian Fibich committed
79
          The \textit{\ac{FIJI}} fault injection logic is clocked from the
80
81
82
83
84
          clock of the clock domain in the DUT where faults are injected.
          The name and frequency of this clock net need to be specified.

    \item \underline{LFSR Settings}

Christian Fibich's avatar
Christian Fibich committed
85
          \textit{\ac{FIJI}} emulates floating nets caused by \textit{Stuck-open}
86
          faults by forcing pseudo-random binary levels onto the respective
Christian Fibich's avatar
Christian Fibich committed
87
          net. These levels are derived from the value of a \textit{Linear
88
89
90
91
92
93
94
          Feedback Shift Register}. In this tab, the width, polynomial,
          and starting value of this register can be configured.
          See \ref{sec:lfsrtable} for a list of complete LFSR polynomials
          for different lengths.

    \item \underline{External Reset}

Christian Fibich's avatar
Christian Fibich committed
95
          The \ac{FIJI} logic can be configured to be reset from an external
96
97
98
          pin. This feature can be turned on and off in this tab.
          If an external reset pin is desired, the polarity and name must be entered.

Christian Fibich's avatar
Christian Fibich committed
99
    \item \underline{Reset from DUT to \ac{FIJI}}
100
101
        
          In addition to the external reset via pin, also any net of the
Christian Fibich's avatar
Christian Fibich committed
102
          DUT can be used to reset the \ac{FIJI} logic. This feature can be
103
104
          turned on and off in this tab. If an internal reset from the
          DUT is desired, the polarity and source net name must be entered.
Christian Fibich's avatar
Christian Fibich committed
105
106
          When the \textit{Reset from DUT to \ac{FIJI}} feature is used, the
          \textit{Reset from \ac{FIJI} to DUT} feature cannot be used at the
107
108
          same time.
          If both the external reset feature and the reset from DUT to
Christian Fibich's avatar
Christian Fibich committed
109
110
          \ac{FIJI} are enabled, the reset sources are ORed together and used
          as the \ac{FIJI} logic's asynchronous reset signal.
111

Christian Fibich's avatar
Christian Fibich committed
112
    \item \underline{Reset from \ac{FIJI} to DUT}
113

Christian Fibich's avatar
Christian Fibich committed
114
          In contrast to the feature described above, the \ac{FIJI} logic can
115
          also be used as a source for a reset net in the DUT.
Christian Fibich's avatar
Christian Fibich committed
116
117
118
          When the \textit{Reset from \ac{FIJI} to DUT} feature is used, the
          \textit{Reset from DUT to \ac{FIJI}} feature cannot be used at the
          same time. If an internal reset from \ac{FIJI} to the DUT is desired,
119
120
121
122
123
124
          the polarity, target net name, and desired reset pulse duration
          must be entered.

    \item \underline{Trigger Settings}

          In order to support dynamic test execution depending on 
Christian Fibich's avatar
Christian Fibich committed
125
          events external to \ac{FIJI}, trigger signals can be used to 
126
127
128
          continue a suspended test execution.
          Both an external trigger via an FPGA pin as well as an internal
          trigger using a net in the DUT as a source can be used. The
Christian Fibich's avatar
Christian Fibich committed
129
          \ac{FIJI} logic can be instructed at runtime if it shall wait for
130
131
132
133
134
135
136
137
138
139
140
          the internal or external trigger signal.
          For both the internal and the external trigger facilities,
          the respective pin or net name and polarity must be specified.

    \item \underline{Fault Detection Settings}

          The value of up to two nets in the DUT can be communicated back to the
          host as a means for fault detection. The names and \textit{error}
          levels of these nets need to be specified when they are used.


Christian Fibich's avatar
Christian Fibich committed
141
    \item \underline{\acp{FIU}}
142
143
144
145
          
          Here, the actual fault injection capabilities of the instrumented
          design are configured. For each net into which faults shall be 
          injected at runtime, a \textit{Fault Injection Unit} needs to 
Christian Fibich's avatar
Christian Fibich committed
146
          be added. Each \ac{FIU} has an associated net, a driver for this net,
147
148
149
150
151
          and fault injection capabilities to be configured.
\end{itemize}

The left hand side of the \textit{Main Area} displays a graphical representation
of the current hardware configuration in all tabs. Changes in the configuration
Christian Fibich's avatar
Christian Fibich committed
152
such as added \ac{FIU}s and changed signal polarities are reflected in this
153
154
155
156
block diagram immediately. Some blocks and signals provide additional
information when the cursor hovers above them. On the right hand side 
of the \textit{Main Area} the configuration items for the current tab
are displayed. Each time a value is updated in one of the configuration
Christian Fibich's avatar
Christian Fibich committed
157
items, \textit{\ac{FIJI} Setup} checks for sanity and validity of the entered
158
159
160
161
value. If a check fails, the corresponding field is marked in red until
a valid value is entered. Also fields which cannot yet be verified
(e.g., net names, when no netlist is loaded) are marked in this way. 
Nevertheless, it is possible to save a configuration with values deemed
Christian Fibich's avatar
Christian Fibich committed
162
invalid by \textit{\ac{FIJI} Setup}. A warning is issued before such configuration
163
164
is saved.

Christian Fibich's avatar
Christian Fibich committed
165
166
167
168
In the \ac{FIU} tab as shown in Figure~\ref{fig:FIUtab}, the user may add fault
injection units using the \textit{Append Empty \ac{FIU}} button and remove 
them selectively using the trash can icon next to each \ac{FIU}.
Added \ac{FIU}s are ``empty'', i.e., they have no associated net and driver.
169

Christian Fibich's avatar
Christian Fibich committed
170
171
172
173
174
175
176
177
\begin{figure}[ht]
\centering
\input{img/fiji_setup_fius_marked}
%\includegraphics[width=0.85\linewidth]{img/\ac{FIJI}_setup_screenshot.png}
\caption{\ac{FIJI} Setup Tool: \ac{FIU} Tab}
\label{fig:FIUtab}
\end{figure}

Christian Fibich's avatar
Christian Fibich committed
178
The \ac{FIU}s can be configured in the following way:
Christian Fibich's avatar
Christian Fibich committed
179
180
181
182
Once a netlist is loaded, the user may start with selecting a net to be
instrumented. This is done using a filter dialog which is opened by pressing
the \textit{Select} button next to the net entry field (1).
An example for this dialog is shown in Figure~\ref{fig:netsel}. The entry field across
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
the top may be used to specify a hierarchical path to a net as perl-style regular expression\footnote{This means that the backslashes and other regex meta characters in escaped identifiers need to be escaped themselves, e.g. for net ``\texttt{{\textbackslash}escaped.identifier }'' write ``\texttt{{\textbackslash}{\textbackslash}escaped{\textbackslash}.identifier }''}.

A hierarchical path shall be constructed as follows:

\begin{verbatim}
<hierarchical-path> ::= <top> "/" <net> | <top> <cell-list> "/" <net>
<cell-list>         ::= "/" <cell> | <cell-list> "/" <cell>
<top>               ::= Toplevel module name
<net>               ::= Net name
<cell>              ::= Cell name
\end{verbatim}

A hierarchical path starts with the name of the toplevel module, then
contains a path of instantiation names, and finally, the name of a net.
The forward slash character \texttt{`/'} is used as a separator between
module, instantiation, and net names.

Once the user presses the \textit{Search} button, all matching
Christian Fibich's avatar
Christian Fibich committed
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
nets are displayed in the left list box (``Matching nets''). The desired net
can now be selected for fault injection by first selecting it in the
left list box and then pressing the ``\textgreater'' button. Once a net is selected,
it is shown in the list box on the right. Now, clicking ``OK'' selects this
net for the current \ac{FIU}. An already selected net may be de-selected
by pressing the ``\textless'' button. The net selection dialog is used
wherever a net has to be selected: Also the clock net and the fault detection
nets are selected using this method.

\begin{figure}[ht]
\centering
\includegraphics[width=0.6\linewidth]{img/fiji_net_selection.png}
\caption{\ac{FIJI} Setup Tool: Net selection dialog}
\label{fig:netsel}
\end{figure}

Once a net is selected, \textit{\ac{FIJI} Setup} checks if this net is actually
218
219
220
221
222
223
present in the DUT netlist. The user must then select the driver for
this net using the \textit{Driver} button (3). This opens up a dialog
with all possible driver objects for this net prompting the user to select
one of these options.
Additionally, the supported fault model can be selected (2). If the fault
model \textit{RUNTIME} is selected, all fault models are supported by
Christian Fibich's avatar
Christian Fibich committed
224
225
226
this \ac{FIU} and can be activated at runtime. In order to save resources and
timing budget, each \ac{FIU} can also be configured to support only a single
fault model. At runtime, this \ac{FIU} can then only be switched between the
227
228
229
230
231
232
233
234
selected fault model and fault-free operation.
For the emulation of a floating net, the output of an LFSR is used (see above).
Using the \textit{LFSR mask} element (4), the user needs to select a 
bit mask at most as wide as the LFSR. The bits of the
LFSR corresponding to `1`s in the \textit{mask} are ANDed together,
resulting in the ``floating'' value of the
corresponding net.

Christian Fibich's avatar
Christian Fibich committed
235

236
237
238
239
240
241
242
243
244
245
246
247

At the bottom of the user interface (see Figure~\ref{fig:setup}),
the \textit{Resource Panel} (4) displays the combinational resources
(i.e., LUTs) and the registers needed to implement the current 
configuration \textit{in relation to the default configuration}.
Absolute resource numbers for different FPGA families are shown
in Table~\ref{tab:resources}.
Within the \textit{Button Panel} (5), the \text{Next} and \textit{Back}
buttons provide additional navigation through the tabs. The \textit{Open
Documentation} button displays this document in a PDF reader.


Christian Fibich's avatar
Christian Fibich committed
248
Alternatively, a \textit{\ac{FIJI} Configuration} can be created manually using
249
a text editor. A template file can be generated by saving the default
Christian Fibich's avatar
Christian Fibich committed
250
configuration out of the \textit{\ac{FIJI} Setup Tool}.