Skip to content

Commit

Permalink
rewrite exp tests
Browse files Browse the repository at this point in the history
  • Loading branch information
calebmkim committed Feb 1, 2024
1 parent db60b08 commit e01afb1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions tests/frontend/exp/degree-2-unsigned.expect
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ component exp(x: 32) -> (out: 32) {
pow2 = fp_pow();
}
wires {
group init<"static"=1> {
group init<"promotable"=1> {
exponent_value.write_en = 1'd1;
exponent_value.in = x;
init[done] = exponent_value.done;
Expand All @@ -41,7 +41,7 @@ component exp(x: 32) -> (out: 32) {
frac_x.in = and1.out;
split_bits[done] = (int_x.done & frac_x.done) ? 1'd1;
}
group consume_pow2<"static"=1> {
group consume_pow2<"promotable"=1> {
p2.write_en = 1'd1;
p2.in = pow2.out;
consume_pow2[done] = p2.done ? 1'd1;
Expand All @@ -54,14 +54,14 @@ component exp(x: 32) -> (out: 32) {
product2.in = mult_pipe2.out;
mult_by_reciprocal_factorial2[done] = product2.done;
}
group sum_round1_1<"static"=1> {
group sum_round1_1<"promotable"=1> {
add1.left = frac_x.out;
add1.right = product2.out;
sum1.write_en = 1'd1;
sum1.in = add1.out;
sum_round1_1[done] = sum1.done;
}
group add_degree_zero<"static"=1> {
group add_degree_zero<"promotable"=1> {
add1.left = sum1.out;
add1.right = one.out;
sum1.write_en = 1'd1;
Expand Down
16 changes: 8 additions & 8 deletions tests/frontend/exp/degree-4-signed.expect
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ component exp(x: 16) -> (out: 16) {
pow4 = fp_pow();
}
wires {
group init<"static"=1> {
group init<"promotable"=1> {
exponent_value.write_en = 1'd1;
exponent_value.in = x;
init[done] = exponent_value.done;
Expand Down Expand Up @@ -78,17 +78,17 @@ component exp(x: 16) -> (out: 16) {
m.in = div_pipe.out_quotient;
reciprocal[done] = m.done;
}
group consume_pow2<"static"=1> {
group consume_pow2<"promotable"=1> {
p2.write_en = 1'd1;
p2.in = pow2.out;
consume_pow2[done] = p2.done ? 1'd1;
}
group consume_pow3<"static"=1> {
group consume_pow3<"promotable"=1> {
p3.write_en = 1'd1;
p3.in = pow3.out;
consume_pow3[done] = p3.done ? 1'd1;
}
group consume_pow4<"static"=1> {
group consume_pow4<"promotable"=1> {
p4.write_en = 1'd1;
p4.in = pow4.out;
consume_pow4[done] = p4.done ? 1'd1;
Expand Down Expand Up @@ -117,28 +117,28 @@ component exp(x: 16) -> (out: 16) {
product4.in = mult_pipe4.out;
mult_by_reciprocal_factorial4[done] = product4.done;
}
group sum_round1_1<"static"=1> {
group sum_round1_1<"promotable"=1> {
add1.left = frac_x.out;
add1.right = product2.out;
sum1.write_en = 1'd1;
sum1.in = add1.out;
sum_round1_1[done] = sum1.done;
}
group sum_round1_2<"static"=1> {
group sum_round1_2<"promotable"=1> {
add2.left = product3.out;
add2.right = product4.out;
sum2.write_en = 1'd1;
sum2.in = add2.out;
sum_round1_2[done] = sum2.done;
}
group sum_round2_1<"static"=1> {
group sum_round2_1<"promotable"=1> {
add1.left = sum1.out;
add1.right = sum2.out;
sum1.write_en = 1'd1;
sum1.in = add1.out;
sum_round2_1[done] = sum1.done;
}
group add_degree_zero<"static"=1> {
group add_degree_zero<"promotable"=1> {
add1.left = sum1.out;
add1.right = one.out;
sum1.write_en = 1'd1;
Expand Down
16 changes: 8 additions & 8 deletions tests/frontend/exp/degree-4-unsigned.expect
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ component exp(x: 16) -> (out: 16) {
pow4 = fp_pow();
}
wires {
group init<"static"=1> {
group init<"promotable"=1> {
exponent_value.write_en = 1'd1;
exponent_value.in = x;
init[done] = exponent_value.done;
Expand All @@ -55,17 +55,17 @@ component exp(x: 16) -> (out: 16) {
frac_x.in = and1.out;
split_bits[done] = (int_x.done & frac_x.done) ? 1'd1;
}
group consume_pow2<"static"=1> {
group consume_pow2<"promotable"=1> {
p2.write_en = 1'd1;
p2.in = pow2.out;
consume_pow2[done] = p2.done ? 1'd1;
}
group consume_pow3<"static"=1> {
group consume_pow3<"promotable"=1> {
p3.write_en = 1'd1;
p3.in = pow3.out;
consume_pow3[done] = p3.done ? 1'd1;
}
group consume_pow4<"static"=1> {
group consume_pow4<"promotable"=1> {
p4.write_en = 1'd1;
p4.in = pow4.out;
consume_pow4[done] = p4.done ? 1'd1;
Expand Down Expand Up @@ -94,28 +94,28 @@ component exp(x: 16) -> (out: 16) {
product4.in = mult_pipe4.out;
mult_by_reciprocal_factorial4[done] = product4.done;
}
group sum_round1_1<"static"=1> {
group sum_round1_1<"promotable"=1> {
add1.left = frac_x.out;
add1.right = product2.out;
sum1.write_en = 1'd1;
sum1.in = add1.out;
sum_round1_1[done] = sum1.done;
}
group sum_round1_2<"static"=1> {
group sum_round1_2<"promotable"=1> {
add2.left = product3.out;
add2.right = product4.out;
sum2.write_en = 1'd1;
sum2.in = add2.out;
sum_round1_2[done] = sum2.done;
}
group sum_round2_1<"static"=1> {
group sum_round2_1<"promotable"=1> {
add1.left = sum1.out;
add1.right = sum2.out;
sum1.write_en = 1'd1;
sum1.in = add1.out;
sum_round2_1[done] = sum1.done;
}
group add_degree_zero<"static"=1> {
group add_degree_zero<"promotable"=1> {
add1.left = sum1.out;
add1.right = one.out;
sum1.write_en = 1'd1;
Expand Down

0 comments on commit e01afb1

Please sign in to comment.