07-apr version
authoradam <adam@megacz.com>
Thu, 17 Apr 2008 19:53:02 +0000 (12:53 -0700)
committeradam <adam@megacz.com>
Thu, 17 Apr 2008 19:53:02 +0000 (12:53 -0700)
darcs-hash:20080417195302-5007d-2ed07bafb01c5c53ee55f1ec3e544f9e4c935ee9.gz

am33.tex

index 3fd42ee..873f3dd 100644 (file)
--- a/am33.tex
+++ b/am33.tex
@@ -57,7 +57,12 @@ Changes:
 
 \begin{tabular}{rl}
 \color{red}
-??-Apr
+07-Apr
+& removed ``+'' from ``potentially torpedoable'' row where it does not occur in Execute  \\
+06-Apr
+& extended {\tt LiteralPath} to 13 bits (impl need not use all of them)  \\
+& update table 3.1.2  \\
+& rename {\tt S} flag to {\tt C}  \\
 \color{black}
 & noted that {\tt setFlags} can be used as {\tt nop} \\
 29-Mar
@@ -307,6 +312,7 @@ resetting the loop counter in the middle of the execution of a loop.
 The table below lists the actions which may be taken when an
 instruction arrives on deck:
 
+\color{red}
 \begin{center}
 \def\side#1{\begin{sideways}\parbox{15mm}{#1}\end{sideways}}
 \begin{tabular}{|r|ccccc|cccccc|}\hline
@@ -326,12 +332,11 @@ instruction arrives on deck:
 &\side{{\tt setOuter}}
 &
 \\\hline
-Wait for hatch sealed         & +        & + & + & + & +  &          &   &   &   &   &  \\
-Fill IF0 w/ copy of self      & +        & + & + & + & +  &          &   &   &   &   &  \\\hline
-Request arbiter               & P+$\star$ &   &   &   &    & P+$\star$ &   &   &   &   &  \\
-Potentially torpedoable       & P+$\star$ &   &   &   &    & P+$\star$ &   &   &   &   &  \\\hline
-Execute                       & P+       & P+& P+& P+& P+ & ?        & ? & ? & ? & P &  \\
-Inner-looping                 & P+       &   &   &   & ?  & P+       &   &   &   & ? &  \\
+Wait for hatch sealed,        & +   & +   & +   & +   & +   & -   & -   & -   & -   & -   &  \\
+then IF0 w/ copy of self      &     &     &     &     &     &     &     &     &     &     &  \\\hline
+Potentially torpedoable       & P+I & P+I & P+I & P+I & P+I & PI  & PI  & PI  & PI  & PI  & \\
+Execute                       & P+  & P+  & P+  & P+  & P+  & P   & P   & P   & P   & P   &  \\
+Inner-looping                 & P+  & -   & -   & -   & -   & P   & -   & -   & -   & -   &  \\
 \hline
 \end{tabular}
 
@@ -339,10 +344,20 @@ Inner-looping                 & P+       &   &   &   & ?  & P+       &   &   &
 +       & Only if {\tt OLC>0} (ie {\tt OLC} is positive) \\
 P       & Only if predicate is true \\
 P+      & Only if predicate is true and {\tt OLC>0} \\
-P+$\star$ & Only if predicate is true and {\tt OLC>0} and {\tt I=1} and one of {\tt Ti},{\tt Di},{\tt Do} true. \\
-?       & to discuss \\\hline
+PI      & Only if predicate is true and {\tt I=1}. \\
+P+I     & Only if predicate is true and {\tt OLC>0} and {\tt I=1}. \\\hline
 \end{tabular}
 \end{center}
+\color{black}
+
+\color{red}
+{\bf Note:} a non-one-shot instruction may {\it execute} before the
+hatch is sealed, but may not {\it fill IF0} before the hatch is
+sealed.  The instruction will not vacate On Deck until both of these
+tasks are complete, so the second non-one-shot instruction in a loop
+will not execute until the hatch is sealed, {\it but the first
+  instruction will}.
+\color{black}
 
 \subsubsection{Torpedo}
 
