From: megacz Date: Mon, 19 Jan 2009 02:29:39 +0000 (-0800) Subject: add test tests/flags/c-flag-determined-by-dc.test X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d04841afba988028a42897cfd9333b2e046a9d11;hp=a3f9fc2b747c0779187efd93471bdad946d80cd6;p=fleet.git add test tests/flags/c-flag-determined-by-dc.test --- diff --git a/tests/flags/c-flag-determined-by-dc.test b/tests/flags/c-flag-determined-by-dc.test new file mode 100644 index 0000000..2dd6621 --- /dev/null +++ b/tests/flags/c-flag-determined-by-dc.test @@ -0,0 +1,63 @@ +// expected output +#expect 1 +#expect 0 +#expect 0 +#expect 0 +#expect 1 +#expect 1 +#expect 0 +#expect 1 + +#ship debug : Debug +#ship alu : Alu +#ship fifo : Fifo + +alu.in1: + set word=1; + set ilc=*; + deliver; + +alu.inOp: + set word=Alu.inOp[CMP]; + set ilc=*; + deliver; + +alu.out: + set flags a=0, b=0; + set olc=8; + + head; + [!b] recv token, collect nothing; + [b] recv token, collect word; + set flags a=c, b=b; + [!a] set word=0; + [a] set word=1; + send to debug.in; + set olc--; + [d] abort; + set flags a=a, b=!b; + tail; + +debug.in: + set ilc=*; + recv, deliver; + +alu.in2: + set word=0; + set ilc=4; + deliver; + set word=1; + set ilc=4; + deliver; + +fifo.out: + send token to alu.out:1; + send token to alu.out:1; + send token to alu.out:0; + send token to alu.out:0; + send token to alu.out:1; + send token to alu.out:1; + send token to alu.out:0; + send token to alu.out:0; + +