Feature request: Assist to connect ports for a module instance
lf- opened this issue · 1 comments
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
@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.