Skip to content

Commit

Permalink
iverilog current file search path (#4907)
Browse files Browse the repository at this point in the history
In the vein of commit ea72d66 "Verilator current file search path (#3500)"

This includes the directory of the current file in the library
search path. From `man iverilog`:

           -ylibdir
               Append  the  directory  to the library module search
               path. When the compiler finds an undefined module, it
               looks in these directories for files with the right name.
  • Loading branch information
jimktrains authored Feb 16, 2025
1 parent ce2b002 commit 699c0db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ale_linters/verilog/iverilog.vim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ call ale#Set('verilog_iverilog_options', '')

function! ale_linters#verilog#iverilog#GetCommand(buffer) abort
return 'iverilog -t null -Wall '
\ . '-y%s:h '
\ . ale#Var(a:buffer, 'verilog_iverilog_options')
\ . ' %t'
endfunction
Expand Down
4 changes: 2 additions & 2 deletions test/linter/test_iverilog.vader
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ After:
call ale#assert#TearDownLinterTest()

Execute(The default iverilog command should be correct):
AssertLinter 'iverilog', 'iverilog -t null -Wall %t'
AssertLinter 'iverilog', 'iverilog -t null -Wall -y%s:h %t'

Execute(iverilog options should be configurable):
" Additional args for the linter
let g:ale_verilog_iverilog_options = '-y.'

AssertLinter 'iverilog', 'iverilog -t null -Wall -y. %t'
AssertLinter 'iverilog', 'iverilog -t null -Wall -y%s:h -y. %t'

0 comments on commit 699c0db

Please sign in to comment.