Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmy Vogel committed Nov 8, 2018
1 parent 7ccdfac commit 3a52923
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SublimeLinter-contrib-modelsim
This linter plugin for [SublimeLinter](https://github.com/SublimeLinter/SublimeLinter) provides an interface to `vcom`/`vlog` - VHDL/Verilog/SystemVerilog compilers provided with [ModelSim](https://www.mentor.com/products/fv/modelsim/) and QuestaSim which provide a linting mode. `vcom` will be used with "VHDL" files , `vlog` with "Verilog" and "SystemVerilog" files.

## Installation

SublimeLinter must be installed in order to use this plugin.

Please use [Package Control](https://packagecontrol.io) to install the linter plugin.
Expand All @@ -13,33 +14,42 @@ Before installing this plugin, you must ensure that `vcom`/`vlog` are installed
In order for `vcom`/`vlog` to be executed by SublimeLinter, you must ensure that its path is available to SublimeLinter. The docs cover [troubleshooting PATH configuration](http://sublimelinter.readthedocs.io/en/latest/troubleshooting.html#finding-a-linter-executable).

## Settings

- SublimeLinter settings: http://sublimelinter.readthedocs.org/en/latest/settings.html
- Linter settings: http://sublimelinter.readthedocs.org/en/latest/linter_settings.html

## Passing arguments to `vcom`/`vlog`

## Passing arguments to vcom/vlog
Arguments can be passed in a [linter settings](http://www.sublimelinter.com/en/stable/linter_settings.html#args) file or set in a [project settings](http://www.sublimelinter.com/en/stable/settings.html#project-settings) file:

<ol>
<li>Using linter settings file:

```javascript
// SublimeLinter Settings - User
{
"linters": {
"vcom": {
"args": ["-check_synthesis", "-2002"],
"working_dir": "$project_path/../sim",
},
"linters": {
"vcom": {
"args": ["-2008", "-lint", "-check_synthesis"],
"working_dir": "$project_path/../sim"
},
"vlog": {
"args": ["-sv", "-lint", "-check_synthesis"],
"working_dir": "$project_path/../sim"
}
}
}
```
</li>
<li>Alternately, project specific arguments can be set in a project file:

```javascript
"settings":
{
// SublimeLinter-contrib-vcom
"SublimeLinter.linters.vcom.args": ["-check_synthesis", "-2002"],
"SublimeLinter.linters.vcom.working_dir": "$project_path/../sim",
"settings": {
// SublimeLinter-contrib-modelsim
"SublimeLinter.linters.vcom.args": ["-2008", "-lint", "-check_synthesis"],
"SublimeLinter.linters.vcom.working_dir": "$project_path/../sim",
"SublimeLinter.linters.vlog.args": ["-sv", "-lint", "-check_synthesis"],
"SublimeLinter.linters.vlog.working_dir": "$project_path/../sim"
},
```
</li>
Expand All @@ -48,10 +58,10 @@ Arguments can be passed in a [linter settings](http://www.sublimelinter.com/en/s

## Demo

`vcom` for vhdl file:
`vcom` for VHDL file:

![vcom_lint_example](https://user-images.githubusercontent.com/41512424/43842022-1b0f35ac-9b2d-11e8-981b-67d98e905fa3.png)

`vlog` for verilog file:
`vlog` for Verilog file:

![vlog_lint_example](https://user-images.githubusercontent.com/41512424/43842998-3000ae58-9b2f-11e8-8dff-4023410403c4.png)

0 comments on commit 3a52923

Please sign in to comment.