@@ -374,7 +389,7 @@ therefore also unseals the hatch).\footnote{it is unspecified whether
 
 \subsection{Flags}
 
-The pump has three flags: {\tt A}, {\tt B}, and {\tt S}.
+The pump has three flags: {\tt A}, {\tt B}, and {\color{red}{\tt C}\color{black}\ }.
 
 \begin{itemize}
 \item The {\tt A} and {\tt B} flags are general-purpose flags which
@@ -391,14 +406,11 @@ The pump has three flags: {\tt A}, {\tt B}, and {\tt S}.
 %      operations (such as sending a completion token) only on the last
 %      iteration of an outer loop.
 
-\item The {\tt S} flag, known as the {\it summary} flag.  Its value is
-      determined by the ship, but unless stated otherwise, it should
-      be assumed that whenever the 37th bit of the data ({\tt D})
-      latch is loaded, that same bit is also loaded into the {\tt S}
-      flag.  This lets the ship make decisions based on whether or not
-      the top bit of the data latch is set; if two's complement
-      numbers are in use, this will indicate whether or not the
-      latched value is negative.
+\item The {\color{red}{\tt C}\color{black}\ } flag, known as the {\it control} flag.  
+      \color{red}At outboxes its value is determined by the ship; at
+      inboxes its value is copied from an unused address bit in the
+      destination to which the received value was sent.
+      \color{black}
 \end{itemize}
 
 Many instruction fields are specified as two-bit {\it predicates}.
@@ -409,7 +421,7 @@ or {\tt B} flags:
 \begin{itemize}
 \item {\tt 00:} if {\tt A} is set
 \item {\tt 10:} if {\tt B} is set
-\item {\tt 01:} TBD
+\item {\tt 01:} \color{red}if {\color{red}{\tt C}\color{black}\ } is set\color{black}
 \item {\tt 11:} always
 \end{itemize}
 
@@ -431,9 +443,6 @@ Here is a list of the instructions supported by the dock:
 \end{tabular}
 \end{center}
 
-{\tt tail} {\it will probably become a bit on every instruction rather than
-  its own instruction}
-
 \color{black}
 
 
@@ -442,22 +451,19 @@ Here is a list of the instructions supported by the dock:
 \setlength{\bitwidth}{5mm}
 {\tt
 \begin{bytefield}{26}
-  \bitheader[b]{12-16,19,21}\\
+  \bitheader[b]{14-19,21}\\
 \color{light}
   \bitbox{1}{I}
   \bitbox{1}{OS}
   \bitbox{2}{P}
 \color{black}
    \bitbox{3}{001} 
-\color{light}
-  \bitbox[trb]{2}{} 
-\color{black}
   \bitbox{1}{\tt Ti}
   \bitbox{1}{\tt Di}
   \bitbox{1}{\tt Dc}
   \bitbox{1}{\tt Do}
   \bitbox{1}{\tt To}
-  \bitbox[l]{17}{}
+  \bitbox[l]{19}{}
 \end{bytefield}}
 
 %\begin{bytefield}{26}
@@ -479,32 +485,32 @@ Here is a list of the instructions supported by the dock:
 %\end{bytefield}
 
 \begin{bytefield}{26}
-  \bitheader[b]{0,10,11}\\
-  \bitbox[1]{13}{\raggedleft {\tt moveto} ({\tt LiteralPath\to Path})}
+  \bitheader[b]{0,12,13}\\
+  \bitbox[1]{11}{\raggedleft {\tt moveto} ({\tt LiteralPath\to Path})}
   \bitbox[r]{1}{}
   \bitbox{1}{\tt 1}
-  \bitbox{11}{\tt LiteralPath}
+  \bitbox{13}{\tt LiteralPath}
 \end{bytefield}
 
 \begin{bytefield}{26}
-  \bitheader[b]{10,11}\\
-  \bitbox[1]{13}{\raggedleft {\tt dispatch} ({\tt DP[37:27]\to Path})\ \ }
+  \bitheader[b]{12,13}\\
+  \bitbox[1]{11}{\raggedleft {\tt dispatch} ({\tt DP[37:25]\to Path})\ \ }
   \bitbox[r]{1}{}
   \bitbox{1}{\tt 0}
   \bitbox{1}{\tt 1}
 \color{light}
-  \bitbox[trb]{10}{}
+  \bitbox[trb]{12}{}
 \color{black}
 \end{bytefield}
 
 \begin{bytefield}{26}
-  \bitheader[b]{10,11}\\
-  \bitbox[1]{13}{\raggedleft {\tt move} ({\tt Path} unchanged):}
+  \bitheader[b]{12,13}\\
+  \bitbox[1]{11}{\raggedleft {\tt move} ({\tt Path} unchanged):}
   \bitbox[r]{1}{}
   \bitbox{1}{\tt 0}
   \bitbox{1}{\tt 0}
 \color{light}
-  \bitbox[trb]{10}{}
+  \bitbox[trb]{12}{}
 \color{black}
 \end{bytefield}
 
@@ -600,7 +606,7 @@ sel  & D[37:20]      & D[19:1]       \\\hline
 \setlength{\bitwidth}{5mm}
 {\tt
 \begin{bytefield}{26}
-  \bitheader[b]{0,7,8,15,16-19,21}\\
+  \bitheader[b]{0,5,6,11,12,17-19,21}\\
 \color{light}
   \bitbox{1}{I}
   \bitbox{1}{OS} 
@@ -610,12 +616,12 @@ sel  & D[37:20]      & D[19:1]       \\\hline
   \bitbox{1}{0}
   \bitbox{6}{nextA}
   \bitbox{6}{nextB}
-  \bitbox{6}{nextS}
+  \bitbox{6}{nextC}
 \end{bytefield}}
 
 The {\tt P} field is a predicate; if it does not hold, the instruction
 is ignored.  Otherwise the flags are updated according to the {\tt
-  nextA}, {\tt nextB}, and {\tt nextS} fields; each specifies the new
+  nextA}, {\tt nextB}, and {\tt nextC} fields; each specifies the new
 value as the logical {\tt OR} of zero or more inputs:
 
 \begin{center}
@@ -626,8 +632,8 @@ value as the logical {\tt OR} of zero or more inputs:
   \bitbox{1}{$\overline{\text{\tt A}}$}
   \bitbox{1}{${\text{\tt B}}$}
   \bitbox{1}{$\overline{\text{\tt B}}$}
-  \bitbox{1}{${\text{\tt S}}$}
-  \bitbox{1}{$\overline{\text{\tt S}}$}
+  \bitbox{1}{${\text{\color{red}{\tt C}\color{black}\ }}$}
+  \bitbox{1}{$\overline{\text{\color{red}{\tt C}\color{black}\ }}$}
 \end{bytefield}}
 \end{center}
 
@@ -635,11 +641,9 @@ Each bit corresponds to one possible input; all inputs whose bits are
 set are {\tt OR}ed together, and the resulting value is assigned to
 the flag.  Note that if none of the bits are set, the value assigned
 is zero.  Note also that it is possible to produce a {\tt 1} by {\tt
-  OR}ing any flag with its complement.
-\color{red}
-Note that {\tt setFlags} can be used to create a {\tt nop} (no-op) by
-setting each flag to itself.
-\color{black}
+  OR}ing any flag with its complement.  Note that {\tt setFlags} can
+be used to create a {\tt nop} (no-op) by setting each flag to itself.
+
 
 
 \pagebreak
@@ -767,9 +771,6 @@ register.
 
 \subsection{{\tt tail}}
 
-{\it This will probably become a bit on every instruction rather than
-  its own instruction.  The only problem is that we have run out of bits in the {\tt literal} instruction.  Two possible solutions: (a) declare that {\tt literal} cannot be the last instruction in a loop or (b) because {\tt literal} instructions cannot be torpedoed anyways, re-use its {\tt I} bit for this purpose.}
-
 \setlength{\bitwidth}{5mm}
 {\tt
 \begin{bytefield}{26}