Skip to content

Index 2 out of range [1:0] out_sin_buf_taylor #1

@bonnom

Description

@bonnom

I like the code!

Is there a mistake at the lines '214' and '275' of dds.sv?

always_ff @(posedge clk) begin
       integer k;
       for (k = 0; k < TAYLOR_OUT_PIPELINE_STAGES; k = k + 1) begin

Shouldn't it be:

always_ff @(posedge clk) begin
integer k;
       for (k = 0; k < TAYLOR_OUT_PIPELINE_STAGES-1; k = k + 1) begin 

Otherwise it doesn't make sense with:

reg signed [OUT_DW - 1 : 0] out_sin_buf_taylor[TAYLOR_PIPELINE_STAGES - 2 : 0];
reg signed [OUT_DW - 1 : 0] out_cos_buf_taylor[TAYLOR_PIPELINE_STAGES - 2 : 0]; 

Since otherwise the index goes out of range!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions