Skip to content

Commit

Permalink
ad_dds_1.v: Fix concatenation width mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiGrozav committed Jul 18, 2018
1 parent 74a24c4 commit ad425de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/common/ad_dds_1.v
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ module ad_dds_1 #(
if (DDS_TYPE == DDS_CORDIC_TYPE) begin

// the cordic module input angle width must be equal with it's width
wire [CORDIC_DW-1:0] angle_s;
wire [CORDIC_DW:0] angle_s;

if (CORDIC_DW >= 16) begin
assign angle_s = {angle,zeros[CORDIC_DW-16:0]};
assign sine16_s = sine_s[CORDIC_DW-1:CORDIC_DW-16];
end else begin
assign angle_s = angle[15:16-CORDIC_DW];
assign angle_s = {angle[15:16-CORDIC_DW],1'b0};
assign sine16_s = {sine_s,zeros[15-CORDIC_DW:0]};
end

Expand All @@ -84,7 +84,7 @@ module ad_dds_1 #(
.DELAY_DW(1))
i_dds_sine (
.clk (clk),
.angle (angle_s),
.angle (angle_s[CORDIC_DW:1]),
.sine (sine_s),
.ddata_in (1'b0),
.ddata_out ());
Expand Down

0 comments on commit ad425de

Please sign in to comment.