ea6d0be4d182bfe9beeb38c9d337136d6ef0d14d
[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 \begin{tabular}{rl}
56 \color{red}
57 ??-Mar
58 \color{black}
59 & added ``if its predicate is true'' to repeat count \\
60 12-Mar
61 \color{black}
62 & renamed loop+repeat to outer+inner (not in red) \\
63 & renamed {\tt Z} flag to {\tt L} flag (not in red) \\
64 & rewrote ``inner and outer loops'' section \\
65 & updated all diagrams \\
66 \color{black}
67 7-Mar
68 & Moved address bits to the LSB-side of a 37-bit instruction \\
69 & Added {\it micro-instruction} and {\it composite instruction} terms \\
70 & Removed the {\tt DL} field, added {\tt decrement} mode to {\tt loop} \\
71 & Created the {\tt Hold} field \\
72 & Changed how ReLooping works \\
73 & Removed {\tt clog}, {\tt unclog}, {\tt interrupt}, and {\tt massacre} \\
74 \end{tabular}
75 \end{abstract}
76
77 \vfill
78
79 \begin{center}
80 \epsfig{file=overview,width=1.5in}
81 \epsfig{file=indock,width=3in}
82 \end{center}
83
84 \pagebreak
85
86 \section{Overview of Fleet}
87
88 A Fleet processor consists of a {\it switch fabric} with several
89 functional units called {\it ships} connected to it.  At each
90 connection between a ship and the switch fabric lies a programmable
91 element known as the {\it dock}.
92
93 A {\it path} specifies a route through the switch fabric from a
94 particular {\it source} to a particular {\it destination}.  The
95 combination of a path and a single word {\it payload} is called a {\it packet}.  The
96 switch fabric carries packets from their sources to their
97 destinations.  Each dock has two destinations: one for {\it
98   instructions} and one for {\it data}.  A Fleet is programmed by
99 depositing packets into the switch fabric; these packets' paths lead
100 them to the instruction destinations of the docks.
101
102 When a packet arrives at the instruction destination of a dock, it is
103 enqueued for execution.  Before the instruction executes, it may cause
104 the dock to wait for a packet to arrive at the dock's data destination
105 or for a value to be presented by the ship.  It may present a data
106 value to the ship or transmit it for transmission to some other
107 destination.
108
109 When an instruction sends a packet into the switch fabric, it may
110 specify that the payload of the packet is irrelevant.  Such packets
111 are known as {\it tokens}, and consume less energy than data packets.
112 From a programmer's perspective, a token packet is indistinguishable
113 from a data packet with a unknown payload.
114
115 \begin{center}
116 \epsfig{file=overview,width=3in}\\
117 {\it Overview of a Fleet processor; gray shading represents a
118   packet-switched network fabric; blue lines carry data, red lines
119   carry instructions.}
120 \end{center}
121 \color{black}
122
123 \pagebreak
124
125 \section{The FleetTwo Pump}
126
127 The diagram below represents a {\it programmer's} conceptual view of
128 the interface between ships and the switch fabric.  Actual
129 implementation circuitry may differ substantially.  Sources and
130 destinations that can send and receive only tokens -- not data items
131 -- are drawn as dashed lines.
132
133 \begin{center}
134 \epsfig{file=indock,width=3.5in}\\
135 {\it an ``input'' dock}
136
137 \epsfig{file=outdock,width=3.5in}\\
138 {\it an ``output'' dock}
139 \end{center}
140
141 The term {\it port} refers to an interface to the ship, the {\it
142   dock} connecting it to the switch fabric, and the corresponding
143 sources and destinations on the switch fabric.
144
145 Each dock consists of a {\it data latch}, which is as wide as a single
146 machine word and a {\it pump}, which is a circular fifo of
147 instruction-width latches.  The values in the pump control the data
148 latch.
149
150 Note that the pump in each dock has a destination of its own; this is
151 the {\it instruction destination} mentioned in the previous section.
152 Note that unlike all other destinations, there is no buffering fifo
153 guarding this one.  The size of these fifos are exposed to the
154 software programmer so he can avoid deadlock.
155
156 \pagebreak
157 \section{Instructions}
158
159 In order to cause an instruction to execute, the programmer must first
160 cause that instruction word to arrive in the data latch of some output
161 dock.  For example, this might be the ``data read'' output dock of the
162 memory access ship or the output of a fifo ship.  Once an instruction
163 has arrived at this output dock, it is {\it dispatched} by sending it
164 to the {\it instruction port} of the dock at which it is to execute.
165
166 Each instruction is 26 bits long, which makes it possible for an
167 instruction and an 11-bit path to fit in a single word of memory.
168 This path is the path from the {\it dispatching} dock to the {\it
169   executing} dock.
170
171 \setlength{\bitwidth}{3.5mm}
172 {\tt \footnotesize
173 \begin{bytefield}{37}
174   \bitheader[b]{0,10,11,36}\\
175   \bitbox{26}{instruction} 
176   \bitbox{11}{dispatch path} 
177 \end{bytefield}}
178
179 {\bf Note:} the instruction encodings below are simply ``something to
180 shoot at'' and a sanity check to make sure we haven't overrun our bit
181 budget.  The final instruction encodings will probably be
182 different.
183
184 All instruction words have the following format:
185
186 \setlength{\bitwidth}{3.5mm}
187 {\tt \footnotesize
188 \begin{bytefield}{37}
189   \bitheader[b]{0,10,11,36}\\
190 \color{black}
191   \bitbox{1}{A} 
192   \bitbox{1}{OL} 
193   \bitbox{2}{P} 
194 \color{light}
195   \bitbox[tbr]{22}{} 
196   \bitbox{11}{dispatch path} 
197 \color{black}
198 \end{bytefield}}
199
200 Each instruction word is called a {\it micro instruction}.
201 Collections of one or more micro instruction are known as {\it
202   composite instructions}.
203
204 The {\tt A} bit stands for {\tt Armor}\footnote{this is to be
205   pronounced with a Boston accent (``AAHH-mir'')}.
206 The {\tt OL} bit indicates whether or not this instruction is part of
207 an outer loop.  Both of the preceding bits are explained in the next section.
208
209 \color{black}
210
211 The abbreviation {\tt P} stands for {\it predicate}; this is a two-bit
212 code that indicates if the instruction should be executed or ignored.
213
214
215
216 \pagebreak
217 \subsection{Life Cycle of an Instruction}
218
219 The diagram below shows an input dock for purposes of illustration
220 (behavior at an output dock is identical).
221
222 \begin{center}
223 \epsfig{file=indock,width=3in}\\
224 {\it an input dock}
225 \end{center}
226
227 Note the circle on the path between ``instr horn'' and ``instr fifo'';
228 this is known as ``the hatch''.  The hatch has two states: sealed and
229 unsealed.  When the machine powers up, the hatch is unsealed; it is
230 sealed by the {\tt tail} instruction and unsealed as described below.
231
232 When a non-{\tt torpedo} instruction arrives at the instruction horn,
233 it waits there until the hatch is in the unsealed state.  The
234 instruction then enters the instruction fifo.
235
236 When an instruction emerges from the instruction fifo, it arrives at
237 the ``on deck'' stage and starts two processes  {\it
238   concurrently}:
239
240 \begin{itemize}
241 \item
242 {\bf Process \#1}\\
243 If the instruction has the {\tt OL} bit set and the value of {\tt OC}
244 is nonzero, this process will wait for the hatch to be {\it sealed}
245 and then enqueue a duplicate copy of the instruction into the instruction fifo.
246
247 \item
248 {\bf Process \#2}\\
249 If the value of {\tt OC} is zero and the instruction at on-deck is
250 {\it not} an {\tt setOuter} instruction whose {\tt OL} bit is cleared,
251 this process will unseal the hatch, set the {\it inner} loop counter
252 to zero, and terminate.
253
254 Otherwise, the instruction will execute one or more times, as
255 determined by the flags, predicate, and inner loop counter (see
256 below).  If the instruction's {\tt A}rmor bit is not
257 set\footnote{note: we need to say something about only {\tt send}
258   instructions being {\tt torpedo}able}, each execution attempt will
259 be arbitrated against the arrival of a {\tt torpedo} instruction at
260 the instruction horn.  If the {\tt torpedo} wins, the {\it outer} loop
261 counter is set to zero and this process terminates immediately.
262 \end{itemize}
263
264 When both processes have completed, the on deck stage is vacated and
265 another instruction may enter it.
266
267 Note that when a {\tt torpedo} arrives at the instruction horn it will
268 wait there until on deck is occupied by an instruction whose {\tt
269   A}rmor bit is {\it not set}, but it does {\it not} wait for the
270 hatch to be unsealed.
271
272 \color{black}
273
274 \subsection{Inner and Outer Loops}
275
276
277
278 Using the mechanisms described above, a programmer can perform two
279 types of loops: {\it inner} loops of only one instruction and {\it
280   outer} loops of multiple instructions.  Inner loops may be nested
281 within an outer loop, but no other nesting of loops is allowed.  The
282 paths used by inner loops and outer loops are shown below:
283
284 \begin{center}
285 \begin{minipage}{2in}
286 \begin{center}
287 \epsfig{file=inner-loop,width=2in}\\
288 {\it inner loop (in red)}
289 \end{center}
290 \end{minipage}
291 \begin{minipage}{2in}
292 \begin{center}
293 \epsfig{file=outer-loop,width=2in}\\
294 {\it outer loop (in red)}
295 \end{center}
296 \end{minipage}
297 \end{center}
298
299 Each type of loop has a counter associated with it: the {\tt IC}
300 counter for inner loops and the {\tt OC} counter for outer loops.  The
301 inner loop counter applies only to {\tt send} instructions; all other
302 instructions ignore the inner loop counter.  When a {\tt send}
303 instruction reaches the on deck position,
304 \color{red}
305 if its predicate is true
306 \color{black}
307 it
308 will execute at least once; the number of times it executes after that
309 is determined by the inner loop counter.
310
311 The outer loop counter applies to all instructions {\it except} the
312 instruction {\tt setOuter} with {\tt OL=0}, because such instructions
313 are needed to reset the outer loop counter after it becomes zero.
314 However, {\tt setOuter} with {\tt OL} set to {\it one} is useful for
315 resetting the loop counter in the middle of the execution of a loop.
316
317 \color{black}
318
319 \subsection{Flags}
320
321 The pump has four flags: {\tt A}, {\tt B}, {\tt L}, and {\tt S}.  Of
322 these four, only the first two may be modified directly by
323 instructions.
324
325 \begin{itemize}
326 \item The {\tt A} and {\tt B} flags are general-purpose flags which
327       may be set and cleared by the programmer.
328
329 \item
330
331  The {\tt L} flag, known as the {\it last} flag, is set whenever
332       the value in the outer counter ({\tt OC}) is one,
333 \color{black}
334  indicating
335       that the dock is in the midst of the last iteration of an
336       outer loop.  This flag can be used to perform certain
337       operations (such as sending a completion token) only on the last
338       iteration of an outer loop.
339
340 \item The {\tt S} flag, known as the {\it summary} flag.  Its value is
341       determined by the ship, but unless stated otherwise, it should
342       be assumed that whenever the 37th bit of the data ({\tt D})
343       latch is loaded, that same bit is also loaded into the {\tt S}
344       flag.  This lets the ship make decisions based on whether or not
345       the top bit of the data latch is set; if two's complement
346       numbers are in use, this will indicate whether or not the
347       latched value is negative.
348 \end{itemize}
349
350 Many instruction fields are specified as two-bit {\it predicates}.
351 These fields contain one of four values, indicating if an action
352 should be taken unconditionally or conditionally on one of the {\tt A}
353 or {\tt B} flags:
354
355 \begin{itemize}
356 \item {\tt 00:} if {\tt A} is set
357 \item {\tt 10:} if {\tt B} is set
358 \item {\tt 01:} if {\tt L} is set ({\tt OC=1})
359 \item {\tt 11:} always
360 \end{itemize}
361
362
363 \pagebreak
364 \subsection{{\tt send} (variants: {\tt sendto}, {\tt dispatch})}
365
366 \setlength{\bitwidth}{5mm}
367 {\tt
368 \begin{bytefield}{26}
369   \bitheader[b]{12-16,19,21}\\
370 \color{light}
371   \bitbox{1}{A}
372   \bitbox{1}{OL}
373   \bitbox{2}{P}
374 \color{black}
375    \bitbox{3}{001} 
376 \color{light}
377   \bitbox[trb]{2}{} 
378 \color{black}
379   \bitbox{1}{\tt Ti}
380   \bitbox{1}{\tt Di}
381   \bitbox{1}{\tt Dc}
382   \bitbox{1}{\tt Do}
383   \bitbox{1}{\tt To}
384   \bitbox[l]{17}{}
385 \end{bytefield}}
386
387 %\begin{bytefield}{26}
388 %  \bitheader[b]{12-18}\\
389 %  \bitbox[]{8}{\raggedleft Input Dock:}
390 %  \bitbox[r]{2}{}
391 %  \bitbox{1}{\tt So} 
392 %  \bitbox{1}{\tt Dc}
393 %  \bitbox[l]{15}{}
394 %\end{bytefield}
395 %
396 %\begin{bytefield}{26}
397 %  \bitheader[b]{12-18}\\
398 %  \bitbox[]{8}{\raggedleft Output Dock:}
399 %  \bitbox[r]{2}{}
400 %  \bitbox{1}{\tt Si}
401 %  \bitbox{1}{\tt To}
402 %  \bitbox[l]{15}{}
403 %\end{bytefield}
404
405 \begin{bytefield}{26}
406   \bitheader[b]{0,10,11}\\
407   \bitbox[1]{13}{\raggedleft {\tt sendto} ({\tt LiteralPath\to Path})}
408   \bitbox[r]{1}{}
409   \bitbox{1}{\tt 1}
410   \bitbox{11}{\tt LiteralPath}
411 \end{bytefield}
412
413 \begin{bytefield}{26}
414   \bitheader[b]{10,11}\\
415   \bitbox[1]{13}{\raggedleft {\tt dispatch} ({\tt DP[37:27]\to Path})\ \ }
416   \bitbox[r]{1}{}
417   \bitbox{1}{\tt 0}
418   \bitbox{1}{\tt 1}
419 \color{light}
420   \bitbox[trb]{10}{}
421 \color{black}
422 \end{bytefield}
423
424 \begin{bytefield}{26}
425   \bitheader[b]{10,11}\\
426   \bitbox[1]{13}{\raggedleft {\tt send} ({\tt Path} unchanged):}
427   \bitbox[r]{1}{}
428   \bitbox{1}{\tt 0}
429   \bitbox{1}{\tt 0}
430 \color{light}
431   \bitbox[trb]{10}{}
432 \color{black}
433 \end{bytefield}
434
435 \begin{itemize}
436 \item {\tt Ti} - Token Input: wait for the token predecessor to be full and drain it.
437 \item {\tt Di} - Data Input: wait for the data predecessor to be full and drain it.
438 \item {\tt Dc} - Data Capture: pulse the data latch.
439 \item {\tt Do} - Data Output: fill the data successor.
440 \item {\tt To} - Token Output: fill the token successor.
441 \end{itemize}
442
443 The data successor and token successor must both be empty in order for
444 a {\tt send} instruction to attempt execution.
445
446 The inner loop counter can hold a number {\tt 0..MAX} or a special
447 value $\infty$.  If {\tt IC} is nonzero after execution of a {\tt
448   send} instruction, the instruction will execute again, and {\tt IC}
449 will be latched with {\tt (IC==$\infty$?$\infty$:max(IC-1, 0))}.  When
450 the inner loop counter reaches zero, the instruction ceases executing.
451
452
453 \pagebreak
454 \subsection{{\tt data}, {\tt datahi}, {\tt datalo}}
455
456 These instructions load part or all of the data latch ({\tt D}).
457
458 {\tt datahi: Literal[18:1]\to D[37:20]} (and {\tt Literal[18]\to S})
459
460 \setlength{\bitwidth}{5mm}
461 {\tt
462 \begin{bytefield}{26}
463   \bitheader[b]{0,18,19,21}\\
464 \color{light}
465   \bitbox{1}{A}
466   \bitbox{1}{OL} 
467   \bitbox{2}{P}
468 \color{black}
469   \bitbox{1}{0} 
470   \bitbox{2}{11} 
471 \color{light}
472   \bitbox[trb]{1}{} 
473 \color{black}
474   \bitbox{18}{Literal} 
475 \end{bytefield}}
476
477 {\tt datalo: Literal[19:1]\to D[19:1]}
478
479 \setlength{\bitwidth}{5mm}
480 {\tt
481 \begin{bytefield}{26}
482   \bitheader[b]{0,18,19,21}\\
483 \color{light}
484   \bitbox{1}{A}
485   \bitbox{1}{OL} 
486   \bitbox{2}{P}
487 \color{black}
488   \bitbox{1}{0} 
489   \bitbox{2}{10} 
490   \bitbox{19}{Literal} 
491 \end{bytefield}}
492
493 {\tt data:}
494
495 \setlength{\bitwidth}{5mm}
496 {\tt
497 \begin{bytefield}{26}
498   \bitheader[b]{0,18,19,21}\\
499 \color{light}
500   \bitbox{1}{A}
501   \bitbox{1}{OL} 
502   \bitbox{2}{P}
503 \color{black}
504   \bitbox{1}{1} 
505   \bitbox{2}{SEL} 
506   \bitbox{19}{Literal} 
507 \end{bytefield}}
508
509 {\tt
510 \begin{tabular}{|r|c|c|c|}\hline
511 sel  & D[37:20]      & D[19:1]       \\\hline
512 00  & Literal[18:1] & all 0         \\
513 01  & Literal[18:1] & all 1         \\
514 10  & all 0         & Literal[19:1] \\
515 11  & all 1         & Literal[19:1] \\
516 \hline
517 \end{tabular}}
518
519
520
521
522 \subsection{{\tt flags}}
523
524 \setlength{\bitwidth}{5mm}
525 {\tt
526 \begin{bytefield}{26}
527   \bitheader[b]{0,7,8,15,16-19,21}\\
528 \color{light}
529   \bitbox{1}{A}
530   \bitbox{1}{OL} 
531   \bitbox{2}{P}
532 \color{black}
533   \bitbox{3}{000}
534   \bitbox{1}{0}
535   \bitbox{2}{00}
536 \color{black}
537   \bitbox{8}{nextA}
538   \bitbox{8}{nextB}
539 \end{bytefield}}
540
541 The {\tt P} field is a predicate; if it does not hold, the instruction
542 is ignored.  Otherwise the two flags ({\tt A} and {\tt B}) are updated
543 according to the {\tt nextA} and {\tt nextB} fields; each specifies
544 the new value as the logical {\tt OR} of zero or more inputs:
545
546 \begin{center}
547 {\tt
548 \begin{bytefield}{8}
549   \bitheader[b]{0-7}\\
550   \bitbox{1}{${\text{\tt A}}$}
551   \bitbox{1}{$\overline{\text{\tt A}}$}
552   \bitbox{1}{${\text{\tt B}}$}
553   \bitbox{1}{$\overline{\text{\tt B}}$}
554   \bitbox{1}{${\text{\tt S}}$}
555   \bitbox{1}{$\overline{\text{\tt S}}$}
556   \bitbox{1}{${\text{\tt L}}$}
557   \bitbox{1}{$\overline{\text{\tt L}}$}
558 \end{bytefield}}
559 \end{center}
560
561 Each bit corresponds to one possible input; all inputs whose bits are
562 set are {\tt OR}ed together, and the resulting value is assigned to
563 the flag.  Note that if none of the bits are set, the value assigned
564 is zero.  Note also that it is possible to produce a {\tt 1} by {\tt
565   OR}ing any flag with its complement.
566
567
568 \pagebreak
569
570 \subsection{{\tt setInner}}
571
572 This instruction loads the inner loop counter with either a literal
573 number, the special value $\infty$, or the contents of the {\tt data}
574 register.
575
576 \setlength{\bitwidth}{5mm}
577 {\tt
578 \begin{bytefield}{26}
579   \bitheader[b]{16-19,21}\\
580 \color{light}
581   \bitbox{1}{A}
582   \bitbox{1}{OL} 
583   \bitbox{2}{P}
584 \color{black}
585   \bitbox{3}{000}
586   \bitbox{1}{0}
587   \bitbox{2}{01}
588 \color{light}
589   \bitbox[tbr]{8}{}
590   \bitbox[l]{8}{}
591 \color{black}
592 \end{bytefield}}\\
593
594 \begin{bytefield}{26}
595   \bitbox[r]{18}{\raggedleft from data latch:\hspace{0.2cm}\ }
596   \bitbox{2}{\tt 00}
597 \color{light}
598   \bitbox[tbr]{6}{} 
599 \color{black}
600 \end{bytefield}
601
602 \begin{bytefield}{26}
603   \bitheader[b]{0,5,6,7}\\
604   \bitbox[r]{18}{\raggedleft from literal:\hspace{0.2cm}\ }
605   \bitbox{2}{\tt 10}
606   \bitbox{6}{\tt Literal} 
607 \end{bytefield}
608
609 \begin{bytefield}{26}
610   \bitheader[b]{0,5,6,7}\\
611   \bitbox[r]{18}{\raggedleft with $\infty$\ \ }
612   \bitbox{2}{\tt 11} 
613 \color{light}
614   \bitbox[tbr]{6}{} 
615 \color{black}
616 \end{bytefield}
617
618
619 \subsection{{\tt setOuter}}
620
621 This instruction loads the outer loop counter {\tt OC} with either
622 {\tt max(0,OC-1)}, a literal or the contents of the {\tt data}
623 register.
624
625 \setlength{\bitwidth}{5mm}
626 {\tt
627 \begin{bytefield}{26}
628   \bitheader[b]{16-19,21,24}\\
629 \color{light}
630   \bitbox{1}{A}
631   \bitbox{1}{OL}
632 \color{light}
633   \bitbox[tbr]{2}{P}
634 \color{black}
635   \bitbox{3}{000}
636   \bitbox{1}{0}
637   \bitbox{2}{10}
638 \color{light}
639   \bitbox[tbr]{9}{} 
640   \bitbox[l]{7}{}
641 \color{black}
642 \end{bytefield}}\\
643
644 \begin{bytefield}{26}
645   \bitbox[r]{19}{\raggedleft {\tt max(0,OC-1)}:\hspace{0.2cm}\ }
646   \bitbox{2}{\tt 00} 
647 %\color{light}
648   \bitbox[tbr]{5}{} 
649 %\color{black}
650 \color{black}
651 \end{bytefield}
652
653 \begin{bytefield}{26}
654   \bitbox[r]{19}{\raggedleft from data latch:\hspace{0.2cm}\ }
655   \bitbox{2}{\tt 01} 
656 \color{light}
657   \bitbox[tbr]{5}{} 
658 \color{black}
659 \end{bytefield}
660
661 \begin{bytefield}{26}
662   \bitheader[b]{0,5,6}\\
663   \bitbox[r]{19}{\raggedleft from literal:\hspace{0.2cm}\ }
664   \bitbox{1}{\tt 1} 
665   \bitbox{6}{\tt Literal} 
666 \end{bytefield}
667
668 \pagebreak
669 \subsection{{\tt takeOuterLoopCounter}}
670
671 \setlength{\bitwidth}{5mm}
672 {\tt
673 \begin{bytefield}{26}
674   \bitheader[b]{16-19,21}\\
675 \color{light}
676   \bitbox{1}{A}
677   \bitbox{1}{OL} 
678   \bitbox{2}{P}
679 \color{black}
680   \bitbox{3}{000}
681   \bitbox{1}{0}
682   \bitbox{2}{11}
683 \color{light}
684   \bitbox[tbr]{16}{} 
685 \color{black}
686 \end{bytefield}}
687
688 This instruction copies the value in the outer loop counter {\tt OC}
689 into the least significant bits of the data latch and leaves all other
690 bits of the data latch unchanged.
691
692 \subsection{{\tt takeInnerLoopCounter}}
693
694 \setlength{\bitwidth}{5mm}
695 {\tt
696 \begin{bytefield}{26}
697   \bitheader[b]{16-19,21}\\
698 \color{light}
699   \bitbox{1}{A}
700   \bitbox{1}{OL} 
701   \bitbox{2}{P}
702 \color{black}
703   \bitbox{3}{???}
704   \bitbox{1}{?}
705   \bitbox{2}{??}
706 \color{light}
707   \bitbox[tbr]{16}{} 
708 \color{black}
709 \end{bytefield}}
710
711 This instruction copies the value in the inner loop counter {\tt IC}
712 into the least significant bits of the data latch and leaves all other
713 bits of the data latch unchanged.
714
715
716 \subsection{{\tt torpedo}}
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
733 When a {\tt torpedo} instruction reaches the instruction horn, it will
734 wait there until an instruction is on deck whose {\tt A}rmor bit is
735 not set.  The {\tt torpedo} will then cause ``Process \#2'' of the on
736 deck instruction to terminate and will set the outer loop counter to zero.
737
738 \subsection{{\tt tail}}
739
740 \setlength{\bitwidth}{5mm}
741 {\tt
742 \begin{bytefield}{26}
743   \bitheader[b]{0,5,16-19,21}\\
744 \color{light}
745   \bitbox{4}{} 
746 \color{black}
747   \bitbox{3}{000} 
748   \bitbox{1}{1}
749   \bitbox{2}{01}
750 \color{light}
751   \bitbox[tbr]{16}{} 
752 \end{bytefield}}
753
754 When a {\tt tail} instruction reaches {\tt IH}, it seals the hatch.
755 The {\tt tail} instruction does not enter the instruction fifo.
756
757 \color{black}
758
759
760 %\pagebreak
761 %\subsection{{\tt interrupt}}
762 %
763 %\setlength{\bitwidth}{5mm}
764 %{\tt
765 %\begin{bytefield}{26}
766 %  \bitheader[b]{0,5,16-19,21}\\
767 %\color{light}
768 %  \bitbox{4}{} 
769 %\color{black}
770 %  \bitbox{3}{000} 
771 %  \bitbox{1}{1}
772 %  \bitbox{2}{00}
773 %\color{light}
774 %  \bitbox[tbr]{16}{} 
775 %\end{bytefield}}
776 %
777 %When an {\tt interrupt} instruction reaches {\tt IH}, it will wait
778 %there for the {\tt OD} stage to be full with an instruction that has
779 %the {\tt IM} bit set.  When this occurs, the instruction at {\tt OD}
780 %{\it will not execute}, but {\it may reloop} if the conditions for
781 %relooping are met.
782 %\footnote{The ability to interrupt an instruction yet have it reloop is very
783 %useful for processing chunks of data with a fixed size header and/or
784 %footer and a variable length body.}
785 %
786 %
787 %\subsection{{\tt massacre}}
788 %
789 %\setlength{\bitwidth}{5mm}
790 %{\tt
791 %\begin{bytefield}{26}
792 %  \bitheader[b]{16-19,21}\\
793 %\color{light}
794 %  \bitbox{4}{} 
795 %\color{black}
796 %  \bitbox{3}{000} 
797 %  \bitbox{1}{1}
798 %  \bitbox{2}{01}
799 %\color{light}
800 %  \bitbox[tbr]{16}{} 
801 %\color{black}
802 %\end{bytefield}}
803 %
804 %When a {\tt massacre} instruction reaches {\tt IH}, it will wait there
805 %for the {\tt OD} stage to be full with an instruction that has the
806 %{\tt IM} bit set.  When this occurs, all instructions in the
807 %instruction fifo (including {\tt OD}) are retired.
808 %
809 %\subsection{{\tt clog}}
810 %
811 %\setlength{\bitwidth}{5mm}
812 %{\tt
813 %\begin{bytefield}{26}
814 %  \bitheader[b]{16-19,21}\\
815 %\color{light}
816 %  \bitbox{4}{} 
817 %\color{black}
818 %  \bitbox{3}{000} 
819 %  \bitbox{1}{1}
820 %  \bitbox{2}{10}
821 %\color{light}
822 %  \bitbox[tbr]{16}{} 
823 %\color{black}
824 %\end{bytefield}}
825 %
826 %When a {\tt clog} instruction reaches {\tt OD}, it remains there and
827 %no more instructions will be executed until an {\tt unclog} is
828 %performed.
829 %
830 %\subsection{{\tt unclog}}
831 %
832 %\setlength{\bitwidth}{5mm}
833 %{\tt
834 %\begin{bytefield}{26}
835 %  \bitheader[b]{16-19,21}\\
836 %\color{light}
837 %  \bitbox{4}{} 
838 %\color{black}
839 %  \bitbox{3}{000} 
840 %  \bitbox{1}{1}
841 %  \bitbox[lrtb]{2}{11}
842 %\color{light}
843 %  \bitbox[tbr]{16}{} 
844 %\color{black}
845 %\end{bytefield}}
846 %
847 %When an {\tt unclog} instruction reaches {\tt IH}, it will wait there
848 %until a {\tt clog} instruction is at {\tt OD}.  When this occurs, both
849 %instructions retire.
850 %
851 %Note that issuing an {\tt unclog} instruction to a dock which is not
852 %clogged and whose instruction fifo contains no {\tt clog} instructions
853 %will cause the dock to deadlock.
854
855
856
857 \pagebreak
858 \epsfig{file=overview,height=5in,angle=90}
859
860 \pagebreak
861 \subsection*{Input Dock}
862 \epsfig{file=indock,width=7in,angle=90}
863
864 \pagebreak
865 \subsection*{Output Dock}
866 \epsfig{file=outdock,width=6.5in,angle=90}
867
868
869 %\pagebreak
870 %\epsfig{file=ports,height=5in,angle=90}
871
872 %\pagebreak
873 %\epsfig{file=best,height=5in,angle=90}
874
875
876 \end{document}