From: adam Date: Sat, 25 Aug 2007 15:17:27 +0000 (+0100) Subject: update more test cases to use literal-at-pump X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=7792478aa887f60bc633fa819188e4cb4641711c;p=fleet.git update more test cases to use literal-at-pump --- diff --git a/ships/Alu2.ship b/ships/Alu2.ship index df756ab..400eb08 100644 --- a/ships/Alu2.ship +++ b/ships/Alu2.ship @@ -110,25 +110,21 @@ public void service() { #expect 9 debug.in: [*] take, deliver; -9: sendto alu.in1; -9: sendto alu.in1; -9: sendto alu.in1; -9: sendto alu.in1; -8: sendto alu.in2; -8: sendto alu.in2; -8: sendto alu.in2; -8: sendto alu.in2; - -Alu2.inOp[ADD]: sendto alu.inOp; -Alu2.inOp[SUB]: sendto alu.inOp; -Alu2.inOp[MIN]: sendto alu.inOp; -Alu2.inOp[MAX]: sendto alu.inOp; +alu.in1: + literal 9; [4] deliver; + +alu.in2: + literal 8; [4] deliver; alu.in1: [*] take, deliver; alu.in2: [*] take, deliver; -alu.inOp: [*] take, deliver; alu.out: [*] take, sendto debug.in; +alu.inOp: + literal Alu2.inOp[ADD]; deliver; + literal Alu2.inOp[SUB]; deliver; + literal Alu2.inOp[MIN]; deliver; + literal Alu2.inOp[MAX]; deliver; diff --git a/ships/Alu3.ship b/ships/Alu3.ship index 13733c6..b3f892a 100644 --- a/ships/Alu3.ship +++ b/ships/Alu3.ship @@ -112,62 +112,54 @@ public void service() { #ship debug : Debug #ship fifo : Fifo -#expect 31509911677 -#expect 1855678 +#expect -66848683 +#expect 18682 // 0: 100100100111110000000 // sel 011110100001001000000 // 1: 111000101000011000011 // r: 111000100110111000000 -1000000: sendto bitfifo.in; -0: sendto bitfifo.in; - bitfifo.in: deliver; // deliver a junk word - take; // wait for the argument + literal 10000; [37] deliver; // deliver it 37 times (once per bit) - take; // wait for the zero-word + literal 0; [38] deliver; // deliver it 37 times // insert bits in lsb order -BitFifo.inOp[lsbFirst,take=37]: sendto bitfifo.inOp; -bitfifo.inOp: take; [*] deliver; +bitfifo.inOp: + literal BitFifo.inOp[lsbFirst,take=37]; + [*] deliver; // toss out 37 bits, take one, repeat. sign extend the result -BitFifo.outOp[drop=37,take=1,signExtend]: sendto bitfifo.outOp; -bitfifo.outOp: take; [*] deliver; +bitfifo.outOp: + literal BitFifo.outOp[drop=37,take=1,signExtend]; + [*] deliver; bitfifo.out: [*] wait, take, sendto lut3.in2; lut3.in2: [4] notify bitfifo.out; [74] take, deliver, notify bitfifo.out; // mux on second input -226: sendto lut3.inLut; -lut3.inLut: take; +lut3.inLut: literal 226; [74] deliver; -1855683: sendto lut3.in1; -0: sendto lut3.in1; -lut3.in1: take; +lut3.in1: literal 18683; [37] deliver; - take; + literal 0; [37] deliver; -1200000: sendto lut3.in3; -0: sendto lut3.in3; -lut3.in3: take; +lut3.in3: literal 12000; [37] deliver; - take; + literal 0; [37] deliver; lut3.out: [*] wait, take, sendto alu3.in2; -0: sendto alu3.in3; -0: sendto alu3.in1; -alu3.in1: [*] take, deliver; +alu3.in1: literal 0; deliver; [*] take, deliver; alu3.in2: [1] notify lut3.out; [*] take, deliver, notify lut3.out; -alu3.in3: [*] take, deliver; +alu3.in3: literal 0; deliver; [*] take, deliver; alu3.out1: [74] take, sendto alu3.in1; alu3.out2: [74] take, sendto alu3.in3; alu3.out3: [74] take; diff --git a/ships/BitFifo.ship b/ships/BitFifo.ship index 287692a..359ce87 100644 --- a/ships/BitFifo.ship +++ b/ships/BitFifo.ship @@ -372,11 +372,11 @@ public void service() { end bitstorage[(`BITSTORAGE_SIZE-2):0] <= bitstorage[(`BITSTORAGE_SIZE-1):1]; bitstorage_count <= bitstorage_count - 1; - dequeue_remaining <= dequeue_remaining - 1; if (dequeue_remaining == 1) begin out_r <= 1; outOp_a <= 1; end + dequeue_remaining <= dequeue_remaining - 1; end else if (enqueue_remaining > 0) begin bitstorage[bitstorage_count] <= @@ -384,11 +384,11 @@ public void service() { ? in_d[`DATAWIDTH-1-(inOp_d[`OP_DROP]+enqueue_remaining-1)] : in_d[ inOp_d[`OP_DROP]+enqueue_remaining-1 ]; bitstorage_count <= bitstorage_count + 1; - enqueue_remaining <= enqueue_remaining - 1; if (enqueue_remaining == 1) begin in_a <= 1; inOp_a <= 1; end + enqueue_remaining <= enqueue_remaining - 1; end else if (in_r && !in_a && inOp_r && !inOp_a && `BITSTORAGE_SIZE > bitstorage_count + inOp_d[`OP_COUNT]) begin // FIXME: zero count => lockup @@ -416,42 +416,16 @@ public void service() { #ship debug : Debug #ship bitfifo : BitFifo -BitFifo.outOp[take=37]: sendto bitfifo.outOp; -bitfifo.outOp: take; [*] deliver; - -bitfifo.in: [*] take, deliver; -bitfifo.inOp: [*] take, deliver; +bitfifo.outOp: literal BitFifo.outOp[take=37]; [*] deliver; bitfifo.out: [*] take, sendto debug.in; debug.in: [*] take, deliver; +bitfifo.in: literal 1; [2] deliver; -// FIXME: test the drop capability - -// enqueue -1: sendto bitfifo.in; -BitFifo.inOp[take=37]: sendto bitfifo.inOp; - -// enqueue reversed -1: sendto bitfifo.in; -BitFifo.inOp[take=37,lsbFirst]: sendto bitfifo.inOp; - -// test copy-last-bit -//0: sendto bitfifo.in; -//BitFifo.inOp[take=33]: sendto bitfifo.inOp; -//1: sendto bitfifo.in; -//BitFifo.inOp[take=1]: sendto bitfifo.inOp; -//1: sendto bitfifo.in; -//BitFifo.inOp[take=0]: sendto bitfifo.inOp; -//0: sendto bitfifo.in; -//BitFifo.inOp[take=1]: sendto bitfifo.inOp; -//1: sendto bitfifo.in; -//BitFifo.inOp[take=0]: sendto bitfifo.inOp; -// -//// ordering -//0: sendto bitfifo.in; -//BitFifo.inOp[take=33]: sendto bitfifo.inOp; -//13: sendto bitfifo.in; -//BitFifo.inOp[take=4]: sendto bitfifo.inOp; -// +bitfifo.inOp: + literal BitFifo.inOp[take=37]; + deliver; + literal BitFifo.inOp[take=37,lsbFirst]; + deliver; == Contributors =========================================================