ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Sublime​Linter-contrib-verilator

by poucotm ST3

👌 This linter plugin for SublimeLinter provides an interface to Verilator (Verilog Simulator)

Details

Installs

  • Total 88
  • Win 44
  • OS X 24
  • Linux 20
Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28
Windows 1 0 0 0 0 0 0 1 0 0 0 2 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0
OS X 1 0 0 0 0 0 0 0 0 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 1 0 0 0 1 0 0 0
Linux 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

Readme

Source
raw.​githubusercontent.​com

SublimeLinter-contrib-verilator

Package Control Build Status PayPal

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 3 installation - Guide from here
  • Verilator installation - Guide from here
  • Modified version of Verilator - Get from https://github.com/poucotm/verilator
  • 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
  • -Wno-IGNMOD : Ignores module instances
  • -Wno-IGNUNUSED : Ignore unused singnal warning connected to externally defined module instance

Screenshot

Image

Settings

In order to set arguments of Verilator or control lint message, Use SublimeLinter's user settings like the following.

"verilator": {
          "@disable": false,
          "args": [
              "--error-limit",
              "500",
              "--default-language",
              "1800-2012",
              "--bbox-sys",
              "--bbox-unsup",
              "-Wall",
              "-Wno-DECLFILENAME",
              "-Wno-IGNINC",
              "-Wno-IGNMOD",
              "-Wno-IGNDEF",
              "-Wno-IGNUNUSED",
              "-Wno-WIDTH",
              "-Wno-CASEX",
              "-Wno-STMTDLY"
          ],
          "excludes": [],
          "extension": [
              ".v"
          ],
          "ignore_match": [
              "Unsupported:",
              "\\[IGNDEF\\]"
          ]
      }

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 ignore_match 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

Doate Image
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