Skip to content

Commit

Permalink
Remove pow function to avoid errors in Synopsys DC (esl-epfl#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
danivz authored Jul 19, 2024
1 parent 66c3084 commit e7ef790
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion hw/ip/pdm2pcm/rtl/fir.sv
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ module fir #(
genvar k;
generate
for (k = 0; k < TOTCOEFS; k = k + 1) begin : coeffs_mapping
assign coeffs[k] = freecoeffs[int'($floor($sqrt($pow((TOTCOEFS-1)/2.0-k, 2))))];
// Remove $pow function to avoid errors in Synopsys DC
// assign coeffs[k] = freecoeffs[int'($floor($sqrt($pow((TOTCOEFS-1)/2.0-k, 2))))];
assign coeffs[k] = freecoeffs[int'($floor($sqrt(((TOTCOEFS-1)/2.0-k)*((TOTCOEFS-1)/2.0-k))))];
end
endgenerate

Expand Down
6 changes: 5 additions & 1 deletion hw/ip/pdm2pcm/rtl/halfband.sv
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ module halfband #(
genvar k;
generate
for (k = 0; k < TOTCOEFS; k = k + 1) begin : coeffs_mapping
assign coeffs[k] = lessfreecoeffs[int'($floor($sqrt($pow((TOTCOEFS-1)/2.0-k, 2))))];
// Remove $pow function to avoid errors in Synopsys DC
// assign coeffs[k] = lessfreecoeffs[int'($floor($sqrt($pow((TOTCOEFS-1)/2.0-k, 2))))];
assign coeffs[k] = lessfreecoeffs[int'($floor(
$sqrt(((TOTCOEFS-1)/2.0-k)*((TOTCOEFS-1)/2.0-k))
))];
end
endgenerate

Expand Down

0 comments on commit e7ef790

Please sign in to comment.