cc7073016c544f09e92078ef476d69cddad043c3
[fleet.git] / am33.tex
1 \documentclass[10pt]{article}
2 \usepackage{palatino}
3 \usepackage{amsmath}
4 \usepackage{epsfig}
5 \usepackage{color}
6 \usepackage{bytefield1}
7 \usepackage{wrapfig}
8 \usepackage{stmaryrd}
9 \usepackage{subfigure}
10 \usepackage{syntax}
11 \usepackage{comment}
12 \usepackage{fancyhdr}
13 \usepackage{lastpage}
14 \include{megacz}
15 \bibliographystyle{alpha}
16 \pagestyle{fancyplain}
17
18 \definecolor{light}{gray}{0.7}
19
20 \newcommand{\footnoteremember}[2]{
21   \footnote{#2}
22   \newcounter{#1}
23   \setcounter{#1}{\value{footnote}}
24 } \newcommand{\footnoterecall}[1]{
25   \footnotemark[\value{#1}]
26 }
27
28 %\pdfpagewidth 8.5in
29 %\pdfpageheight 11in 
30 %\topmargin 0in
31 %\textheight 7.5in
32 %\textwidth 6.0in
33 %\oddsidemargin 0.25in
34 %\evensidemargin 0.25in
35 %\headwidth 6.0in
36 \def\to{\ $\rightarrow$\ }
37
38 \def\docnum{AM33}
39
40 \author{
41 \normalsize{
42 \begin{tabular}{c}
43 \end{tabular}}
44 }
45
46 \title{\vspace{-1cm}The FleetTwo Dock}
47
48 \begin{document}
49
50 \maketitle
51
52 \begin{abstract}
53 Changes:
54
55 \color{red}
56 \begin{tabular}{rl}
57 12-Mar
58 &  \\
59 \end{tabular}
60 \color{black}
61 \begin{tabular}{rl}
62 7-Mar
63 & Moved address bits to the LSB-side of a 37-bit instruction \\
64 & Added {\it micro-instruction} and {\it composite instruction} terms \\
65 & Removed the {\tt DL} field, added {\tt decrement} mode to {\tt loop} \\
66 & Created the {\tt Hold} field \\
67 & Changed how ReLooping works \\
68 & Removed {\tt clog}, {\tt unclog}, {\tt interrupt}, and {\tt massacre} \\
69 \end{tabular}
70 \end{abstract}
71
72 \vfill
73
74 \begin{center}
75 \epsfig{file=overview,width=1.5in}
76 \epsfig{file=ports,width=1.5in}
77 \epsfig{file=best,width=1.5in}
78 \end{center}
79
80 \pagebreak
81
82 \section{Overview of Fleet}
83
84 A Fleet processor consists of a {\it switch fabric} with several
85 functional units called {\it ships} connected to it.  At each
86 connection between a ship and the switch fabric lies a programmable
87 element known as the {\it dock}.
88
89 A {\it path} specifies a route through the switch fabric from a
90 particular {\it source} to a particular {\it destination}.  The
91 combination of a path and a single word {\it payload} is called a {\it packet}.  The
92 switch fabric carries packets from their sources to their
93 destinations.  Each dock has two destinations: one for {\it
94   instructions} and one for {\it data}.  A Fleet is programmed by
95 depositing packets into the switch fabric; these packets' paths lead
96 them to the instruction destinations of the docks.
97
98 When a packet arrives at the instruction destination of a dock, it is
99 enqueued for execution.  Before the instruction executes, it may cause
100 the dock to wait for a packet to arrive at the dock's data destination
101 or for a value to be presented by the ship.  It may present a data
102 value to the ship or transmit it for transmission to some other
103 destination.
104
105 When an instruction sends a packet into the switch fabric, it may
106 specify that the payload of the packet is irrelevant.  Such packets
107 are known as {\it tokens}, and consume less energy than data packets.
108 From a programmer's perspective, a token packet is indistinguishable
109 from a data packet with a unknown payload.
110
111 \begin{center}
112 \epsfig{file=overview,width=4in}\\
113 {\it Overview of a Fleet processor}
114 \end{center}
115
116 \pagebreak
117
118 \section{The Ship-Switch Fabric Interface}
119
120 The diagram below represents a {\it programmer's} conceptual view of
121 the interface between ships and the switch fabric.  Actual
122 implementation circuitry may differ substantially.  Sources and
123 destinations that can send and receive only tokens -- not data items
124 -- are drawn as dashed lines.
125
126 \begin{center}
127 \epsfig{file=ports,width=4in}\\
128 {\it The interface betwen the switch fabric and the ship}
129 \end{center}
130
131 The term {\it port} refers to an interface to the ship, the {\it
132   dock} connecting it to the switch fabric, and the corresponding
133 sources and destinations on the switch fabric.
134
135 Each dock consists of a {\it data latch}, which is as wide as a
136 single machine word and a {\it pump}, which is a circular fifo of
137 instruction-width latches.  The values in the instruction fifo
138 control the data latch.
139
140 Note that the pump in each dock has a destination of its own; this is
141 the {\it instruction destination} mentioned in the previous section.
142 Note that unlike all other destinations, there is no buffering fifo
143 guarding this one.  The size of these fifos are exposed to the
144 software programmer so she can avoid deadlock.
145
146 \pagebreak
147
148 \section{The FleetTwo Pump}
149
150 The diagram below shows the datapath for the FleetTwo pump circuitry.
151 The square box marked {\tt D} on the output from the {\tt IH} latch is
152 the instruction decoder, which decodes word-width instructions into a
153 set of control signals suitable for operating the pump.  The boxes
154 marked {\tt CD} are carry detectors.  These detect zero values in the
155 count and also generate the partial differences used in the decrement
156 operation.
157
158 \begin{center}
159 \epsfig{file=best,width=4in}\\
160 {\it The pump datapath}
161 \end{center}
162
163 The latches of primary interest here are:
164 \begin{itemize}
165 \item {\tt IH}: Instruction Horn (leaf node; may be shared)
166 \item {\tt F0}: Fifo Stage 0 (first fifo stage)
167 \item {\tt OD}: On Deck
168 \item {\tt F}: Flags, {\tt NF}: Next Flags
169 \item {\tt P}: Path (the path to use for outbound data/tokens)
170 \item {\tt D}: Data
171 \item {\tt DP}: Data Predecessor (ship for output ports, switch fabric for input ports)
172 \item {\tt DS}: Data Successor (switch fabric for output ports, ship for input ports)
173 \item {\tt RC}: Repeat Count, {\tt NRC}: Next Repeat Count
174 \item {\tt LC}: Loop Count, {\tt NLC}: Next Loop Count
175 \end{itemize}
176
177 Each instruction that executes causes the latches of the pump to fire
178 in two phases, denoted as the ``left phase'' and the ``right phase''.
179 In the diagram, the left phase latches are those to the left of the
180 vertical line down the center, and the right phase latches are to the
181 right.  Therefore each instruction execution requires two GasP
182 pipeline stages to complete.
183
184 \subsection{Flags}
185
186 The pump has four flags: {\tt A}, {\tt B}, {\tt S}, {\tt Z}.  Of
187 these four, only the first two may be modified directly by
188 instructions.
189
190 \begin{itemize}
191 \item The {\tt A} and {\tt B} flags are general-purpose flags which
192       may be set and cleared by the programmer.
193
194 \item The {\tt S} flag, known as the {\it summary} flag.  Its value is
195       determined by the ship, but unless stated otherwise, it should
196       be assumed that whenever the 37th bit of the data ({\tt D})
197       latch is loaded, that same bit is also loaded into the {\tt S}
198       flag.  This lets the ship make decisions based on whether or not
199       the top bit of the data latch is set; if two's complement
200       numbers are in use, this will indicate whether or not the
201       latched value is negative.
202
203 \item The {\tt Z} flag, known as the {\it zero} flag, is set whenever
204       the value in the loop counter ({\tt LC}) is zero.  This flag can
205       be used to perform certain operations (such as sending a
206       completion token) only on the last iteration of a loop.
207 \end{itemize}
208
209 Many instruction fields are specified as two-bit {\it predicates}.
210 These fields contain one of four values, indicating if an action
211 should be taken unconditionally or conditionally on one of the {\tt A}
212 or {\tt B} flags:
213
214 \begin{itemize}
215 \item {\tt 00:} if {\tt A} is set
216 \item {\tt 10:} if {\tt B} is set
217 \item {\tt 01:} if {\tt Z} is set ({\tt LC=0})
218 \item {\tt 11:} always
219 \end{itemize}
220
221 \pagebreak
222 \section{Instructions}
223
224 In order to cause an instruction to execute, the programmer must first
225 cause that instruction word to arrive in the data latch of some output
226 dock.  For example, this might be the ``data read'' output dock of the
227 memory access ship or the output of a fifo ship.  Once an instruction
228 has arrived at this output dock, it is {\it dispatched} by sending it
229 to the {\it instruction port} of the dock at which it is to execute.
230
231 Each instruction is 26 bits long, which makes it possible for an
232 instruction and an 11-bit path to fit in a single word of memory.
233 This path is the path from the {\it dispatching} dock to the {\it
234   executing} dock.
235
236 \setlength{\bitwidth}{3.5mm}
237 {\tt \footnotesize
238 \begin{bytefield}{37}
239   \bitheader[b]{0,10,11,36}\\
240   \bitbox{26}{instruction} 
241   \bitbox{11}{dispatch path} 
242 \end{bytefield}}
243
244 {\bf Note:} the instruction encodings below are simply ``something to
245 shoot at'' and a sanity check to make sure we haven't overrun our bit
246 budget.  The final instruction encodings will probably be
247 different.
248
249 All instruction words have the following format:
250
251 \setlength{\bitwidth}{3.5mm}
252 {\tt \footnotesize
253 \begin{bytefield}{37}
254   \bitheader[b]{0,10,11,36}\\
255 \color{black}
256   \bitbox{2}{Hold} 
257   \bitbox{2}{P} 
258 \color{light}
259   \bitbox[tbr]{22}{} 
260   \bitbox{11}{dispatch path} 
261 \color{black}
262 \end{bytefield}}
263
264 Each instruction word is called a {\it micro instruction}.
265 Collections of one or more micro instruction are known as {\it
266   composite instructions}.  The {\tt Hold} field indicates how micro
267 instructions are gathered together into composite instructions:
268
269 \begin{itemize}
270 \item {\tt 00:} {\tt solo} -- this word is not part of a composite instruction
271 \item {\tt 01:} {\tt soloT} -- like {\tt solo}, but {\tt torpedo}-able
272 \item {\tt 10:} {\tt body} -- this word is part of a composite instruction, but not the last
273 \item {\tt 11:} {\tt tail} -- this is the last micro instruction in a composite instruction
274 \end{itemize}
275
276 Solo instructions never reloop (described later); they are
277 ``one-shot'' instructions.  Multiple solo instructions may be in the
278 instruction fifo simultaneously.  A {\tt solo} instruction is immune
279 to {\tt torpedo}s (described later); a {\tt soloT} instruction is
280 not\footnote{the {\tt soloT} instruction is meant to be used for
281   ``standing repeating'' instructions}.
282
283 Composite instructions reloop until the loop counter is zero.  When a
284 composite instruction is in the instruction fifo, no other
285 instructions may enter the fifo.  A {\tt body} instruction is immune
286 to {\tt torpedo}s; a {\tt tail} instruction is not.  \color{black}
287
288 The abbreviation {\tt P} stands for {\it predicate}; this is a two-bit
289 code that indicates if the instruction should be executed or ignored.
290 If an instruction is ignored, it might still reloop.
291
292 \pagebreak
293 \subsection{RePeating and ReLooping}
294
295 \begin{table}[htp]
296 \centering
297 \begin{minipage}{3in}
298 \centering
299 \begin{center}
300 \begin{tabular}{|r|c|c|}\hline
301                       &  RePeating? & ReLooping? \\\hline
302 {\tt send}            &  Y      &  Y   \\\hline
303 {\tt literal}         &  N      &  Y   \\\hline
304 {\tt flags}           &  N      &  Y   \\\hline
305 {\tt repeat}          &  N      &  Y   \\
306 {\tt loop}            &  N      &  Y
307 \footnote{note, however, that the decision to reloop or not is based on the value in the loop counter {\it before} execution of the {\tt loop} instruction}
308 \\
309 {\tt takeLoopCounter}   &  N      &  Y   \\
310 {\tt takeRepeatCounter} &  N      &  Y   \\
311 \hline
312 {\tt torpedo} \color{black}      &  n/a    &  n/a \\
313
314 %{\tt clog}            &  N      &  N   \\
315 %{\tt unclog}          &  n/a    &  n/a \\
316 %{\tt interrupt}       &  n/a    &  n/a \\
317 %{\tt massacre}        &  n/a    &  n/a \\
318 \hline
319 \end{tabular}
320 \end{center}
321 \end{minipage}
322 \caption{classification of instructions}
323 \end{table}
324
325 {\bf RePeating}\\
326 An instruction will repeat if it is classified as a repeating
327 instruction and the repeat counter is nonzero.
328 Non-repeating instructions have no effect on the repeat
329 counter (except for {\tt repeat}, of course).
330
331 {\bf ReLooping}\\
332 Solo instructions (both {\tt solo} and {\tt soloT})
333 completely ignore the loop counter; it has no effect on them.
334
335 If a {\tt body} or {\tt tail} instruction reaches the on deck stage
336 and the loop counter ({\tt LC}) is zero, the instruction dies
337 immediately without executing or relooping.
338
339 If a {\tt body} or {\tt tail} instruction reaches the on deck stage
340 and the loop counter ({\tt LC}) is nonzero, a (duplicate) copy of that
341 instruction is immediately enqueued at the head of the instruction
342 fifo; the original instruction then waits at {\tt OD} until either its
343 execution conditions are met or it is {\tt torpedo}ed.
344 \color{black}
345
346
347 \pagebreak
348 \subsection{{\tt send} (variants: {\tt sendto}, {\tt dispatch})}
349
350 \setlength{\bitwidth}{5mm}
351 {\tt
352 \begin{bytefield}{26}
353   \bitheader[b]{12-16,19,21}\\
354 \color{light}
355   \bitbox{2}{Hold}
356   \bitbox{2}{P}
357 \color{black}
358    \bitbox{3}{001} 
359 \color{light}
360   \bitbox[trb]{2}{} 
361 \color{black}
362   \bitbox{1}{\tt Ti}
363   \bitbox{1}{\tt Di}
364   \bitbox{1}{\tt Dc}
365   \bitbox{1}{\tt Do}
366   \bitbox{1}{\tt To}
367   \bitbox[l]{17}{}
368 \end{bytefield}}
369
370 %\begin{bytefield}{26}
371 %  \bitheader[b]{12-18}\\
372 %  \bitbox[]{8}{\raggedleft Input Dock:}
373 %  \bitbox[r]{2}{}
374 %  \bitbox{1}{\tt So} 
375 %  \bitbox{1}{\tt Dc}
376 %  \bitbox[l]{15}{}
377 %\end{bytefield}
378 %
379 %\begin{bytefield}{26}
380 %  \bitheader[b]{12-18}\\
381 %  \bitbox[]{8}{\raggedleft Output Dock:}
382 %  \bitbox[r]{2}{}
383 %  \bitbox{1}{\tt Si}
384 %  \bitbox{1}{\tt To}
385 %  \bitbox[l]{15}{}
386 %\end{bytefield}
387
388 \begin{bytefield}{26}
389   \bitheader[b]{0,10,11}\\
390   \bitbox[1]{13}{\raggedleft {\tt sendto} ({\tt LiteralPath\to Path})}
391   \bitbox[r]{1}{}
392   \bitbox{1}{\tt 1}
393   \bitbox{11}{\tt LiteralPath}
394 \end{bytefield}
395
396 \begin{bytefield}{26}
397   \bitheader[b]{10,11}\\
398   \bitbox[1]{13}{\raggedleft {\tt dispatch} ({\tt DP[37:27]\to Path})\ \ }
399   \bitbox[r]{1}{}
400   \bitbox{1}{\tt 0}
401   \bitbox{1}{\tt 1}
402 \color{light}
403   \bitbox[trb]{10}{}
404 \color{black}
405 \end{bytefield}
406
407 \begin{bytefield}{26}
408   \bitheader[b]{10,11}\\
409   \bitbox[1]{13}{\raggedleft {\tt send} ({\tt Path} unchanged):}
410   \bitbox[r]{1}{}
411   \bitbox{1}{\tt 0}
412   \bitbox{1}{\tt 0}
413 \color{light}
414   \bitbox[trb]{10}{}
415 \color{black}
416 \end{bytefield}
417
418 \begin{itemize}
419 \item {\tt Ti} - Token Input: wait for the token predecessor to be full and drain it.
420 \item {\tt Di} - Data Input: wait for the data predecessor to be full and drain it.
421 \item {\tt Dc} - Data Capture: pulse the data latch.
422 \item {\tt Do} - Data Output: fill the data successor.
423 \item {\tt To} - Token Output: fill the token successor.
424 \end{itemize}
425
426 The {\tt F0}, {\tt DS}, and {\tt TS} stages must all be empty in order for an
427 instruction to execute.
428
429 The repeat counter can hold a number {\tt 0..MAX} or a special value
430 $\infty$.  If the repeat count ({\tt RC}) holds a value other than
431 $\infty$, it is latched with {\tt max(RC-1, 0)}.  If the repeat
432 counter reaches zero, the instruction ceases executing and either
433 reloops or retires (see earlier section for details).
434
435
436 \pagebreak
437 \subsection{{\tt data}, {\tt datahi}, {\tt datalo}}
438
439 These instructions load part or all of the data latch ({\tt D}).
440
441 {\tt datahi: Literal[18:1]\to D[37:20]} (and {\tt Literal[18]\to S})
442
443 \setlength{\bitwidth}{5mm}
444 {\tt
445 \begin{bytefield}{26}
446   \bitheader[b]{0,18,19,21}\\
447 \color{light}
448   \bitbox{2}{Hold} 
449   \bitbox{2}{P}
450 \color{black}
451   \bitbox{1}{0} 
452   \bitbox{2}{11} 
453 \color{light}
454   \bitbox[trb]{1}{} 
455 \color{black}
456   \bitbox{18}{Literal} 
457 \end{bytefield}}
458
459 {\tt datalo: Literal[19:1]\to D[19:1]}
460
461 \setlength{\bitwidth}{5mm}
462 {\tt
463 \begin{bytefield}{26}
464   \bitheader[b]{0,18,19,21}\\
465 \color{light}
466   \bitbox{2}{Hold} 
467   \bitbox{2}{P}
468 \color{black}
469   \bitbox{1}{0} 
470   \bitbox{2}{10} 
471   \bitbox{19}{Literal} 
472 \end{bytefield}}
473
474 {\tt data:}
475
476 \setlength{\bitwidth}{5mm}
477 {\tt
478 \begin{bytefield}{26}
479   \bitheader[b]{0,18,19,21}\\
480 \color{light}
481   \bitbox{2}{Hold} 
482   \bitbox{2}{P}
483 \color{black}
484   \bitbox{1}{1} 
485   \bitbox{2}{SEL} 
486   \bitbox{19}{Literal} 
487 \end{bytefield}}
488
489 {\tt
490 \begin{tabular}{|r|c|c|c|}\hline
491 sel  & D[37:20]      & D[19:1]       \\\hline
492 00  & Literal[18:1] & all 0         \\
493 01  & Literal[18:1] & all 1         \\
494 10  & all 0         & Literal[19:1] \\
495 11  & all 1         & Literal[19:1] \\
496 \hline
497 \end{tabular}}
498
499
500
501
502 \subsection{{\tt flags}}
503
504 \setlength{\bitwidth}{5mm}
505 {\tt
506 \begin{bytefield}{26}
507   \bitheader[b]{0,7,8,15,16-19,21}\\
508 \color{light}
509   \bitbox{2}{Hold} 
510   \bitbox{2}{P}
511 \color{black}
512   \bitbox{3}{000}
513   \bitbox{1}{0}
514   \bitbox{2}{00}
515 \color{black}
516   \bitbox{8}{nextA}
517   \bitbox{8}{nextB}
518 \end{bytefield}}
519
520 The {\tt P} field is a predicate; if it does not hold, the instruction
521 is ignored.  Otherwise the two flags ({\tt A} and {\tt B}) are updated
522 according to the {\tt nextA} and {\tt nextB} fields; each specifies
523 the new value as the logical {\tt OR} of zero or more inputs:
524
525 \begin{center}
526 {\tt
527 \begin{bytefield}{8}
528   \bitheader[b]{0-7}\\
529   \bitbox{1}{${\text{\tt A}}$}
530   \bitbox{1}{$\overline{\text{\tt A}}$}
531   \bitbox{1}{${\text{\tt B}}$}
532   \bitbox{1}{$\overline{\text{\tt B}}$}
533   \bitbox{1}{${\text{\tt S}}$}
534   \bitbox{1}{$\overline{\text{\tt S}}$}
535   \bitbox{1}{${\text{\tt Z}}$}
536   \bitbox{1}{$\overline{\text{\tt Z}}$}
537 \end{bytefield}}
538 \end{center}
539
540 Each bit corresponds to one possible input; all inputs whose bits are
541 set are {\tt OR}ed together, and the resulting value is assigned to
542 the flag.  Note that if none of the bits are set, the value assigned
543 is zero.  Note also that it is possible to produce a {\tt 1} by {\tt
544   OR}ing any flag with its complement.
545
546
547 \pagebreak
548
549 \subsection{{\tt repeat}}
550
551 This instruction loads the repeat counter with either a literal
552 number, the special value $\infty$, or the contents of the {\tt data}
553 register.
554
555 \setlength{\bitwidth}{5mm}
556 {\tt
557 \begin{bytefield}{26}
558   \bitheader[b]{16-19,21}\\
559 \color{light}
560   \bitbox{2}{Hold} 
561   \bitbox{2}{P}
562 \color{black}
563   \bitbox{3}{000}
564   \bitbox{1}{0}
565   \bitbox{2}{01}
566 \color{light}
567   \bitbox[tbr]{8}{}
568   \bitbox[l]{8}{}
569 \color{black}
570 \end{bytefield}}\\
571
572 \begin{bytefield}{26}
573   \bitbox[r]{18}{\raggedleft from data latch:\hspace{0.2cm}\ }
574   \bitbox{2}{\tt 00}
575 \color{light}
576   \bitbox[tbr]{6}{} 
577 \color{black}
578 \end{bytefield}
579
580 \begin{bytefield}{26}
581   \bitheader[b]{0,5,6,7}\\
582   \bitbox[r]{18}{\raggedleft from literal:\hspace{0.2cm}\ }
583   \bitbox{2}{\tt 10}
584   \bitbox{6}{\tt Literal} 
585 \end{bytefield}
586
587 \begin{bytefield}{26}
588   \bitheader[b]{0,5,6,7}\\
589   \bitbox[r]{18}{\raggedleft with $\infty$\ \ }
590   \bitbox{2}{\tt 11} 
591 \color{light}
592   \bitbox[tbr]{6}{} 
593 \color{black}
594 \end{bytefield}
595
596
597 \subsection{{\tt loop}}
598
599 This instruction loads the loop counter {\tt LC} with either {\tt max(0,LC-1)}, a literal or the
600 contents of the {\tt data} register.
601
602 \setlength{\bitwidth}{5mm}
603 {\tt
604 \begin{bytefield}{26}
605   \bitheader[b]{16-19,21,24}\\
606 \color{light}
607   \bitbox{2}{Hold}
608 \color{light}
609   \bitbox[tbr]{2}{P}
610 \color{black}
611   \bitbox{3}{000}
612   \bitbox{1}{0}
613   \bitbox{2}{10}
614 \color{light}
615   \bitbox[tbr]{9}{} 
616   \bitbox[l]{7}{}
617 \color{black}
618 \end{bytefield}}\\
619
620 \begin{bytefield}{26}
621   \bitbox[r]{19}{\raggedleft {\tt max(0,LC-1)}:\hspace{0.2cm}\ }
622   \bitbox{2}{\tt 00} 
623 %\color{light}
624   \bitbox[tbr]{5}{} 
625 %\color{black}
626 \color{black}
627 \end{bytefield}
628
629 \begin{bytefield}{26}
630   \bitbox[r]{19}{\raggedleft from data latch:\hspace{0.2cm}\ }
631   \bitbox{2}{\tt 01} 
632 \color{light}
633   \bitbox[tbr]{5}{} 
634 \color{black}
635 \end{bytefield}
636
637 \begin{bytefield}{26}
638   \bitheader[b]{0,5,6}\\
639   \bitbox[r]{19}{\raggedleft from literal:\hspace{0.2cm}\ }
640   \bitbox{1}{\tt 1} 
641   \bitbox{6}{\tt Literal} 
642 \end{bytefield}
643
644 \pagebreak
645 \subsection{{\tt takeLoopCounter}}
646
647 \setlength{\bitwidth}{5mm}
648 {\tt
649 \begin{bytefield}{26}
650   \bitheader[b]{16-19,21}\\
651 \color{light}
652   \bitbox{2}{Hold} 
653   \bitbox{2}{P}
654 \color{black}
655   \bitbox{3}{000}
656   \bitbox{1}{0}
657   \bitbox{2}{11}
658 \color{light}
659   \bitbox[tbr]{16}{} 
660 \color{black}
661 \end{bytefield}}
662
663 The {\tt P} field is a predicate; if it does not hold, the instruction
664 is ignored (but may reloop).  This instruction copies the value in the
665 loop counter {\tt LC} into the least significant bits of the data
666 latch and leaves all other bits of the data latch unchanged.
667
668 \subsection{{\tt takeRepeatCounter}}
669
670 \setlength{\bitwidth}{5mm}
671 {\tt
672 \begin{bytefield}{26}
673   \bitheader[b]{16-19,21}\\
674 \color{light}
675   \bitbox{2}{Hold} 
676   \bitbox{2}{P}
677 \color{black}
678   \bitbox{3}{???}
679   \bitbox{1}{?}
680   \bitbox{2}{??}
681 \color{light}
682   \bitbox[tbr]{16}{} 
683 \color{black}
684 \end{bytefield}}
685
686 The {\tt P} field is a predicate; if it does not hold, the instruction
687 is ignored (but may reloop).  This instruction copies the value in the
688 repeat counter {\tt RC} into the least significant bits of the data
689 latch and leaves all other bits of the data latch unchanged.
690
691 \pagebreak
692 \subsection{{\tt torpedo}}
693
694 \setlength{\bitwidth}{5mm}
695 {\tt
696 \begin{bytefield}{26}
697   \bitheader[b]{0,5,16-19,21}\\
698 \color{light}
699   \bitbox{4}{} 
700 \color{black}
701   \bitbox{3}{000} 
702   \bitbox{1}{1}
703   \bitbox{2}{00}
704 \color{light}
705   \bitbox[tbr]{16}{} 
706 \end{bytefield}}
707
708 When a {\tt torpedo} instruction reaches {\tt IH}, it will wait there
709 until an instruction is on deck (at {\tt OD}) and that instruction's
710 {\tt Hold} field is {\tt tail} or {\tt soloT}.  The {\tt torpedo} will then
711 annihilate the on-deck instruction {\it and set the loop counter to zero}.
712 \color{black}
713
714
715 %\pagebreak
716 %\subsection{{\tt interrupt}}
717 %
718 %\setlength{\bitwidth}{5mm}
719 %{\tt
720 %\begin{bytefield}{26}
721 %  \bitheader[b]{0,5,16-19,21}\\
722 %\color{light}
723 %  \bitbox{4}{} 
724 %\color{black}
725 %  \bitbox{3}{000} 
726 %  \bitbox{1}{1}
727 %  \bitbox{2}{00}
728 %\color{light}
729 %  \bitbox[tbr]{16}{} 
730 %\end{bytefield}}
731 %
732 %When an {\tt interrupt} instruction reaches {\tt IH}, it will wait
733 %there for the {\tt OD} stage to be full with an instruction that has
734 %the {\tt IM} bit set.  When this occurs, the instruction at {\tt OD}
735 %{\it will not execute}, but {\it may reloop} if the conditions for
736 %relooping are met.
737 %\footnote{The ability to interrupt an instruction yet have it reloop is very
738 %useful for processing chunks of data with a fixed size header and/or
739 %footer and a variable length body.}
740 %
741 %
742 %\subsection{{\tt massacre}}
743 %
744 %\setlength{\bitwidth}{5mm}
745 %{\tt
746 %\begin{bytefield}{26}
747 %  \bitheader[b]{16-19,21}\\
748 %\color{light}
749 %  \bitbox{4}{} 
750 %\color{black}
751 %  \bitbox{3}{000} 
752 %  \bitbox{1}{1}
753 %  \bitbox{2}{01}
754 %\color{light}
755 %  \bitbox[tbr]{16}{} 
756 %\color{black}
757 %\end{bytefield}}
758 %
759 %When a {\tt massacre} instruction reaches {\tt IH}, it will wait there
760 %for the {\tt OD} stage to be full with an instruction that has the
761 %{\tt IM} bit set.  When this occurs, all instructions in the
762 %instruction fifo (including {\tt OD}) are retired.
763 %
764 %\subsection{{\tt clog}}
765 %
766 %\setlength{\bitwidth}{5mm}
767 %{\tt
768 %\begin{bytefield}{26}
769 %  \bitheader[b]{16-19,21}\\
770 %\color{light}
771 %  \bitbox{4}{} 
772 %\color{black}
773 %  \bitbox{3}{000} 
774 %  \bitbox{1}{1}
775 %  \bitbox{2}{10}
776 %\color{light}
777 %  \bitbox[tbr]{16}{} 
778 %\color{black}
779 %\end{bytefield}}
780 %
781 %When a {\tt clog} instruction reaches {\tt OD}, it remains there and
782 %no more instructions will be executed until an {\tt unclog} is
783 %performed.
784 %
785 %\subsection{{\tt unclog}}
786 %
787 %\setlength{\bitwidth}{5mm}
788 %{\tt
789 %\begin{bytefield}{26}
790 %  \bitheader[b]{16-19,21}\\
791 %\color{light}
792 %  \bitbox{4}{} 
793 %\color{black}
794 %  \bitbox{3}{000} 
795 %  \bitbox{1}{1}
796 %  \bitbox[lrtb]{2}{11}
797 %\color{light}
798 %  \bitbox[tbr]{16}{} 
799 %\color{black}
800 %\end{bytefield}}
801 %
802 %When an {\tt unclog} instruction reaches {\tt IH}, it will wait there
803 %until a {\tt clog} instruction is at {\tt OD}.  When this occurs, both
804 %instructions retire.
805 %
806 %Note that issuing an {\tt unclog} instruction to a dock which is not
807 %clogged and whose instruction fifo contains no {\tt clog} instructions
808 %will cause the dock to deadlock.
809
810
811
812 \pagebreak
813 \epsfig{file=overview,height=5in,angle=90}
814
815 \pagebreak
816 \epsfig{file=ports,height=5in,angle=90}
817
818 \pagebreak
819 \epsfig{file=best,height=5in,angle=90}
820
821
822 \end{document}