dds: zero scale fix

main
Rejeesh Kutty 2014-05-21 11:54:49 -04:00
parent 1d53d79e25
commit 0cd43e34f5
1 changed files with 3 additions and 1 deletions

View File

@ -117,7 +117,9 @@ module ad_dds_1 (
sine_scale_p <= sine_scale_p_s; sine_scale_p <= sine_scale_p_s;
sine_scale_n <= sine_scale_n_s; sine_scale_n <= sine_scale_n_s;
sine_scale_sign <= sine_scale_sign_s; sine_scale_sign <= sine_scale_sign_s;
if (sine_scale_sign == 1'b1) begin if (scale[14:0] == 15'd0) begin
dds_data <= 16'd0;
end else if (sine_scale_sign == 1'b1) begin
dds_data <= {1'b1, sine_scale_n}; dds_data <= {1'b1, sine_scale_n};
end else begin end else begin
dds_data <= {1'b0, sine_scale_p}; dds_data <= {1'b0, sine_scale_p};