eirikpre / VSCode-SystemVerilog

SystemVerilog support in VS Code
MIT License
126 stars 50 forks source link

Go to definition doesn't work for "spi" module name #227

Open hi0t opened 4 months ago

hi0t commented 4 months ago

OS: Ubuntu 22.04 (WSL) Vscode: 1.89.1 SystemVerilog: 0.13.9

  1. Create an empty project with two modules:
    
    module top (
    input clk
    );

spi spi(clk);

endmodule


```systemverilog
module spi(
    input clk
);

endmodule
  1. Click the index button
  2. Try to go to the spi module from the top module and nothing happens.

If you rename the spi module, for example, to xyz, then "Go to definition" starts to work. What is this magical name "spi"?

calint commented 3 months ago

The problem seems to be when the module instance has same name as the module. Having the same issue.