Changes:
\begin{tabular}{rl}
+\color{red}
+07-Nov
+& \color{red} Distinguish {\tt Z}-flag from OLC=0\\
+& \color{red} Add {\tt flush} instruction\\
+& \color{red} Change {\t I} bit from ``Interruptable'' to ``Immune''\\
20-Sep
& Update hatch description to match \href{http://fleet.cs.berkeley.edu/docs/people/ivan.e.sutherland/ies50-Requeue.State.Diagram.pdf}{IES50} \\
28-Aug
06-Jun
& Factored in Russell Kao's comments (thanks!)\\
& Added mechanism for setting C-flag from fabric even on outboxes\\
-05-Jun
-& Made {\tt OLC} test a predicate-controlled condition\\
-& Rewrote ``on deck'' section \\
-& Added ``{\tt unset}'' value for {\tt ILC}\\
-& Changed {\tt DP} to {\tt DataPredecessor} for clarity\\
-\color{black}
-30-Apr
-& added comment about address-to-path ship \\
-& changed {\tt DST} field of {\tt set} instruction from 2 bits to 3 \\
-& changed the order of instructions in the encoding map \\
-23-Apr
-& added epilogue fifo to diagrams \\
-& indicated that a token sent to the instruction port is treated as a torpedo \\
+%05-Jun
+%& Made {\tt OLC} test a predicate-controlled condition\\
+%& Rewrote ``on deck'' section \\
+%& Added ``{\tt unset}'' value for {\tt ILC}\\
+%& Changed {\tt DP} to {\tt DataPredecessor} for clarity\\
+%\color{black}
+%30-Apr
+%& added comment about address-to-path ship \\
+%& changed {\tt DST} field of {\tt set} instruction from 2 bits to 3 \\
+%& changed the order of instructions in the encoding map \\
+%23-Apr
+%& added epilogue fifo to diagrams \\
+%& indicated that a token sent to the instruction port is treated as a torpedo \\
%18-Apr
%& replaced {\tt setInner}, {\tt setOuter}, {\tt setFlags} with unified {\tt set} instruction \\
%& replaced {\tt literal} with {\tt shift} instruction \\
\end{bytefield}}
\begin{itemize}
-\item The {\tt I} bit stands for {\tt Interruptible}, and indicates if an
-instruction is vulnerable to torpedoes. This bit only appears in {\tt move} instructions.
+
+\item The {\tt I} bit stands for \color{red}{\tt Immune}\color{black},
+ and indicates if an instruction is
+ \color{red}immune\color{black}\ to torpedoes. This bit only appears
+ in {\tt move} instructions.
\item The {\tt OS} (``One Shot'') bit indicates whether or not this
instruction can pass through the pump more than once. If set to
\color{black}
\subsection{Flags and Predication}
-The pump has three flags: {\tt A}, {\tt B}, and {\tt C}.
+The pump has \color{red}four\color{black}\ flags: {\tt A}, {\tt B},
+{\tt C}, \color{red}and {\tt Z}\color{black}.
\begin{itemize}
\item The {\tt A} and {\tt B} flags are general-purpose flags which
set by the {\tt move} instruction based on information from the
ship or from an inbound packet. See the {\tt move} instruction
for further details.
+
+\color{red}
+
+\item The {\tt Z} flag is known as the {\it zero} flag; it is set
+ whenever the {\tt OLC} is {\it decremented to zero} or a torpedo strikes, and is cleared
+ whenever the {\tt OLC} is loaded. Note that loading the {\tt OLC}
+ with zero will actually {\it clear} the {\tt Z} flag.
+
\color{black}
\end{itemize}
order for an instruction to execute:
\begin{center}
-\begin{tabular}{|r|ll|}\hline
-Code & Execute & if \\\hline
-{\tt 000:} & {\tt OLC$\neq$0} & and {\tt A=0} \\
-{\tt 001:} & {\tt OLC$\neq$0} & and {\tt A=1} \\
-{\tt 010:} & {\tt OLC$\neq$0} & and {\tt B=0} \\
-{\tt 011:} & {\tt OLC$\neq$0} & and {\tt B=1} \\
-{\tt 100:} & Unused & \\
-{\tt 101:} & {\tt OLC=0} & \\
-{\tt 110:} & {\tt OLC$\neq$0} & \\
-{\tt 111:} & always & \\
+\begin{tabular}{|r|l|}\hline
+Code & Execute if \\\hline
+{\tt 000:} & \color{red}{\tt Z=0}\color{black}\ and {\tt A=0} \\
+{\tt 001:} & \color{red}{\tt Z=0}\color{black}\ and {\tt A=1} \\
+{\tt 010:} & \color{red}{\tt Z=0}\color{black}\ and {\tt B=0} \\
+{\tt 011:} & \color{red}{\tt Z=0}\color{black}\ and {\tt B=1} \\
+{\tt 100:} & Unused \\
+{\tt 101:} & \color{red}{\tt Z=1}\color{black}\ \\
+{\tt 110:} & \color{red}{\tt Z=0}\color{black}\ \\
+{\tt 111:} & always \\
\hline\end{tabular}
\end{center}
than the length of the instruction fifo.
\item If a requeueable instruction is preceded by a one-shot
- instruction or a {\tt tail}, then it must be the case that {\tt
- OLC>0} both before and after the first time that instruction
- executes.
+ instruction or a {\tt tail}, then it must be the case that
+ \color{red}{\tt Z=0}\color{black}\ both before and after the first
+ time that instruction executes.
-\item If {\tt OLC=0}, only a one-shot instruction may set it to a
+\item If \color{red}{\tt Z=1}\color{black}, only a one-shot instruction may set it to a
nonzero value.
\end{itemize}
\item Once a {\tt tail} instruction reaches the hatch, no further
instructions will be enqueued until a requeueable instruction
- reaches the execution stage and {\tt OLC=0}.
+ reaches the execution stage and \color{red}{\tt Z=1}\color{black}.
\end{itemize}
\item Requeueing:
\begin{itemize}
\item If the instruction on deck is a requeueable instruction
- ({\tt OS=1}) and the outer loop counter is nonzero ({\tt
- OLC>0}), a copy of the instruction is requeued.
+ ({\tt OS=0}) and \color{red}{\tt Z=0}\color{black}, a copy of
+ the instruction is requeued.
\end{itemize}
\item Execution:
section on predicates), do nothing.
\item
- {\it Otherwise} if the instruction is interruptible ({\tt I=1})
+ {\it Otherwise} if the instruction is interruptible ({\tt I=\color{red}0\color{black}})
and a torpedo is present in the waiting area: consume the
- torpedo, set the outer loop counter to zero ({\tt OLC=0}) and
+ torpedo, \color{red}set the {\tt Z} flag\color{black}\ and
set the inner loop counter to one ({\tt ILC=1}).
\item
Ti} is set.
\end{itemize}
+\color{red}
+The {\tt flush} instruction is a variant of {\tt move} which is valid
+only at input docks. It has the same effect as {\tt deliver}, except
+that it sets a special ``flushing'' indicator along with the data
+being delivered.
+
+\newcommand{\bitsFlush}{\setlength{\bitwidth}{5mm}
+{\tt
+\color{red}
+\begin{bytefield}{26}
+ \bitheader[b]{14-18}\\
+ \bitbox[r]{7}{\raggedleft{\tt flush\ \ }}
+ \bitbox{1}{\tt 0}
+\color{black}
+\color{red}
+ \bitbox{1}{\tt 0}
+ \bitbox{1}{\tt 1}
+\color{light}
+\color{red}
+ \bitbox{1}{\tt 0}
+ \bitbox{1}{\tt 0}
+ \bitbox{14}{}
+\end{bytefield}}}
+\bitsFlush
+
+When a ship fires, it must examine the ``flushing'' indicators on the
+input docks whose fullness was part of the firing condition. If all
+of the input docks' flushing indicators are set, the ship must drain
+all of their data successors and take no action. If some, but not
+all, of the indicators are set, the ship must drain {\it only the data
+ successors of the docks whose indicators were {\bf not} set}, and
+take no action. If none of the flushing indicators was set, the ship
+fires normally.
+
\color{black}
\pagebreak
\begin{bytefield}{26}
\bitheader[b]{0,13-18}\\
- \bitbox[1]{6}{\raggedleft \footnotesize {\tt 0-Extended Immediate}\to{\tt Data Latch}}
- \bitbox[r]{1}{}
- \bitbox{4}{\tt 0010\color{black}}
- \bitbox{1}{\tt 0}
- \bitbox{14}{\tt Immediate}
-\end{bytefield}
-
-\begin{bytefield}{26}
- \bitheader[b]{0,13-18}\\
- \bitbox[1]{6}{\raggedleft \footnotesize {\tt 1-Extended Immediate}\to{\tt Data Latch}}
+ \bitbox[1]{6}{\raggedleft \footnotesize {\tt X-Extended Immediate}\to{\tt Data Latch}}
\bitbox[r]{1}{}
\bitbox{4}{\tt 0010\color{black}}
- \bitbox{1}{\tt 1}
+ \bitbox{1}{\tt X}
\bitbox{14}{\tt Immediate}
\end{bytefield}
\hspace{-1cm}{\tt move}\\
\bitsMove
+\color{red}
+\bitsFlush
+\color{black}
\hspace{-1cm}{\tt tail}\\
\bitsTail