]> git.madduck.net Git - etc/vim.git/blob - doc/ale-verilog.txt

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / doc / ale-verilog.txt
1 ===============================================================================
2 ALE Verilog/SystemVerilog Integration                     *ale-verilog-options*
3
4
5 ===============================================================================
6 ALE can use seven different linters for Verilog HDL:
7
8   HDL Checker
9     Using `hdl_checker --lsp`
10
11   iverilog:
12     Using `iverilog -t null -Wall`
13
14   slang:
15     Using `slang -Weverything`
16
17   verilator
18     Using `verilator --lint-only -Wall`
19
20   ModelSim/Questa
21     Using `vlog -quiet -lint`
22
23   Vivado
24     Using `xvlog`
25
26   Yosys
27     Using `yosys -Q -T -p 'read_verilog'`
28
29 By default, both 'verilog' and 'systemverilog' filetypes are checked.
30
31 You can limit 'systemverilog' files to be checked using only 'verilator' by
32 defining 'g:ale_linters' variable: >
33
34     au FileType systemverilog
35     \ let g:ale_linters = {'systemverilog' : ['verilator'],}
36 <
37
38 ===============================================================================
39 General notes
40
41 Linters/compilers that utilize a "work" directory for analyzing designs- such
42 as ModelSim and Vivado- can be passed the location of these directories as
43 part of their respective option strings listed below. This is useful for
44 holistic analysis of a file (e.g. a design with components, packages, or other
45 code defined external to the current file as part of a larger project) or
46 when wanting to simply pass an alternative location for the auto-generated
47 work directories (such as '/tmp') so as to not muddle the current directory.
48 Since these type of linters often use this work directory for holding compiled
49 design data as part of a single build process, they sometimes cannot handle
50 the frequent, asynchronous application launches when linting while text is
51 changing. This can happen in the form of hangs or crashes. To help prevent
52 this when using these linters, it may help to run linting less frequently; for
53 example, only when a file is saved.
54
55 HDL Checker is an alternative for some of the issues described above. It wraps
56 around ghdl, Vivado and ModelSim/Questa and, when using the latter, it can
57 handle mixed language (VHDL, Verilog, SystemVerilog) designs.
58
59 ===============================================================================
60 hdl-checker                                           *ale-verilog-hdl-checker*
61
62 See |ale-vhdl-hdl-checker|
63
64
65 ===============================================================================
66 iverilog                                                 *ale-verilog-iverilog*
67
68   No additional options
69
70 ===============================================================================
71 slang                                                       *ale-verilog-slang*
72
73                                              *ale-options.verilog_slang_option*
74                                                    *g:ale_verilog_slang_option*
75                                                   *b:ale_verilog_slang_options*
76 verilog_slang_option
77 g:ale_verilog_slang_option
78   Type: |String|
79   Default: `''`
80
81   This variable can be changed to modify 'slang' command arguments.
82
83
84 ===============================================================================
85 verilator                                               *ale-verilog-verilator*
86
87                                         *ale-options.verilog_verilator_options*
88                                               *g:ale_verilog_verilator_options*
89                                               *b:ale_verilog_verilator_options*
90 verilog_verilator_options
91 g:ale_verilog_verilator_options
92   Type: |String|
93   Default: `''`
94
95   This variable can be changed to modify 'verilator' command arguments.
96
97   For example `'-sv --default-language "1800-2012"'` if you want to enable
98   SystemVerilog parsing and select the 2012 version of the language.
99
100
101 ===============================================================================
102 vlog                                                         *ale-verilog-vlog*
103
104                                           *ale-options.verilog_vlog_executable*
105                                                 *g:ale_verilog_vlog_executable*
106                                                 *b:ale_verilog_vlog_executable*
107 verilog_vlog_executable
108 g:ale_verilog_vlog_executable
109   Type: |String|
110   Default: `'vlog'`
111
112   This variable can be changed to the path to the 'vlog' executable.
113
114                                              *ale-options.verilog_vlog_options*
115                                                    *g:ale_verilog_vlog_options*
116                                                    *b:ale_verilog_vlog_options*
117 verilog_vlog_options
118 g:ale_verilog_vlog_options
119   Type: |String|
120   Default: `'-quiet -lint'`
121
122   This variable can be changed to modify the flags/options passed to 'vlog'.
123
124
125 ===============================================================================
126 xvlog                                                       *ale-verilog-xvlog*
127
128                                          *ale-options.verilog_xvlog_executable*
129                                                *g:ale_verilog_xvlog_executable*
130                                                *b:ale_verilog_xvlog_executable*
131 verilog_xvlog_executable
132 g:ale_verilog_xvlog_executable
133   Type: |String|
134   Default: `'xvlog'`
135
136   This variable can be changed to the path to the 'xvlog' executable.
137
138                                             *ale-options.verilog_xvlog_options*
139                                                   *g:ale_verilog_xvlog_options*
140                                                   *b:ale_verilog_xvlog_options*
141 verilog_xvlog_options
142 g:ale_verilog_xvlog_options
143   Type: |String|
144   Default: `''`
145
146   This variable can be changed to modify the flags/options passed to 'xvlog'.
147
148
149 ===============================================================================
150 yosys                                                       *ale-verilog-yosys*
151
152                                          *ale-options.verilog_yosys_executable*
153                                                *g:ale_verilog_yosys_executable*
154                                                *b:ale_verilog_yosys_executable*
155 verilog_yosys_executable
156 g:ale_verilog_yosys_executable
157   Type: |String|
158   Default: `'yosys'`
159
160   This variable can be changed to the path to the 'yosys' executable.
161
162                                             *ale-options.verilog_yosys_options*
163                                                   *g:ale_verilog_yosys_options*
164                                                   *b:ale_verilog_yosys_options*
165 verilog_yosys_options
166 g:ale_verilog_yosys_options
167   Type: |String|
168   Default: `'-Q -T -p ''read_verilog %s'''`
169
170   This variable can be changed to modify the flags/options passed to 'yosys'.
171   By default, Yosys is an interactive program. To obtain linting functionality,
172   the `'read_verilog'` command is used.
173
174
175 ===============================================================================
176   vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: