dense-analysis / ale

Check syntax in Vim/Neovim asynchronously and fix files, with Language Server Protocol (LSP) support
BSD 2-Clause "Simplified" License
13.51k stars 1.43k forks source link

Match filename in xvlog linter and add tip #4764

Open gastmaier opened 5 months ago

gastmaier commented 5 months ago

Match the xvlog stdout for the filename to properly filter out the errors per file. Suggest using Vivado generated compile.sh file to obtain the xvlog options.

For reference, the sane way of using xvlog is along these lines:

let g:ale_verilog_xvlog_options = '
\ --incr --relax \
\ -L uvm -L axi_vip_v1_1_15 -L smartconnect_v1_0 -L clk_vip_v1_0_3 -L axi4stream_vip_v1_1_15 -L rst_vip_v1_0_5 -L xilinx_vip
\ -prj ./path/to/xsim/system_tb_vlog.prj'

Room for improvement: The .prj uses relative paths and expects xvlog to be called from its path. As is, I'm manually "fixing" the relative paths in the .prj to point from the cwd to xsim. Not sure if it's worth a more elaborated solution (e.g. search for the compile.sh, set cwd to its location, and extract the xvlog options.