Skip to content

Compilation

Gonzalo Larumbe edited this page Jun 2, 2023 · 6 revisions

Configuration

First make sure that compilation has been included in verilog-ext-feature-list before running verilog-ext-mode-setup.

Then, it might be needed to set workspace variables for file parsing.

Compilation with syntax highligting and jump to error

Example usage

First you need to set the variable verilog-ext-workspace-compile-cmd to an appropriate value.

(setq verilog-ext-workspace-compile-cmd "verilator --lint-only -f commands.f")

In this case, commands.f is a command file placed at the workspace root which might contain a file list or extra arguments for the command.

And then run M-x verilog-ext-workspace-compile-cmd RET.

Notes

The supported binaries with regexps are the ones supported by verilog-ext-flycheck:

  • verilator
  • iverilog
  • verible-verilog-lint
  • slang
  • svlint
  • surelog

If you use a different command, it will work but the output will not be highlighted and it will not support jumping to error files.

If you want a colorized output with the jump to error feature for other tools, such as Vivado, Quartus, Xcelium, QuestaSim, etc.., check the fpga package, which provides a similar functionality for major vendors.

Preprocessor

Provide function to preprocess files based on binary: verilator, iverilog or vppreproc:

  • verilog-ext-preprocess: C-c C-p

Makefile based development

Provide functions to create a Makefile from a template on the workspace root and to compile targets

  • verilog-ext-workspace-makefile-create
  • verilog-ext-workspace-makefile-compile
Clone this wiki locally