SublimeLinter-contrib-verilator
👌 This linter plugin for SublimeLinter provides an interface to Verilator (Verilog Simulator)
Details
Installs
- Total 3K
- Win 2K
- Mac 303
- Linux 620
Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 1 | 3 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 1 | 1 | 4 | 1 | 3 | 1 | 1 | 4 | 1 | 2 | 0 | 2 | 2 | 2 | 1 | 2 | 2 | 2 | 2 | 2 | 3 | 2 | 0 | 1 | 0 | 0 | 0 | 4 | 1 | 0 | 0 | 2 | 0 | 4 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 0 | 1 | 1 |
Readme
- Source
- raw.githubusercontent.com
SublimeLinter-contrib-verilator
This linter plugin for SublimeLinter provides an interface to Verilator. Verilator is a open source HDL simulator and can be used as a linter with –lint-only option. For more information, you can see here, https://www.veripool.org/wiki/verilator Verilator is fast and easy to use to link with Sublime Text Editor on variable OS before runnning commercial simulaton and synthesis tools.
Prerequisite
- SublimeLinter 4 installation - Guide from here
- Verilator installation - Guide from here
- Modified version of Verilator - Get source from https://github.com/poucotm/verilator (update for verilator-4.016, v1.5.0) or download compiled version (32) for Windows (v1.5.0) or (64) for Windows (v1.5.0) with 3 MinGW libraries.
- Verilator PATH settings - SublimeLinter-contrib-verilator uses verilator_bin or verilator_bin.exe instead of verilator. You have to add PATH environment variable for verilator_bin or verilator_bin.exe
Verilator Original vs. Modified Version
Verilator originally simulates all entities having all include and module files. If you miss even a file, it will generate an error message and stop simulation or linting. It is not good to be used with a editor. People don't open all files to edit or it is tired to pass the file list to Verilator every time. In order to lint single file based, the original codes are modified. It can ignore include and externally defined module's instance and its port connection even if there's a real error in port connection. You can select one of them. If you want to use original version, you may have to put all files in the same directory. Because, Verilator basically searches missed files in the same directory.
Options for Modified Version
- -Wno-IGNINC : Ignores include files
- -Wno-IGNDEF : Ignores define which may have been defined outside
Lint based on multiple files (higher than v2.8.0)
Two options are added to support linting based on multiple files. If you set full paths, the original version of verilator can be used.
- “use_multiple_source”: true
- “search_project_path”: true
an example of settings in a sublime-project file:
"sources":
[
"D:\\project\\srcs",
"D:\\project\\working"
]
Screenshot
Settings
In order to set arguments of Verilator or control lint message, Use SublimeLinter's user settings like the following.
{
"no_column_highlights_line": true,
"linters":
{
"verilator": {
"lint_mode": "load_save",
"styles" : [
{
"types": ["warning"],
"mark_style": "squiggly_underline",
"icon": "Packages/SublimeLinter/gutter-themes/Default/cog.png"
},
{
"types": ["error"],
"mark_style": "fill",
"icon": "Packages/SublimeLinter/gutter-themes/Default/cog.png"
}
],
"args": [
"--error-limit",
"500",
"--default-language",
// "1800-2017", // systemverilog
"1364-2005", // verilog
"--bbox-sys",
"--bbox-unsup",
"-Wall",
"-Wno-WIDTH",
"-Wno-IGNINC",
"-Wno-IGNDEF",
"-Wno-STMTDLY",
"-Wno-UNDRIVEN",
"-Wno-PINCONNECTEMPTY",
"-Wno-INPUTPINEMPTY",
"-Wno-OUTPUTPINEMPTY"
],
"filter_errors": [
"Unsupported:",
"\\[IGNDEF\\]",
// "expects 8192 bits" // not to use -Wno-WIDTH
],
// to lint based on single file (ignoring external module definition)
// "use_multiple_source": false,
// "search_project_path": false,
// to lint based on multiple files (searching external sources - the same directory or project path)
// "use_multiple_source": true,
// "search_project_path": true,
// example) example.sublime-project
// "sources": [ "D:\\project\\srcs", "D:\\project\\working" ]
"use_multiple_source": false,
"search_project_path": false,
// windows subsystem for linux (wsl verilator_bin)
"use_wsl": false,
// additional option to filter file type
"extension": [
".v"
],
// additional option for better highlighting near
"message_near_map": [
["Case values", "case"],
["Suggest casez", "casex"]
]
}
}
}
Key Map
'F1' : SublimeLinter Show All Errors 'Shift+F1' : SublimeLinter Lint This View
Troubleshooting
Turn on SublimeLinter's Debug Mode and Open the console of Sublime Text. You can check the communication status from SublimeLinter to Verilator. You can also add your own filter_errors messages by using them.
SublimeLinter: verilator: shift_reg.v ['D:\\Program\\verilator-3.902\\verilator_bin.exe', '--lint-only', ...
SublimeLinter: verilator output:
%Warning-LITENDIAN: c:/users/shift_reg.v:14: Little bit endian vector: MSB < LSB of bit range: 0:7
%Warning-LITENDIAN: Use "/* verilator lint_off LITENDIAN */" and lint_on around source to disable this message.
%Error: Exiting due to 1 warning(s)
Donate
Thank you for donating. It is helpful to continue to improve the plug-in.
Credits
Thanks to SublimeLinter Team and Veripool Organization.
Issues
When you have an issue, tell me through https://github.com/poucotm/SublimeLinter-contrib-verilator/issues, or send me an e-mail poucotm@gmail.com