vscode-verilog-hdl-support icon indicating copy to clipboard operation
vscode-verilog-hdl-support copied to clipboard

Future plans of development

Open Raamakrishnan opened this issue 6 years ago • 28 comments

We are at the verge of reaching 50,000 downloads in the marketplace. From this point, I feel it is good to have a structured development plan. The following are a few ideas that I have.

1. Support for more linters

  • Verilator
  • VCS
  • NCsim

2. Merging System Verilog extensions

  • Verilog and System Verilog are very closely related languages. The tools/linters used by Verilog can be used by System Verilog also, at the maximum by turning on a command line switch.
  • Some good features like "Hover over declarations" have been added to mshr-h/vscode-systemverilog-support that this extension can benefit from.
  • "Go To Symbol" like features can be found in eirikpre/VSCode-SystemVerilog

Since there is very little work being done in bringing HDL support to VS code, it is better to pool our resources and knowledge. What do you guys say?

(Update 2018-07-07)

Todo

System Verilog

  • [x] a new branch "sv" in mshr-h/verilog
  • [x] migrate syntax highlighting from mshr-h/sv
  • [x] migrate snippets
  • [ ] ~~migrate "Hover variable declaration"~~ (not migrating, creating new)
  • [x] Parse Symbols using Ctags
  • [x] Document Outline
  • [x] Hover variable declaration
  • [x] Definition Provider
  • [x] Intellisense
  • [x] migrate "Module instantiation"
  • [ ] migrate "Auto alignment"
  • [ ] migrate other features
  • [x] Update iverilog linter to support SV
  • [x] Update xvlog linter to support SV
  • [x] Update modelsim linter to support SV
  • [x] Update Readme, Changelog and other documentation
  • [x] Merge to master and release
  • [ ] Deprecate mshr-h/sv

Linters

  • [x] Verilator
  • [ ] VCS
  • [ ] NCsim

Readme

  • [x] Remove the list of snippets from Readme
  • [x] Table of settings with description and options
  • [x] Mention this issue in the Instructions for Contributors
  • [x] Section for Contributors and prior work

Raamakrishnan avatar Jun 30 '18 08:06 Raamakrishnan

Thank you for your great ideas. Both will make HDL support on VSCode much richer. I think 2 is much important. I guess bringing features in mshr-h/vscode-systemverilog-support into this extension is a good way.

Step to merge these extension

  1. Support syntax highlighting for .sv .SV files
  2. Bring features in mshr-h/vscode-systemverilog-support to this extension
  3. Deprecate mshr-h/vscode-systemverilog-support

Any ideas or comments?

mshr-h avatar Jul 01 '18 05:07 mshr-h

I think it would be wise to create a new branch for System Verilog and merge the new features into it. Once everything is done, it can be merged in to master and released. While new features are being ported, any other bugs/features can be added to master and released. I will create a checklist in my original post with all the things that needs to be done for this merging.

Maybe after we are finished with this, we would look into eirikpre/VSCode-SystemVerilog

3. Reorganise README

  • I think it is not necessary to mention all the snippets provided.
  • All the settings provided by the extension need to be tabulated properly.
  • People willing to contribute should be asked to look at this issue page and plan accordingly.
  • A section to mention the contributors and the resources on which this extension is based on (like previous sublime text language syntaxes, extensions etc.)

Raamakrishnan avatar Jul 01 '18 15:07 Raamakrishnan

Ok. Sounds pretty good.

mshr-h avatar Jul 06 '18 09:07 mshr-h

I have updated my original comment with a Todo list. Will start working on it soon. We will need the help of @HansLehnert also

Raamakrishnan avatar Jul 06 '18 18:07 Raamakrishnan

Sure. Also as a future feature, it could be useful to use the "Views" feature of vscode to show the hierarchical organization of the modules.

HansLehnert avatar Jul 06 '18 20:07 HansLehnert

@HansLehnert eirikpre/VSCode-SystemVerilog has Symbol indexing which we can use to implement this if eirikpre agrees to merge with us

Raamakrishnan avatar Jul 07 '18 14:07 Raamakrishnan

@mshr-h I am done with syntax highlighting and snippets. Can you create a new branch for sv so that I can give a pull request against it?

Raamakrishnan avatar Jul 07 '18 17:07 Raamakrishnan

Thanks. I’ll do it within a few days.

mshr-h avatar Jul 08 '18 03:07 mshr-h

@Raamakrishnan Just created branch. https://github.com/mshr-h/vscode-verilog-hdl-support/tree/sv

mshr-h avatar Jul 09 '18 01:07 mshr-h

