updated to AM14, AM15
[fleet.git] / contrib / misc.fleet
diff --git a/contrib/misc.fleet b/contrib/misc.fleet
new file mode 100644 (file)
index 0000000..8510634
--- /dev/null
@@ -0,0 +1,40 @@
+//22: sendto debug.data
+//22: sendto debug.data
+//alu1.out: ack debug.data
+
+
+//22: sendto alu3.b
+
+// route the "max" output to the demux, and that to either
+// the finished-value output (debug.data) or the subtractor
+//sort.max: [*] take, sendto demux1.in
+//                           demux1.false: [*] take, sendto debug.data
+//                           demux1.true:  [*] take, sendto alu.a
+//
+//// route the "min" value to the demux selector to decide if  we are
+//// done; also send copies to the ALU and the secondary sort input
+//sort.min: [*] take, sendto dup3.in
+//                           dup3.a:  [*] take, sendto demux1.select
+//                           dup3.b:  [*] take, sendto alu.b
+//                           dup3.c:  [*] take, sendto sort.b
+//
+//// "plug up" the ALU opcode input with a "1" (subtraction)
+//1: sendto alu.op
+//          alu.op: take [*] accept
+//
+//// route all data emerging from the ALU back to the primary sort input
+//alu.out: [*] take, sendto sort.a
+//
+//// all other inputs are in default mode
+//sort.a:        [*] take, accept
+//sort.b:        [*] take, accept
+//alu.a:         [*] take, accept
+//alu.b:         [*] take, accept
+//dup3.in:       [*] take, accept
+//demux1.select: [*] take, accept
+//demux1.in:     [*] take, accept
+//
+//// gcd(377,221)=13  (we hope!)
+////377: sendto sort.a
+////221: sendto sort.b
+//