Today a new BETA of the SystemVerilog plugin was released. This release dramatically improves how soon code is matched to SystemVerilog rules and includes a complete rewrite of the assertion rules. The most noticeable effect will be better error messages, but it also helps with indentation and formatting (which all uses the underlying rules). These improvements are needed to support keyword code-completion. Unfortunately, keyword code completion requires more time before it's ready for early release.
Better macro view
The most visible addition in this release is that expanded macro code is now formatted and highlighted when you hover over a macro:
The goal is to include any error messages in the expanded code area, but to do that requires a rewrite of the pre-compiler engine (see below).
Formatting continues to improve. With this release, the formatter no longer break defines by inserting a space between the name and the
Formatting is now stricter about spaces between operators and parenthesis sign and now knows how to format enums.
Finally, data declarations do not get aligned across blocks. Alignment is a work in progress. Currently, too many items get aligned which works well for a specific coding style but not across some examples. I'm also not a massive fan of aligning objects as I don't think it aides in reading code (though it looks pretty impressive). So for the next couple of releases alignment will be toned down and later re-enabled as an option.
I'm sure you have opinions of what should be aligned and formatting in general. Please let me know your thoughts and where the plugin falls short.
- Fixed “Move variable declaration to before statement” quick-fix corner case: It will now correctly move data declarations to before macro statements as needed.
- Resolve of enums inside constraints now works
- String concatenation used as arguments to macros now works.
- Structure view [CTRL-7] no longer prints
nullor empty messages for objects inserted by macros. In a future update, it will correctly list these items.
Here is what's being worked on at the moment:
Work is progressing on keyword code-completion. Now keyword code completion might sound like an easy thing - present a list of keywords and be done with it. IntelliJ's intent with code-completion is to only present valid options. So if code-completion is not offering a particular choice, then this option is (probably) not correct. Enabling code-completion like this takes a more effort but also provides more value.
Currently, first-pass code-completion works for
modules, which, with generate blocks and other logic is a surprisingly large part of the specification. Code completion will be enabled when it works for sequential code (i.e.,
tasks, etc.) and
The pre-compiler needs to be updated. The current implementation is slow and made some incorrect assumptions on how IntelliJ works. This sluggish performance is an issue when editing large UVM files with lots of macros.
A new implementation has been defined and will implementation is starting.