I just finished porting "Hover" and started "Definition Provider" when I noticed most of the logic used is duplicated. Moreover, it just parses the document for the variable name without any regard for module or package. It works, but it is a crude implementation.

I feel like we should follow eirikpre/VSCode-SystemVerilog and build a symbol tree properly so that we can implement the other features like Hover and Definition Provider easily with that.

Would you like me to get in touch with eirikpre?

Raamakrishnan avatar Jul 14 '18 12:07 Raamakrishnan

@Raamakrishnan Yes, thanks.

mshr-h avatar Jul 16 '18 03:07 mshr-h

Its been 2 weeks since I emailed eirikpre. There has been no response so far. Meanwhile, I started working on a symbol provider from scratch. Some more work is yet to be done, but it has been good so far. Check it out at "sv-sym" branch of my fork of this repo (https://github.com/Raamakrishnan/vscode-verilog-hdl-support/tree/sv-sym).

It needs VS Code 1.25 to work because it uses the new outline tree view

screenshot 21 (you can see the symbols on the bottom left in the Outline View)

Raamakrishnan avatar Jul 31 '18 16:07 Raamakrishnan

Eirik replied saying he is not interested in joining us.

Regarding the symbol provider that I was working on, it is becoming unstable and very slow on real life verilog code. It is not possible to include all the possible ways to write something in verilog in a few regexes.

So, I feel the better way to proceed is to use the ctags file with the help of universal-ctags, parse the output and show it as symbols. Just like how the Python extension for VS code does it. What do you think about this?

Raamakrishnan avatar Aug 04 '18 12:08 Raamakrishnan

@Raamakrishnan I understand the problem. The solution you are thinking sounds good to me if it supports Windows.

mshr-h avatar Aug 15 '18 11:08 mshr-h

@mshr-h Yes it will work on Windows also. I will start working on it soon.

Raamakrishnan avatar Aug 20 '18 08:08 Raamakrishnan

A must have feature(s) is the capabilities of verilog-mode to Emacs. auto-inst and auto wire connections

aviadb avatar Sep 03 '18 15:09 aviadb

i just put a pull request in with verilator support.

terriblefire avatar Sep 19 '18 19:09 terriblefire

I have updated my original Todo list.

  • Added new items for the Symbols parser using Ctags, hover provider, document outline and definition provider
  • Removed the original migration plan for Hover provider. It is now implemented by the new symbol parser
  • I think Intellisense can also be implemented with these symbols. Have to check them.

Raamakrishnan avatar Oct 07 '18 07:10 Raamakrishnan

Is it worth considering having a comment tag at the start of the file to let you choose a different verilog linter? The reason I ask is because i find verilator the best for logic files but it doesnt do a great job of testbench files. I would be inclined to prefer iverilog for that.

Just an idea either way

terriblefire avatar Oct 07 '18 07:10 terriblefire

I understand your usage but I am not sure if many people use it this way. We will keep this in record and maybe some day we will implement it.

Raamakrishnan avatar Oct 07 '18 11:10 Raamakrishnan

A new extension for SystemVerilog with full support for AutoComplete, Symbols providers, definition provider and much more, all using ANTLR4 has been released recently Rockdoor/systemverilog.

I had tried using ANTLR4 before, but never got it to work with typescript. Rather, my knowledge with typescript is less. But that work looks solid. I hope we can get him to work with us.

Raamakrishnan avatar Oct 08 '18 08:10 Raamakrishnan

Thanks! Sounds good.

mshr-h avatar Oct 10 '18 00:10 mshr-h

With that last PR for linting, I think everything is done. The "Auto alignment" seems very buggy for me. I will get to that later. As for the linters, those are commercial ones. So, if anyone is able to get their hands on them, maybe we can work on adding support for them. If everyone is fine, @mshr-h can rebase it on master. Then I can add the Readme and Changelog.

Also, now might be a good time for you guys to try out these new features!

Raamakrishnan avatar Nov 02 '18 18:11 Raamakrishnan

Thanks. I'll check it this weekend.

mshr-h avatar Nov 07 '18 14:11 mshr-h

I've just mergen 'sv' to 'master'. Thank you all for your support! It will be the first our major release of v1.0.0.

mshr-h avatar Nov 16 '18 00:11 mshr-h

That would be great to add some refacting feature like changing port of module and changing it else where and reanaming !

alimoezzi avatar Jul 04 '19 16:07 alimoezzi

If possible to add Verilog-AMS support with .vams?

nijawang avatar Jan 20 '21 02:01 nijawang

Can we add custom syntax highlighting for uvm_info, uvm_error, uvm_warning, etc.?

DVCoder avatar Aug 04 '21 18:08 DVCoder