Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Assist to connect ports for a module instance #93

Open
lf- opened this issue Nov 14, 2021 · 1 comment
Open

Feature request: Assist to connect ports for a module instance #93

lf- opened this issue Nov 14, 2021 · 1 comment

Comments

@lf-
Copy link

lf- commented Nov 14, 2021

Hi! I love svls and it's been invaluable for working in sv for class. I have some dubious quality vim macros that I'd like to replace with something more robust and easier to use for the use case of instantiating a module and creating all the signals for its ports, and I feel that svls might be the right spot to do it.

I'd like to be able to take this situation:

a.sv

module a(input x);
endmodule

b.sv

module b();
  a my_a(); // invoke code action here: connect ports
endmodule

and automatically generate this result:

b.sv`

module b();
  logic x;
  a my_a(.x);
endmodule
@DaveMcEwan
Copy link
Contributor

@lf- I'm not sure this is the correct project for what you're asking.
svls is essentially a wrapper around svlint (to give LSP functionality).
svlint (and therefore svls) performs checks on the syntax tree, so the concept of "another module's ports" just doesn't exist at this level.
There are some other projects (e.g. svinst, svdata) which approach these concepts, but it's a bit more complex that it first appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants