From fb84e2949aa8418b3a850991a86a713a600addbc Mon Sep 17 00:00:00 2001 From: adam Date: Sun, 6 May 2007 09:52:35 +0100 Subject: [PATCH] add f0 demo --- contrib/demo.f0 | 52 ++++++++++++++-------------------------------------- 1 file changed, 14 insertions(+), 38 deletions(-) diff --git a/contrib/demo.f0 b/contrib/demo.f0 index 824f9e6..84dcd4a 100644 --- a/contrib/demo.f0 +++ b/contrib/demo.f0 @@ -1,39 +1,15 @@ -main(x -> out) = - alu :: Alu2 - debug :: Debug - fifo1 :: Fifo - fifo2 :: Fifo - { 0, 1, 2 } --> fifo1.in - { 0, 3, 4 } --> fifo2.in - fifo1.out --> alu.inOp, alu.in1, alu.in2 - alu.out --> debug.in - ;; - fifo2.out --> alu.inOp, alu.in1, alu.in2 - alu.out --> debug.in - while alu.out > 3 { - 3 --> debug.in - } - -/* -double(a -> out) = - alu :: Alu2 - a --> alu.in1, alu.in2 - 0 --> alu.inOp - alu.out --> out - - -half(a -> out) = - shift :: Shift - a --> shift.in - 1 --> shift.inAmount - shift.out --> out - -thrice(a -> out) = - alu :: Alu2 - a --> alu.in1, alu.in2, alu.in2 - 0 -[2]-> alu.inOp - { alu.out --> alu.in2 - alu.out --> alu.out - } -*/ +main(a,b -> x,y) = + alu :: Alu2 + debug :: Debug + fifo1 :: Fifo + fifo2 :: Fifo + + { 0, 1 } --> fifo1.in + + fifo1.out --> fifo1.in, fifo1.in + fifo1.out --> fifo1.in, fifo1.in + fifo1.out --> debug.in + fifo1.out --> debug.in + fifo1.out --> debug.in + fifo1.out --> debug.in -- 1.7.10.4