From: adam Date: Mon, 18 Jun 2007 23:34:04 +0000 (+0100) Subject: bitfifo notes X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=02d667899ccfa952444373af4a65cdfe6736b6a2;p=fleet.git bitfifo notes --- diff --git a/ships/BitFifo.ship b/ships/BitFifo.ship index 1373b36..0012316 100644 --- a/ships/BitFifo.ship +++ b/ships/BitFifo.ship @@ -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 {