From bd85537e2402d1d03d1ae01da2c7c19a2298d246 Mon Sep 17 00:00:00 2001 From: Caleb Date: Mon, 15 Jul 2024 16:03:10 -0400 Subject: [PATCH] modify tests --- .../compile-static-interface-repeat.expect | 26 +++++++++---------- .../compile-static-interface.expect | 8 +++--- .../interface-one-hot.expect | 26 +++++++++---------- .../compile-static/interface-and-cs.expect | 26 +++++++++---------- .../compile-static/separate-fsms.expect | 26 +++++++++---------- 5 files changed, 56 insertions(+), 56 deletions(-) diff --git a/tests/passes/compile-static-interface/compile-static-interface-repeat.expect b/tests/passes/compile-static-interface/compile-static-interface-repeat.expect index 200a9a43c2..1918762889 100644 --- a/tests/passes/compile-static-interface/compile-static-interface-repeat.expect +++ b/tests/passes/compile-static-interface/compile-static-interface-repeat.expect @@ -6,8 +6,8 @@ static<6> component do_add(left: 32, right: 32, @go go: 1, @clk clk: 1, @reset r r = std_reg(32); @generated fsm = std_reg(2); @generated fsm0 = std_reg(3); - @generated adder = std_add(3); - @generated adder0 = std_add(2); + @generated adder = std_add(2); + @generated adder0 = std_add(3); @generated ud = undef(1); @generated ud0 = undef(1); } @@ -19,11 +19,11 @@ static<6> component do_add(left: 32, right: 32, @go go: 1, @clk clk: 1, @reset r r.in = go & fsm.out == 2'd0 ? add.out; early_reset_a[go] = fsm.out == 2'd1 ? 1'd1; early_reset_static_seq[done] = ud.out; - adder0.left = fsm.out; - adder0.right = 2'd1; - fsm.in = fsm.out == 2'd0 & go ? adder0.out; + adder.left = fsm.out; + adder.right = 2'd1; + fsm.in = fsm.out == 2'd0 & go ? adder.out; fsm.write_en = fsm.out == 2'd0 & go ? 1'd1; - fsm.in = fsm.out != 2'd1 & fsm.out != 2'd0 ? adder0.out; + fsm.in = fsm.out != 2'd1 & fsm.out != 2'd0 ? adder.out; fsm.write_en = fsm.out != 2'd1 & fsm.out != 2'd0 ? 1'd1; fsm.in = fsm.out == 2'd1 & 1'b1 & fsm0.out == 3'd4 ? 2'd0; fsm.write_en = fsm.out == 2'd1 & 1'b1 & fsm0.out == 3'd4 ? 1'd1; @@ -34,9 +34,9 @@ static<6> component do_add(left: 32, right: 32, @go go: 1, @clk clk: 1, @reset r add.left = r.out; r.in = add.out; early_reset_a[done] = ud0.out; - adder.left = fsm0.out; - adder.right = 3'd1; - fsm0.in = fsm0.out != 3'd4 ? adder.out; + adder0.left = fsm0.out; + adder0.right = 3'd1; + fsm0.in = fsm0.out != 3'd4 ? adder0.out; fsm0.write_en = fsm0.out != 3'd4 ? 1'd1; fsm0.in = fsm0.out == 3'd4 ? 3'd0; fsm0.write_en = fsm0.out == 3'd4 ? 1'd1; @@ -46,11 +46,11 @@ static<6> component do_add(left: 32, right: 32, @go go: 1, @clk clk: 1, @reset r add.left = go & fsm.out == 2'd0 ? left; r.in = go & fsm.out == 2'd0 ? add.out; early_reset_a[go] = fsm.out == 2'd1 ? 1'd1; - adder0.left = fsm.out; - adder0.right = 2'd1; - fsm.in = fsm.out == 2'd0 & go ? adder0.out; + adder.left = fsm.out; + adder.right = 2'd1; + fsm.in = fsm.out == 2'd0 & go ? adder.out; fsm.write_en = fsm.out == 2'd0 & go ? 1'd1; - fsm.in = fsm.out != 2'd1 & fsm.out != 2'd0 ? adder0.out; + fsm.in = fsm.out != 2'd1 & fsm.out != 2'd0 ? adder.out; fsm.write_en = fsm.out != 2'd1 & fsm.out != 2'd0 ? 1'd1; fsm.in = fsm.out == 2'd1 & 1'b1 & fsm0.out == 3'd4 ? 2'd0; fsm.write_en = fsm.out == 2'd1 & 1'b1 & fsm0.out == 3'd4 ? 1'd1; diff --git a/tests/passes/compile-static-interface/compile-static-interface.expect b/tests/passes/compile-static-interface/compile-static-interface.expect index aab9079183..79a4656621 100644 --- a/tests/passes/compile-static-interface/compile-static-interface.expect +++ b/tests/passes/compile-static-interface/compile-static-interface.expect @@ -23,8 +23,8 @@ static<2> component do_add(left: 32, right: 32, @go go: 1, @clk clk: 1, @reset r adder.right = 2'd1; fsm.in = fsm.out == 2'd0 & go ? adder.out; fsm.write_en = fsm.out == 2'd0 & go ? 1'd1; - fsm.in = fsm.out != 2'd1 & fsm.out != 2'd0 ? adder.out; - fsm.write_en = fsm.out != 2'd1 & fsm.out != 2'd0 ? 1'd1; + fsm.in = fsm.out != 2'd0 & fsm.out != 2'd1 ? adder.out; + fsm.write_en = fsm.out != 2'd0 & fsm.out != 2'd1 ? 1'd1; fsm.in = fsm.out == 2'd1 ? 2'd0; fsm.write_en = fsm.out == 2'd1 ? 1'd1; } @@ -40,8 +40,8 @@ static<2> component do_add(left: 32, right: 32, @go go: 1, @clk clk: 1, @reset r adder.right = 2'd1; fsm.in = fsm.out == 2'd0 & go ? adder.out; fsm.write_en = fsm.out == 2'd0 & go ? 1'd1; - fsm.in = fsm.out != 2'd1 & fsm.out != 2'd0 ? adder.out; - fsm.write_en = fsm.out != 2'd1 & fsm.out != 2'd0 ? 1'd1; + fsm.in = fsm.out != 2'd0 & fsm.out != 2'd1 ? adder.out; + fsm.write_en = fsm.out != 2'd0 & fsm.out != 2'd1 ? 1'd1; fsm.in = fsm.out == 2'd1 ? 2'd0; fsm.write_en = fsm.out == 2'd1 ? 1'd1; } diff --git a/tests/passes/compile-static-interface/interface-one-hot.expect b/tests/passes/compile-static-interface/interface-one-hot.expect index 3d117105c7..6e65f4d66e 100644 --- a/tests/passes/compile-static-interface/interface-one-hot.expect +++ b/tests/passes/compile-static-interface/interface-one-hot.expect @@ -6,8 +6,8 @@ static<6> component do_add<"promoted"=1>(left: 32, right: 32, @go go: 1, @clk cl r = std_reg(32); @generated fsm = std_reg(2); @generated fsm0 = std_reg(3); - @generated adder = std_add(3); - @generated adder0 = std_add(2); + @generated adder = std_add(2); + @generated adder0 = std_add(3); @generated ud = undef(1); @generated ud0 = undef(1); @generated sig_reg = std_reg(1); @@ -20,11 +20,11 @@ static<6> component do_add<"promoted"=1>(left: 32, right: 32, @go go: 1, @clk cl r.in = go & fsm.out == 2'd0 ? add.out; early_reset_a[go] = fsm.out == 2'd1 ? 1'd1; early_reset_static_seq[done] = ud.out; - adder0.left = fsm.out; - adder0.right = 2'd1; - fsm.in = fsm.out == 2'd0 & go ? adder0.out; + adder.left = fsm.out; + adder.right = 2'd1; + fsm.in = fsm.out == 2'd0 & go ? adder.out; fsm.write_en = fsm.out == 2'd0 & go ? 1'd1; - fsm.in = fsm.out != 2'd1 & fsm.out != 2'd0 ? adder0.out; + fsm.in = fsm.out != 2'd1 & fsm.out != 2'd0 ? adder.out; fsm.write_en = fsm.out != 2'd1 & fsm.out != 2'd0 ? 1'd1; fsm.in = fsm.out == 2'd1 & 1'b1 & fsm0.out == 3'd4 ? 2'd0; fsm.write_en = fsm.out == 2'd1 & 1'b1 & fsm0.out == 3'd4 ? 1'd1; @@ -35,9 +35,9 @@ static<6> component do_add<"promoted"=1>(left: 32, right: 32, @go go: 1, @clk cl add.left = r.out; r.in = add.out; early_reset_a[done] = ud0.out; - adder.left = fsm0.out; - adder.right = 3'd1; - fsm0.in = fsm0.out != 3'd4 ? adder.out; + adder0.left = fsm0.out; + adder0.right = 3'd1; + fsm0.in = fsm0.out != 3'd4 ? adder0.out; fsm0.write_en = fsm0.out != 3'd4 ? 1'd1; fsm0.in = fsm0.out == 3'd4 ? 3'd0; fsm0.write_en = fsm0.out == 3'd4 ? 1'd1; @@ -47,11 +47,11 @@ static<6> component do_add<"promoted"=1>(left: 32, right: 32, @go go: 1, @clk cl add.left = go & fsm.out == 2'd0 ? left; r.in = go & fsm.out == 2'd0 ? add.out; early_reset_a[go] = fsm.out == 2'd1 ? 1'd1; - adder0.left = fsm.out; - adder0.right = 2'd1; - fsm.in = fsm.out == 2'd0 & go ? adder0.out; + adder.left = fsm.out; + adder.right = 2'd1; + fsm.in = fsm.out == 2'd0 & go ? adder.out; fsm.write_en = fsm.out == 2'd0 & go ? 1'd1; - fsm.in = fsm.out != 2'd1 & fsm.out != 2'd0 ? adder0.out; + fsm.in = fsm.out != 2'd1 & fsm.out != 2'd0 ? adder.out; fsm.write_en = fsm.out != 2'd1 & fsm.out != 2'd0 ? 1'd1; fsm.in = fsm.out == 2'd1 & 1'b1 & fsm0.out == 3'd4 ? 2'd0; fsm.write_en = fsm.out == 2'd1 & 1'b1 & fsm0.out == 3'd4 ? 1'd1; diff --git a/tests/passes/compile-static/interface-and-cs.expect b/tests/passes/compile-static/interface-and-cs.expect index 200a9a43c2..1918762889 100644 --- a/tests/passes/compile-static/interface-and-cs.expect +++ b/tests/passes/compile-static/interface-and-cs.expect @@ -6,8 +6,8 @@ static<6> component do_add(left: 32, right: 32, @go go: 1, @clk clk: 1, @reset r r = std_reg(32); @generated fsm = std_reg(2); @generated fsm0 = std_reg(3); - @generated adder = std_add(3); - @generated adder0 = std_add(2); + @generated adder = std_add(2); + @generated adder0 = std_add(3); @generated ud = undef(1); @generated ud0 = undef(1); } @@ -19,11 +19,11 @@ static<6> component do_add(left: 32, right: 32, @go go: 1, @clk clk: 1, @reset r r.in = go & fsm.out == 2'd0 ? add.out; early_reset_a[go] = fsm.out == 2'd1 ? 1'd1; early_reset_static_seq[done] = ud.out; - adder0.left = fsm.out; - adder0.right = 2'd1; - fsm.in = fsm.out == 2'd0 & go ? adder0.out; + adder.left = fsm.out; + adder.right = 2'd1; + fsm.in = fsm.out == 2'd0 & go ? adder.out; fsm.write_en = fsm.out == 2'd0 & go ? 1'd1; - fsm.in = fsm.out != 2'd1 & fsm.out != 2'd0 ? adder0.out; + fsm.in = fsm.out != 2'd1 & fsm.out != 2'd0 ? adder.out; fsm.write_en = fsm.out != 2'd1 & fsm.out != 2'd0 ? 1'd1; fsm.in = fsm.out == 2'd1 & 1'b1 & fsm0.out == 3'd4 ? 2'd0; fsm.write_en = fsm.out == 2'd1 & 1'b1 & fsm0.out == 3'd4 ? 1'd1; @@ -34,9 +34,9 @@ static<6> component do_add(left: 32, right: 32, @go go: 1, @clk clk: 1, @reset r add.left = r.out; r.in = add.out; early_reset_a[done] = ud0.out; - adder.left = fsm0.out; - adder.right = 3'd1; - fsm0.in = fsm0.out != 3'd4 ? adder.out; + adder0.left = fsm0.out; + adder0.right = 3'd1; + fsm0.in = fsm0.out != 3'd4 ? adder0.out; fsm0.write_en = fsm0.out != 3'd4 ? 1'd1; fsm0.in = fsm0.out == 3'd4 ? 3'd0; fsm0.write_en = fsm0.out == 3'd4 ? 1'd1; @@ -46,11 +46,11 @@ static<6> component do_add(left: 32, right: 32, @go go: 1, @clk clk: 1, @reset r add.left = go & fsm.out == 2'd0 ? left; r.in = go & fsm.out == 2'd0 ? add.out; early_reset_a[go] = fsm.out == 2'd1 ? 1'd1; - adder0.left = fsm.out; - adder0.right = 2'd1; - fsm.in = fsm.out == 2'd0 & go ? adder0.out; + adder.left = fsm.out; + adder.right = 2'd1; + fsm.in = fsm.out == 2'd0 & go ? adder.out; fsm.write_en = fsm.out == 2'd0 & go ? 1'd1; - fsm.in = fsm.out != 2'd1 & fsm.out != 2'd0 ? adder0.out; + fsm.in = fsm.out != 2'd1 & fsm.out != 2'd0 ? adder.out; fsm.write_en = fsm.out != 2'd1 & fsm.out != 2'd0 ? 1'd1; fsm.in = fsm.out == 2'd1 & 1'b1 & fsm0.out == 3'd4 ? 2'd0; fsm.write_en = fsm.out == 2'd1 & 1'b1 & fsm0.out == 3'd4 ? 1'd1; diff --git a/tests/passes/compile-static/separate-fsms.expect b/tests/passes/compile-static/separate-fsms.expect index a65221040c..58d8380047 100644 --- a/tests/passes/compile-static/separate-fsms.expect +++ b/tests/passes/compile-static/separate-fsms.expect @@ -9,9 +9,9 @@ component main(@go go: 1, @clk clk: 1, @reset reset: 1) -> (@done done: 1) { d = std_reg(2); @generated fsm = std_reg(2); @generated fsm0 = std_reg(3); - @generated adder = std_add(3); + @generated adder = std_add(2); @generated adder0 = std_add(3); - @generated adder1 = std_add(2); + @generated adder1 = std_add(3); @generated ud = undef(1); @generated ud0 = undef(1); @generated ud1 = undef(1); @@ -26,22 +26,22 @@ component main(@go go: 1, @clk clk: 1, @reset reset: 1) -> (@done done: 1) { early_reset_A[go] = fsm.out == 2'd0 ? 1'd1; early_reset_D[go] = fsm.out == 2'd1 ? 1'd1; early_reset_run_A_and_D[done] = ud.out; - adder1.left = fsm.out; - adder1.right = 2'd1; - fsm.in = fsm.out == 2'd0 & 1'b1 & fsm0.out == 3'd3 ? adder1.out; - fsm.write_en = fsm.out == 2'd0 & 1'b1 & fsm0.out == 3'd3 ? 1'd1; - fsm.in = !(fsm.out == 2'd0 | fsm.out == 2'd1) ? adder1.out; + adder.left = fsm.out; + adder.right = 2'd1; + fsm.in = !(fsm.out == 2'd0 | fsm.out == 2'd1) ? adder.out; fsm.write_en = !(fsm.out == 2'd0 | fsm.out == 2'd1) ? 1'd1; fsm.in = fsm.out == 2'd1 & 1'b1 & fsm0.out == 3'd1 ? 2'd0; fsm.write_en = fsm.out == 2'd1 & 1'b1 & fsm0.out == 3'd1 ? 1'd1; + fsm.in = fsm.out == 2'd0 & 1'b1 & fsm0.out == 3'd3 ? adder.out; + fsm.write_en = fsm.out == 2'd0 & 1'b1 & fsm0.out == 3'd3 ? 1'd1; } group early_reset_A { a.in = 2'd0; a.write_en = 1'd1; early_reset_A[done] = ud0.out; - adder.left = fsm0.out; - adder.right = 3'd1; - fsm0.in = fsm0.out != 3'd3 ? adder.out; + adder0.left = fsm0.out; + adder0.right = 3'd1; + fsm0.in = fsm0.out != 3'd3 ? adder0.out; fsm0.write_en = fsm0.out != 3'd3 ? 1'd1; fsm0.in = fsm0.out == 3'd3 ? 3'd0; fsm0.write_en = fsm0.out == 3'd3 ? 1'd1; @@ -50,9 +50,9 @@ component main(@go go: 1, @clk clk: 1, @reset reset: 1) -> (@done done: 1) { d.in = 2'd0; d.write_en = 1'd1; early_reset_D[done] = ud1.out; - adder0.left = fsm0.out; - adder0.right = 3'd1; - fsm0.in = fsm0.out != 3'd1 ? adder0.out; + adder1.left = fsm0.out; + adder1.right = 3'd1; + fsm0.in = fsm0.out != 3'd1 ? adder1.out; fsm0.write_en = fsm0.out != 3'd1 ? 1'd1; fsm0.in = fsm0.out == 3'd1 ? 3'd0; fsm0.write_en = fsm0.out == 3'd1 ? 1'd1;