bitfifo notes
authoradam <adam@megacz.com>
Mon, 18 Jun 2007 23:34:04 +0000 (00:34 +0100)
committeradam <adam@megacz.com>
Mon, 18 Jun 2007 23:34:04 +0000 (00:34 +0100)
ships/BitFifo.ship

index 1373b36..0012316 100644 (file)
@@ -18,6 +18,65 @@ data  out:  out
 
 == TeX ==============================================================
 
++------+   +--------------+   +-------+
+|inData|---|              |---|outData|
++------+   |              |   +-------+
+           |              |
++------+   |              |   +-------+
+| inOp |---|              |---| outOp |
++------+   +--------------+   +-------+
+
+inOp
++---+
+|   |  -- reverse before enqueue
++---+
+|   |  -- count := (37-offset-count)
++---+
+|   |  -- count (6 bits)
+|   |
+|   |
+|   |
+|   |
++---+
+|   |  -- offset (6 bits)
+|   |
+|   |
+|   |
+|   |
++---+
+
+outOp
++---+
+|   |  -- shift until you see a "Z" (2 bits)
++---+
+|   |  -- sort the digits
++---+
+|   |  -- give me the count
++---+
+|   |  -- reverse after dequeue
++---+
+|   |  -- count := 37-off-count
++---+
+|   |  -- reset the counter before operation
++---+
+|   |  -- fill left with (1,0,sign)  (2 bits)
++---+
+|   |  -- fill right with (1,0,sign)  (2 bits)
++---+
+|   |  -- count (6 bits)
+|   |
+|   |
+|   |
+|   |
++---+
+|   |  -- offset (6 bits)
+|   |
+|   |
+|   |
+|   |
++---+
+
+
 == Fleeterpreter ====================================================
 // Internal storage
 private static class BitStorage {