checkpoint
[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 \usepackage{multirow}
15 \usepackage{multicol}
16 \usepackage{rotating}
17 \include{megacz}
18 \bibliographystyle{alpha}
19 \pagestyle{fancyplain}
20
21 \definecolor{light}{gray}{0.7}
22
23 \setlength{\marginparwidth}{1.2in}
24 \let\oldmarginpar\marginpar
25 \renewcommand\marginpar[1]{\-\oldmarginpar[\raggedleft\footnotesize #1]%
26 {\raggedright\footnotesize #1}}
27
28
29 \newcommand{\footnoteremember}[2]{
30   \footnote{#2}
31   \newcounter{#1}
32   \setcounter{#1}{\value{footnote}}
33 } \newcommand{\footnoterecall}[1]{
34   \footnotemark[\value{#1}]
35 }
36
37 %\pdfpagewidth 8.5in
38 %\pdfpageheight 11in 
39 %\topmargin 0in
40 %\textheight 7.5in
41 %\textwidth 6.0in
42 %\oddsidemargin 0.25in
43 %\evensidemargin 0.25in
44 %\headwidth 6.0in
45 \def\to{\ $\rightarrow$\ }
46
47 \def\docnum{AM33}
48
49 \author{
50 \normalsize{
51 \begin{tabular}{c}
52 \end{tabular}}
53 }
54
55 \title{\vspace{-1cm}AM33: The FleetTwo Dock
56 \\
57 {\normalsize
58 Adam Megacz
59 }}
60
61 \begin{document}
62
63 \maketitle
64
65 \begin{abstract}
66 Changes:
67
68 \begin{tabular}{rl}
69 \color{red} 
70 11-Jun
71 & \color{red}  XXX \\
72 \color{black} 
73 06-Jun
74 & Factored in Russell Kao's comments (thanks!)\\
75 & Added mechanism for setting C-flag from fabric even on outboxes\\
76 05-Jun
77 & Made {\tt OLC} test a predicate-controlled condition\\
78 & Rewrote ``on deck'' section \\
79 & Added ``{\tt unset}'' value for {\tt ILC}\\
80 & Changed {\tt DP} to {\tt DataPredecessor} for clarity\\
81 \color{black}
82 30-Apr
83 & added comment about address-to-path ship \\
84 & changed {\tt DST} field of {\tt set} instruction from 2 bits to 3 \\
85 & changed the order of instructions in the encoding map \\
86 23-Apr
87 & added epilogue fifo to diagrams \\
88 & indicated that a token sent to the instruction port is treated as a torpedo \\
89 18-Apr
90 & replaced {\tt setInner}, {\tt setOuter}, {\tt setFlags} with unified {\tt set} instruction \\
91 & replaced {\tt literal} with {\tt shift} instruction \\
92 17-Apr
93 & Made all instructions except {\tt setOuter} depend on {\tt OLC>0}  \\
94 & Removed ability to manually set the {\tt C} flag  \\
95 & Expanded predicate field to three bits \\
96 & New literals scheme (via shifting) \\
97 & Instruction encoding changes made at Ivan's request (for layout purposes) \\
98 & Added summary of instruction encodings on last page \\
99 %07-Apr
100 %& removed ``+'' from ``potentially torpedoable'' row where it does not occur in Execute  \\
101 %06-Apr
102 %& extended {\tt LiteralPath} to 13 bits (impl need not use all of them)  \\
103 %& update table 3.1.2  \\
104 %& rename {\tt S} flag to {\tt C}  \\
105 %& noted that {\tt setFlags} can be used as {\tt nop} \\
106 %29-Mar
107 %& removed the {\tt L} flag (epilogues can now do this) \\
108 %& removed {\tt take\{Inner|Outer\}LoopCounter} instructions \\
109 %& renamed {\tt data} instruction to {\tt literal} \\
110 %& renamed {\tt send} instruction to {\tt move} \\
111 %23-Mar
112 %& added ``if its predicate is true'' to repeat count \\
113 %& added note that red wires do not contact ships \\
114 %& changed name of {\tt flags} instruction to {\tt setFlags} \\
115 %& removed black dot from diagrams \\
116 %& changed {\tt OL} (Outer Loop participant) to {\tt OS} (One Shot) and inverted polarity \\
117 %& indicated that the death of the {\tt tail} instruction is what causes the hatch to be unsealed \\
118 %& indicated that only {\tt send} instructions which wait for data are torpedoable \\
119 %& added section ``Torpedo Details'' \\
120 %& removed {\tt torpedo} instruction \\
121 %12-Mar
122 %\color{black}
123 %& renamed loop+repeat to outer+inner (not in red) \\
124 %& renamed {\tt Z} flag to {\tt L} flag (not in red) \\
125 %& rewrote ``inner and outer loops'' section \\
126 %& updated all diagrams \\
127 %\color{black}
128 %7-Mar
129 %& Moved address bits to the LSB-side of a 37-bit instruction \\
130 %& Added {\it micro-instruction} and {\it composite instruction} terms \\
131 %& Removed the {\tt DL} field, added {\tt decrement} mode to {\tt loop} \\
132 %& Created the {\tt Hold} field \\
133 %& Changed how ReLooping works \\
134 %& Removed {\tt clog}, {\tt unclog}, {\tt interrupt}, and {\tt massacre} \\
135 \end{tabular}
136 \end{abstract}
137
138 \vfill
139
140 \begin{center}
141 \epsfig{file=all,height=1.5in}
142 \epsfig{file=overview-new,height=1.5in}
143 \end{center}
144
145 \pagebreak
146
147 \section{Overview of Fleet}
148
149 A Fleet processor is organized around a {\it switch fabric}, which is
150 a packet-switched network with reliable in-order delivery.  The switch
151 fabric is used to carry data between different functional units,
152 called {\it ships}.  Each ship is connected to the switch fabric by
153 one or more programmable elements known as {\it docks}.
154
155 A {\it path} specifies a route through the switch fabric from a
156 particular {\it source} to a particular {\it destination}.  The
157 combination of a path and a single word to be delivered is called a
158 {\it packet}.  The switch fabric carries packets from their sources to
159 their destinations.  Each dock has two destinations: one for {\it
160   instructions} and one for {\it data}.  A Fleet is programmed by
161 depositing instruction packets into the switch fabric with paths that
162 will lead them to instruction destinations of the docks at which they
163 are to execute.
164
165 When a packet arrives at the instruction destination of a dock, it is
166 enqueued for execution.  Before the instruction executes, it may cause
167 the dock to wait for a packet to arrive at the dock's data destination
168 or for a value to be presented by the ship.  When an instruction
169 executes it may consume this data and may present a data value to the
170 ship or transmit a packet.
171
172 When an instruction sends a packet into the switch fabric, it may
173 specify that the payload of the packet is irrelevant.  Such packets
174 are known as {\it tokens}, and consume less energy than data packets.
175
176
177 \begin{center}
178 \epsfig{file=overview-new,width=2.5in}\\
179 {\it Overview of a Fleet processor; gray shading represents the switch
180   fabric; docks are shown in blue.}
181 \end{center}
182 \color{black}
183
184 \pagebreak
185
186 \section{The FleetTwo Dock}
187
188 The diagram below represents a conceptual view of the interface
189 between ships and the switch fabric; actual implementation circuitry
190 may differ.
191
192 \begin{center}
193 \epsfig{file=all,width=3.5in}\\
194 {\it An ``input'' dock and ``output'' dock connected to a ship.  Solid
195   blue lines carry either tokens or data words, red lines carry either
196   instructions or torpedoes, and dashed lines carry only tokens.}
197 \end{center}
198
199 Each dock consists of a {\it data latch}, which is as wide as a single
200 machine word and a {\it pump}, which is a circular fifo of
201 instruction-width latches.  The values in the pump control the data
202 latch.  The dock also includes a {\it path latch}, which
203 stores the path along which outgoing packets will be sent.\color{black}
204
205 Note that the pump in each dock has a destination of its own; this is
206 the {\it instruction destination} mentioned in the previous section.
207
208 From any source to any dock's data destination there are
209 two distinct paths which differ by a single bit.  This bit is known as
210 the ``signal'' bit, and the routing of a packet is not affected by it;
211 the signal bit is used to pass control values between docks.  Note that paths
212 terminating at an {\it instruction} destination need not have a signal
213 bit.  \color{black}
214
215 \pagebreak
216 \section{Instructions}
217
218 In order to cause an instruction to execute, the programmer must first
219 arrange for that instruction word to arrive in the data latch of some
220 output dock.  For example, this might be the ``data read'' output dock
221 of the memory access ship or the output of a fifo ship.  Once an
222 instruction has arrived at this output dock, it is {\it dispatched} by
223 sending it to the {\it instruction port} of the dock at which it is to
224 execute.
225
226 Each instruction is 26 bits long, which makes it possible for an
227 instruction and an 11-bit path to fit in a single word of memory.
228 This path is the path from the {\it dispatching} dock to the {\it
229   executing} dock.
230
231 \setlength{\bitwidth}{3.5mm}
232 {\tt \footnotesize
233 \begin{bytefield}{37}
234   \bitheader[b]{0,10,11,36}\\
235   \bitbox{26}{instruction} 
236   \bitbox{11}{dispatch path} 
237 \end{bytefield}}
238
239
240
241
242 \subsection{Life Cycle of an Instruction}
243
244 The diagram below shows an input dock for purposes of illustration:
245
246 \begin{center}
247 \epsfig{file=in,width=4in}\\
248 {\it an input dock}
249 \end{center}
250
251 Note the mux on the path between {\tt EF} (epilogue fifo) and {\tt IF}
252 (instruction fifo); this is known as ``the hatch''.  The hatch has two
253 states: sealed and unsealed.  When the machine powers up, the hatch is
254 unsealed; it is sealed by the {\tt tail} instruction and unsealed
255 whenever the outer loop counter is set to zero (for any
256 reason\footnote{this includes {\tt OLC} being decremented to zero, a
257   {\tt set} instruction, or the occurrence
258   of a torpedo}).
259
260 When an instruction arrives at the epilogue fifo ({\tt EF}), it waits
261 there until the hatch is in the unsealed state; the instruction then
262 enters the instruction fifo.  When an instruction emerges from the
263 instruction fifo, it arrives at the ``on deck'' ({\tt OD}) stage,
264 where it may execute.
265
266 \begin{center}
267 \epsfig{file=out,width=4in}\\
268 {\it an output dock}
269 \end{center}
270
271 \subsubsection{Torpedoes}
272
273 A token sent to an instruction destination is called a {\it torpedo}.
274 When a torpedo arrives at the tail of {\tt EF}, it is deposited in a
275 waiting area (not shown) rather than being enqueued into {\tt EF}.
276
277 There is a latch (not shown) called the {\it torpedo acknowledgment path
278   latch} ({\tt TAPL}) which stores a path.  When a torpedo is consumed
279 (see section ``On Deck''), a token is sent along the path held in this
280 latch.
281
282 \subsection{Format of an Instruction}
283
284 All instruction words have the following format:
285
286 \newcommand{\bitsHeader}{
287   \bitbox{1}{I} 
288   \bitbox{1}{OS}
289   \bitbox{3}{P} 
290 }
291
292 \setlength{\bitwidth}{3.5mm}
293 {\tt \footnotesize
294 \begin{bytefield}{37}
295   \bitheader[b]{0,10,11,31,32,34-36}\\
296 \color{black}
297   \bitsHeader
298 \color{light}
299   \bitbox[tbr]{21}{} 
300   \bitbox{11}{dispatch path} 
301 \color{black}
302 \end{bytefield}}
303
304 \begin{itemize}
305 \item The {\tt I} bit stands for {\tt Interruptible}, and indicates if an
306 instruction is vulnerable to torpedoes.
307
308 \item The {\tt OS} (``One Shot'') bit indicates whether or not this
309   instruction can pass through the pump more than once.  If set to
310   {\tt 1}, then the instruction is a ``one-shot'' instruction, and
311   does not pass through the instruction fifo more than once.
312
313 \item  The {\tt P} bits are a {\it predicate}; this
314 holds a code which indicates if the instruction should be executed or
315 ignored depending on the state of flags in the dock.
316 \end{itemize}
317
318 \pagebreak
319 \subsection{Loop Counters}
320
321 A programmer can perform two types of loops: {\it inner} loops of only
322 one instruction and {\it outer} loops of multiple instructions.  Inner
323 loops may be nested within an outer loop, but no other nesting of
324 loops is allowed.
325
326 The dock has two loop counters, one for each kind of loop:
327
328 \begin{itemize}
329 \item {\tt OLC} is the Outer Loop Counter
330 \item {\tt ILC} is the Inner Loop Counter
331 \end{itemize}
332
333 The {\tt OLC} applies to all instructions and can hold integers {\tt
334   0..MAX_OLC}.
335
336 The {\tt ILC} applies only to {\tt move} instructions and can hold
337 integers {\tt 0..MAX_ILC} as well as a special value: $\infty$.  When
338 {\tt ILC=0} the next {\tt move} instruction executes zero times (ie is
339 ignored).  When {\tt ILC=$\infty$} the next {\tt move} instruction
340 executes until interrupted by a torpedo.  After every {\tt move}
341 instruction the {\tt ILC} is reset to {\tt 1} (note that it is reset
342 to {\tt 1}, {\it not to 0}).
343
344 \color{black}
345 \subsection{Flags and Predication}
346
347 The pump has three flags: {\tt A}, {\tt B}, and {\tt C}.
348
349 \begin{itemize}
350 \item The {\tt A} and {\tt B} flags are general-purpose flags which
351       may be set and cleared by the programmer.
352
353 %\item
354 %
355 % The {\tt L} flag, known as the {\it last} flag, is set whenever
356 %      the value in the outer counter ({\tt OLC}) is one,
357 \color{black}
358 % indicating
359 %      that the dock is in the midst of the last iteration of an
360 %      outer loop.  This flag can be used to perform certain
361 %      operations (such as sending a completion token) only on the last
362 %      iteration of an outer loop.
363
364 \item The {\tt C} flag is known as the {\it control} flag, and may be
365       set by the {\tt move} instruction based on information from the
366       ship or from an inbound packet.  See the {\tt move} instruction
367       for further details.
368 \color{black}
369
370 \end{itemize}
371
372 The {\tt P} field specifies a three-bit {\it predicate}.  The
373 predicate determines which conditions must be true in order for the
374 instruction to execute; if it is not executed, it is simply {\it
375   ignored}.  The table below shows what conditions must be true in
376 order for an instruction to execute:
377
378 \begin{center}
379 \begin{tabular}{|r|ll|}\hline
380 Code       & Execute & if \\\hline
381 {\tt 000:} & {\tt OLC$\neq$0} & and {\tt A=0} \\
382 {\tt 001:} & {\tt OLC$\neq$0} & and {\tt A=1} \\
383 {\tt 010:} & {\tt OLC$\neq$0} & and {\tt B=0} \\
384 {\tt 011:} & {\tt OLC$\neq$0} & and {\tt B=1} \\
385 {\tt 100:} & {\tt OLC$\neq$0} & and {\tt C=0} \\
386 {\tt 101:} & {\tt OLC$\neq$0} & and {\tt C=1} \\
387 {\tt 110:} & {\tt OLC$\neq$0} & \\
388 {\tt 111:} & always & \\
389 \hline\end{tabular}
390 \end{center}
391
392 \pagebreak
393 \subsection{On Deck}
394
395 When an instruction arrives on deck, two concurrent processes are
396 started.  No subsequent instruction may come on deck until both
397 processes have completed:
398
399 \begin{enumerate}
400
401 \item Requeueing:
402       \begin{itemize}
403       \item If the outer loop counter is zero ({\tt OLC=0}) or the
404             instruction on deck is a one-shot instruction ({\tt
405             OS=1}), do nothing.
406       \item {\it Otherwise} wait for the hatch to be sealed and
407             enqueue a copy of the instruction currently on deck.
408       \end{itemize}
409
410 \item Execution:
411
412       \begin{itemize}
413       \item
414       If the instruction's predicate condition is not met (see
415       section on predicates), do nothing.
416
417       \item
418       {\it Otherwise} if the instruction is interruptible ({\tt I=0})
419       and a torpedo is present in the waiting area: consume the
420       torpedo, set the outer loop counter to zero ({\tt OLC=0}),
421       unseal the hatch, and transmit a token along in the
422       {\it torpedo acknowledgment path latch} ({\tt TAPL}).
423
424       \item
425       {\it Otherwise} if {\tt ILC$\neq$0} or the instruction is {\it
426       not} a {\tt move}: execute the instruction.
427       \end{itemize}
428 \end{enumerate}
429
430
431 \color{black}
432
433
434 \pagebreak
435 \section{Instructions}
436
437 The dock supports for instructions:
438 {\tt move} (variants: {\tt moveto}, {\tt dispatch}),
439 {\tt shift},
440 {\tt set}, and
441 {\tt tail}.
442 \color{black}
443
444
445 \subsection{{\tt move} (variants: {\tt moveto}, {\tt dispatch})}
446
447 \newcommand{\bitsMove}{\setlength{\bitwidth}{5mm}
448 {\tt
449 \begin{bytefield}{26}
450   \bitheader[b]{14-20}\\
451 \color{light}
452   \bitsHeader
453 \color{black}
454   \bitbox{1}{0} 
455   \bitbox{1}{1} 
456   \bitbox{1}{\tt Ti}
457   \bitbox{1}{\tt Di}
458   \bitbox{1}{\tt Dc}
459   \bitbox{1}{\tt Do}
460   \bitbox{1}{\tt To}
461   \bitbox[l]{19}{}
462 \end{bytefield}}
463
464 \begin{bytefield}{26}
465   \bitheader[b]{0,12,13}\\
466   \bitbox[1]{11}{\raggedleft {\tt moveto} ({\tt Payload\to Path})}
467   \bitbox[r]{1}{}
468   \bitbox{1}{\tt 1}
469   \bitbox{13}{\tt Payload}
470 \end{bytefield}
471
472 \begin{bytefield}{26}
473   \bitheader[b]{11,12,13}\\
474   \bitbox[1]{11}{\raggedleft {\tt dispatch} ({\footnotesize {\tt DataPredecessor[37:25]\to Path}})\ \ }
475   \bitbox[r]{1}{}
476   \bitbox{1}{\tt 0}
477   \bitbox{1}{\tt 1}
478 \color{light}
479   \bitbox[trb]{12}{}
480 \color{black}
481 \end{bytefield}
482
483 \begin{bytefield}{26}
484   \bitheader[b]{11,12,13}\\
485   \bitbox[1]{11}{\raggedleft {\tt move} ({\tt Path} unchanged):}
486   \bitbox[r]{1}{}
487   \bitbox{1}{\tt 0}
488   \bitbox{1}{\tt 0}
489 \color{light}
490   \bitbox[trb]{12}{}
491 \color{black}
492 \end{bytefield}}
493 \bitsMove
494
495 \begin{itemize}
496 \item {\tt Ti} - Token Input: wait for the token predecessor to be full and drain it.
497 \item {\tt Di} - Data Input: wait for the data predecessor to be full and drain it.
498 \item {\tt Dc} - Data Capture: pulse the data latch.
499 \item {\tt Do} - Data Output: fill the data successor.
500 \item {\tt To} - Token Output: fill the token successor.
501 \end{itemize}
502
503 The data successor and token successor must both be empty in order for
504 a {\tt move} instruction to attempt execution.
505
506 Every time the {\tt move} instruction executes, the {\tt C} flag may
507 be set:
508
509 \begin{itemize}
510 \item At an {\it input} dock the {\tt C} flag is set to the signal bit
511       of the incoming packet if {\tt Di} or {\tt Ti} is set.
512
513 \item At an {\it output} dock the {\tt C} flag is set to a value
514       provided by the ship if the {\tt Di} bit is set, and to the
515       signal bit of the incoming packet if {\tt Di} is clear and {\tt
516       Ti} is set.
517 \end{itemize}
518
519 \color{black}
520
521 \pagebreak
522
523 \subsection{{\tt set}}
524
525 The {\tt set} command is used to set or decrement the inner loop
526 counter, outer loop counter, and data latch.
527
528 \newcommand{\bitsSet}{
529 \setlength{\bitwidth}{5mm}
530 {\tt
531 \begin{bytefield}{26}
532   \bitheader[b]{0,13-15,16-20}\\
533 \color{light}
534   \bitsHeader
535 \color{black}
536   \bitbox{1}{1}
537   \bitbox{1}{0} 
538   \bitbox{2}{SRC}
539   \bitbox{3}{DST}
540   \bitbox{14}{Payload} 
541 \color{black}
542 \end{bytefield}}
543 }
544 \bitsSet
545
546 \begin{center}{\tt
547 \begin{tabular}{|r|r|l|l|}\hline
548 Source & SRC & DST & Destination \\\hline
549 \hline
550 Payload            & 00 & 000 & OLC \\
551 Data Latch         & 01 & 000 & OLC \\
552 OLC-1              & 10 & 000 & OLC \\
553 Payload            & 00 & 001 & ILC \\
554 Data Latch         & 01 & 001 & ILC \\
555 $\infty$           & 10 & 001 & ILC \\
556 Payload            & 00 & 010 & TAPL \\
557 Payload, 0-extend  & 01 & 100 & Data Latch \\
558 Payload, 1-extend  & 10 & 100 & Data Latch \\
559        see below   &    & 111 & Flags \\
560 \hline
561 \end{tabular}
562 }\end{center}
563
564 The FleetTwo implementation is likely to have an unarchitected
565 ``literal latch'' at the on deck ({\tt OD}) stage, which is loaded
566 with the possibly-extended literal {\it at the time that the {\tt set}
567   instruction comes on deck}.  This latch is then copied into the data
568 latch when a {\tt set Data Latch} instruction
569 executes\color{black}.
570
571 If the {\tt Dest} field is {\tt flags}, the {\tt Payload} field is
572 interpreted as two fields, each giving the truth table for the new
573 value of one of the two user-settable flags:
574
575 \begin{center}
576 \setlength{\bitwidth}{5mm}
577 {\tt
578 \begin{bytefield}{26}
579   \bitheader[b]{0,5,6,11}\\
580 \color{light}
581   \bitsHeader
582   \bitbox{1}{1}
583   \bitbox{1}{0} 
584 \color{light}
585   \bitbox{2}{}
586 \color{black}
587   \bitbox{3}{111}
588 \color{light}
589   \bitbox{2}{}
590 \color{black}
591   \bitbox{6}{nextA}
592   \bitbox{6}{nextB}
593 \end{bytefield}}
594 \end{center}
595 \color{black}
596 Each field has the following structure, and indicates which old flag
597 values should be logically {\tt OR}ed together to produce the new flag
598 value:
599
600 \begin{center}
601 {\tt
602 \begin{bytefield}{6}
603   \bitheader[b]{0-5}\\
604   \bitbox{1}{${\text{\tt A}}$}
605   \bitbox{1}{$\overline{\text{\tt A}}$}
606   \bitbox{1}{${\text{\tt B}}$}
607   \bitbox{1}{$\overline{\text{\tt B}}$}
608   \bitbox{1}{${\text{{\tt C}\ }}$}
609   \bitbox{1}{$\overline{\text{{\tt C}\ }}$}
610 \end{bytefield}}
611 \end{center}
612
613 Each bit corresponds to one possible input; all inputs whose bits are
614 set are {\tt OR}ed together, and the resulting value is assigned to
615 the flag.  Note that if none of the bits are set, the value assigned
616 is zero.  Note also that it is possible to produce a {\tt 1} by {\tt
617   OR}ing any flag with its complement, and that {\tt set Flags} can
618 be used to create a {\tt nop} (no-op) by setting each flag to itself.
619
620
621 \color{black}
622
623 \pagebreak
624 \subsection{{\tt shift}}
625
626 \newcommand{\shiftPayloadSize}{19}
627
628 Each {\tt shift} instruction carries a payload of \shiftPayloadSize\ 
629 bits.  When a {\tt shift} instruction is executed, this payload is copied
630 into the least significant \shiftPayloadSize\  bits of the data latch,
631 and the remaining most significant bits of the data latch are loaded
632 with the value formerly in the least significant bits of the data latch.
633 In this manner, large literals can be built up by ``shifting'' them
634 into the data latch \shiftPayloadSize\ bits at a time.
635
636 \newcommand{\bitsShift}{
637 \setlength{\bitwidth}{5mm}
638 {\tt
639 \begin{bytefield}{26}
640   \bitheader[b]{0,18-20}\\
641 \color{light}
642   \bitsHeader
643 \color{black}
644   \bitbox{1}{0} 
645   \bitbox{1}{0} 
646 \color{black}
647   \bitbox{\shiftPayloadSize}{Payload} 
648 \end{bytefield}}
649 }
650 \bitsShift
651
652 The FleetTwo implementation is likely to have an unarchitected
653 ``literal latch'' at the on deck ({\tt OD}) stage, which is loaded
654 with the literal {\it at the time that the {\tt shift} instruction
655   comes on deck}.  This latch is then copied into the data latch when
656 the instruction executes.
657
658 \color{black}
659
660 \subsection{{\tt tail}}
661
662 \newcommand{\bitsTail}{
663 \setlength{\bitwidth}{5mm}
664 {\tt
665 \begin{bytefield}{26}
666   \bitheader[b]{19-20}\\
667 \color{light}
668   \bitbox{5}{} 
669 \color{black}
670   \bitbox{1}{1}
671   \bitbox{1}{1}
672 \color{light}
673   \bitbox[tbr]{19}{} 
674 \end{bytefield}}}
675 \bitsTail
676
677 When a {\tt tail} instruction reaches the hatch, it seals the hatch.
678 The {\tt tail} instruction does not enter the instruction fifo.
679
680 \color{black}
681 %\pagebreak
682 %\subsection{{\tt takeOuterLoopCounter}}
683 %
684 %\setlength{\bitwidth}{5mm}
685 %{\tt
686 %\begin{bytefield}{26}
687 %  \bitheader[b]{16-19,21}\\
688 %\color{light}
689 %  \bitbox{1}{A}
690 %  \bitbox{1}{OS} 
691 %  \bitbox{2}{P}
692 %\color{black}
693 %  \bitbox{3}{000}
694 %  \bitbox{1}{0}
695 %  \bitbox{2}{11}
696 %\color{light}
697 %  \bitbox[tbr]{16}{} 
698 %\color{black}
699 %\end{bytefield}}
700 %
701 %This instruction copies the value in the outer loop counter {\tt OLC}
702 %into the least significant bits of the data latch and leaves all other
703 %bits of the data latch unchanged.
704 %
705 %\subsection{{\tt takeInnerLoopCounter}}
706 %
707 %\setlength{\bitwidth}{5mm}
708 %{\tt
709 %\begin{bytefield}{26}
710 %  \bitheader[b]{16-19,21}\\
711 %\color{light}
712 %  \bitbox{1}{A}
713 %  \bitbox{1}{OS} 
714 %  \bitbox{2}{P}
715 %\color{black}
716 %  \bitbox{3}{???}
717 %  \bitbox{1}{?}
718 %  \bitbox{2}{??}
719 %\color{light}
720 %  \bitbox[tbr]{16}{} 
721 %\color{black}
722 %\end{bytefield}}
723 %
724 %This instruction copies the value in the inner loop counter {\tt ILC}
725 %into the least significant bits of the data latch and leaves all other
726 %bits of the data latch unchanged.
727 %
728 %
729 %
730 %%\pagebreak
731 %%\subsection{{\tt interrupt}}
732 %%
733 %%\setlength{\bitwidth}{5mm}
734 %{\tt
735 %\begin{bytefield}{26}
736 %  \bitheader[b]{0,5,16-19,21}\\
737 %\color{light}
738 %  \bitbox{4}{} 
739 %\color{black}
740 %  \bitbox{3}{000} 
741 %  \bitbox{1}{1}
742 %  \bitbox{2}{00}
743 %\color{light}
744 %  \bitbox[tbr]{16}{} 
745 %\end{bytefield}}
746 %
747 %When an {\tt interrupt} instruction reaches {\tt IH}, it will wait
748 %there for the {\tt OD} stage to be full with an instruction that has
749 %the {\tt IM} bit set.  When this occurs, the instruction at {\tt OD}
750 %{\it will not execute}, but {\it may reloop} if the conditions for
751 %relooping are met.
752 %\footnote{The ability to interrupt an instruction yet have it reloop is very
753 %useful for processing chunks of data with a fixed size header and/or
754 %footer and a variable length body.}
755 %
756 %
757 %\subsection{{\tt massacre}}
758 %
759 %\setlength{\bitwidth}{5mm}
760 %{\tt
761 %\begin{bytefield}{26}
762 %  \bitheader[b]{16-19,21}\\
763 %\color{light}
764 %  \bitbox{4}{} 
765 %\color{black}
766 %  \bitbox{3}{000} 
767 %  \bitbox{1}{1}
768 %  \bitbox{2}{01}
769 %\color{light}
770 %  \bitbox[tbr]{16}{} 
771 %\color{black}
772 %\end{bytefield}}
773 %
774 %When a {\tt massacre} instruction reaches {\tt IH}, it will wait there
775 %for the {\tt OD} stage to be full with an instruction that has the
776 %{\tt IM} bit set.  When this occurs, all instructions in the
777 %instruction fifo (including {\tt OD}) are retired.
778 %
779 %\subsection{{\tt clog}}
780 %
781 %\setlength{\bitwidth}{5mm}
782 %{\tt
783 %\begin{bytefield}{26}
784 %  \bitheader[b]{16-19,21}\\
785 %\color{light}
786 %  \bitbox{4}{} 
787 %\color{black}
788 %  \bitbox{3}{000} 
789 %  \bitbox{1}{1}
790 %  \bitbox{2}{10}
791 %\color{light}
792 %  \bitbox[tbr]{16}{} 
793 %\color{black}
794 %\end{bytefield}}
795 %
796 %When a {\tt clog} instruction reaches {\tt OD}, it remains there and
797 %no more instructions will be executed until an {\tt unclog} is
798 %performed.
799 %
800 %\subsection{{\tt unclog}}
801 %
802 %\setlength{\bitwidth}{5mm}
803 %{\tt
804 %\begin{bytefield}{26}
805 %  \bitheader[b]{16-19,21}\\
806 %\color{light}
807 %  \bitbox{4}{} 
808 %\color{black}
809 %  \bitbox{3}{000} 
810 %  \bitbox{1}{1}
811 %  \bitbox[lrtb]{2}{11}
812 %\color{light}
813 %  \bitbox[tbr]{16}{} 
814 %\color{black}
815 %\end{bytefield}}
816 %
817 %When an {\tt unclog} instruction reaches {\tt IH}, it will wait there
818 %until a {\tt clog} instruction is at {\tt OD}.  When this occurs, both
819 %instructions retire.
820 %
821 %Note that issuing an {\tt unclog} instruction to a dock which is not
822 %clogged and whose instruction fifo contains no {\tt clog} instructions
823 %will cause the dock to deadlock.
824
825
826
827 \pagebreak
828 \section*{Instruction Encoding Map\color{black}}
829
830 \hspace{-1cm}{\tt shift}\\
831 \bitsShift
832
833 \hspace{-1cm}{\tt set}\\
834 \bitsSet
835
836 \hspace{-1cm}{\tt move}\\
837 \bitsMove
838
839 \hspace{-1cm}{\tt tail}\\
840 \bitsTail
841
842
843 \color{black}
844
845 \pagebreak
846 \epsfig{file=all,height=5in,angle=90}
847
848 \pagebreak
849 \subsection*{Input Dock}
850 \epsfig{file=in,width=8in,angle=90}
851
852 \pagebreak
853 \subsection*{Output Dock}
854 \epsfig{file=out,width=8in,angle=90}
855
856
857 %\pagebreak
858 %\epsfig{file=ports,height=5in,angle=90}
859
860 %\pagebreak
861 %\epsfig{file=best,height=5in,angle=90}
862
863
864 \end{document}