updates to many ships
[fleet.git] / ships / Alu1.ship
index 5eb32fd..41f988b 100644 (file)
@@ -3,19 +3,30 @@ ship: Alu1
 == Ports ===========================================================
 data  in:   in
 data  in:   inOp
-data  in:   inOp.x
-data  in:   inOp.y
-data  in:   inOp.z
+  constant NEG: 0
+  constant INC: 1
+  constant DEC: 2
+  constant ABS: 3
 
 data  out:  out
 
-== Constants ========================================================
-NEG:
-INC:
-DEC:
-ABS:
-
 == TeX ==============================================================
+
+{\tt Alu1} is a ``one-input'' arithmetic logic unit.  It includes
+logic for performing arithmetic operations on a single argument.
+Currently this includes
+negate ({\sc neg}),
+increment ({\sc inc}),
+decrement ({\sc dec}), and
+absolute value ({\sc abs}).
+
+\subsection*{Semantics}
+
+When a value is present at each of {\tt in} and {\tt inOp}, these two
+values are consumed.  Based on the value consumed at {\tt inOp}, the
+requested operation is performed on the value consumed from {\tt in}.
+The result of this operation is then made available at {\tt out}.
+
 == Fleeterpreter ====================================================
     public void service() {
         if (box_in.dataReadyForShip() && box_inOp.dataReadyForShip() && box_out.readyForDataFromShip()) {