From 48ef38f50710971963bc8d776946c20925752633 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 16 Aug 2007 03:36:41 +0100 Subject: [PATCH] update tests in ship files --- ships/Alu1.ship | 31 ++++++++++++++++++++++++++++++- ships/Alu2.ship | 29 ++++++++++++++++++++++++++++- ships/Alu2b.ship | 3 +++ ships/Alu3.ship | 2 +- ships/Choice.ship | 3 +++ ships/Execute.ship | 3 +++ ships/Fifo.ship | 33 +++------------------------------ ships/Halt.ship | 4 ++++ ships/Lut3.ship | 2 +- 9 files changed, 76 insertions(+), 34 deletions(-) diff --git a/ships/Alu1.ship b/ships/Alu1.ship index a2dcb59..4ef057a 100644 --- a/ships/Alu1.ship +++ b/ships/Alu1.ship @@ -74,7 +74,36 @@ ABS: end == Test ============================================================================== -#skip +// expected output +#expect 10 +#expect 8 +#expect 9 +#expect -9 +#expect 9 + +#ship debug : Debug +#ship alu1 : Alu1 + +debug.in: [*] take, deliver; +9: sendto alu1.in; +9: sendto alu1.in; +9: sendto alu1.in; +9: sendto alu1.in; + +1: sendto alu1.inOp; +2: sendto alu1.inOp; +3: sendto alu1.inOp; +0: sendto alu1.inOp; +0: sendto alu1.inOp; + +alu1.in: [*] take, deliver; +alu1.inOp: [*] take, deliver; +alu1.out: + [3] take, sendto debug.in; + take; + sendto debug.in; + sendto alu1.in; + [*] take, sendto debug.in; == Contributors ========================================================= diff --git a/ships/Alu2.ship b/ships/Alu2.ship index 081b4a5..db76145 100644 --- a/ships/Alu2.ship +++ b/ships/Alu2.ship @@ -101,7 +101,34 @@ public void service() { end == Test ============================================================================== -#skip +// expected output +#ship debug : Debug +#ship alu : Alu2 + +#expect 17 +#expect 1 +#expect 8 +#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.ADD: sendto alu.inOp; +Alu2.SUB: sendto alu.inOp; +Alu2.MIN: sendto alu.inOp; +Alu2.MAX: sendto alu.inOp; + +alu.in1: [*] take, deliver; +alu.in2: [*] take, deliver; +alu.inOp: [*] take, deliver; +alu.out: [*] take, sendto debug.in; diff --git a/ships/Alu2b.ship b/ships/Alu2b.ship index 1691b24..29e7eb7 100644 --- a/ships/Alu2b.ship +++ b/ships/Alu2b.ship @@ -80,6 +80,9 @@ public void service() { == Test ============================================================================== #skip +#ship debug : Debug +#expect 0 +0: sendto debug.in; == Contributors ========================================================= diff --git a/ships/Alu3.ship b/ships/Alu3.ship index d927fe7..261f535 100644 --- a/ships/Alu3.ship +++ b/ships/Alu3.ship @@ -123,7 +123,7 @@ public void service() { 0: sendto bitfifo.inEnqueue; bitfifo.inEnqueue: [*] take, deliver; bitfifo.outDequeue: [*] wait, take, sendto lut3.in2; -lut3.in2: [2] notify bitfifo.outDequeue; +lut3.in2: [5] notify bitfifo.outDequeue; [74] take, deliver, notify bitfifo.outDequeue; // mux on second input diff --git a/ships/Choice.ship b/ships/Choice.ship index 5ea93bb..cdfbf3c 100644 --- a/ships/Choice.ship +++ b/ships/Choice.ship @@ -210,6 +210,9 @@ public void service() { == Test ============================================================================== #skip +#ship debug : Debug +#expect 0 +0: sendto debug.in; == Contributors ========================================================= Adam Megacz diff --git a/ships/Execute.ship b/ships/Execute.ship index 33cd93a..82934eb 100644 --- a/ships/Execute.ship +++ b/ships/Execute.ship @@ -63,6 +63,9 @@ endmodule == Test ============================================================================== #skip +#ship debug : Debug +#expect 0 +0: sendto debug.in; == Contributors ========================================================= Adam Megacz diff --git a/ships/Fifo.ship b/ships/Fifo.ship index bffd2ba..a8fa3c8 100644 --- a/ships/Fifo.ship +++ b/ships/Fifo.ship @@ -18,32 +18,6 @@ data out: out } == FleetSim ============================================================== -== FPGA ============================================================== -`include "macros.v" - -// fifo *ship*: a 16-deep word-wide fifo -module fifo (clk, - in_r, in_a, in_d, - out_r, out_a, out_d); - - input clk; - input in_r; - input out_a; - output in_a; - output out_r; - input [(`DATAWIDTH-1):0] in_d; - output [(`DATAWIDTH-1):0] out_d; - - wire [(`DATAWIDTH-1):0] d12; - wire [(`DATAWIDTH-1):0] d23; - wire [(`DATAWIDTH-1):0] d34; - - fifo4 s1(clk, in_r, in_a, in_d, r12, a12, d12); - fifo4 s2(clk, r12, a12, d12, r23, a23, d23); - fifo4 s3(clk, r23, a23, d23, r34, a34, d34); - fifo4 s4(clk, r34, a34, d34, out_r, out_a, out_d); - -endmodule == Test ================================================================= // expected output @@ -56,11 +30,10 @@ endmodule debug.in: [*] take, deliver; 9: sendto fifo.in; fifo.in: - take; - [100] deliver; + [100] take, deliver; fifo.out: - (99) take, sendto fifo.in; - (1) take, sendto debug.in; + [99] take, sendto fifo.in; + [1] take, sendto debug.in; diff --git a/ships/Halt.ship b/ships/Halt.ship index debe903..35b1eff 100644 --- a/ships/Halt.ship +++ b/ships/Halt.ship @@ -23,6 +23,10 @@ public void service() { == Test ============================================================================== #skip +#ship debug : Debug +#expect 0 +0: sendto debug.in; + == Contributors ========================================================= Adam Megacz diff --git a/ships/Lut3.ship b/ships/Lut3.ship index 40a1006..615e101 100644 --- a/ships/Lut3.ship +++ b/ships/Lut3.ship @@ -394,7 +394,7 @@ alu.out: [*] nop; (*) wait, take, sendto lut.inLut; (*) sendto alu.in; - kill; + kill*; // acks from debug ship trigger new truth tables debug.in: [*] take, deliver, notify alu.out; -- 1.7.10.4