vscode-terosHDL icon indicating copy to clipboard operation
vscode-terosHDL copied to clipboard

Can't find definitions for localparam, but it can for parameter

Open MasterJubei opened this issue 2 years ago • 1 comments

Hello, great project

One small bug I found is that it cannot find the definitions of localparam variables

image

But if I set it to parameter, it will work

image

MasterJubei avatar Jun 28 '22 18:06 MasterJubei

Thanks for the report. I will take a look

qarlosalberto avatar Jun 28 '22 21:06 qarlosalberto

could you provide a code example?

qarlosalberto avatar Jun 29 '23 18:06 qarlosalberto

Hey not sure, but it looks like it has been fixed(or I can't reproduce it). Both localparam and parameter both show the definition now.

module localparam_test();

    localparam NUM_BITS = 3;
    // parameter NUM_BITS = 3;
    
    integer i = 0;
    initial begin
        for(i = 0; i < NUM_BITS; i = i+ 1) begin
            $display("i = %d", i);
        end
    end
endmodule

MasterJubei avatar Jul 01 '23 19:07 MasterJubei