There are several use cases of fromco executable. It can be used either as LSP server or CLI utility for linting, documentation extraction, etc and can be easily integrated into your CI.
Unpack the archive and copy the fromco-exe and fromco-lsp files into a directory on your PATH. For example:
chmod +x fromco-exe fromco-lsp; cp fromco-exe fromco-lsp ~/.local/bin/
Generate a .fromco.cfg in your project root. It declares your top
module and points fromco at your filelist:
fromco-exe --lsp-init | tee .fromco.cfg
The generated file looks like this; adjust the fields to match your project:
{
"top_module" : "top",
"file_list" : "filelist.f",
"exclude_globs" : ["generated/*", "third_party/*"],
"waveform_top_prefix" : "tb.i_dut",
"waveform_top" : "dut",
"wcp_port" : 6138
}
Create a filelist.f -- or reuse an existing one -- and point the
file_list field of .fromco.cfg at it. For extra
dependencies such as UVM, build a higher-level filelist that pulls them in.
For example:
+incdir+${UVM_ROOT}/1.2/
${UVM_ROOT}/1.2/uvm_pkg.sv
+define+MY_USEFUL_DEFINE
-f rtl_project_filelist.f
-f verif_project_filelist.f
If your filelist references an environment variable, add it to your IDE's env
settings or define it in a .fromco_env file. These are visible only to
the LSP and substituted into your filelists. fromco-lsp itself is just
a small wrapper:
#!/bin/bash
FROMCO_ROOT="$(pwd)"
if [ -f "$FROMCO_ROOT/.fromco_env" ]; then
export $(grep -v '^#' "$FROMCO_ROOT/.fromco_env" | xargs)
fi
exec fromco-exe --lsp
The archive ships pre-defined configs for several common editors at its root -- modify and reuse them freely.
The archive includes a fromco-lsp-*.vsix extension -- install it via
Extensions -> Install from VSIX. It provides the full LSP feature set,
fromco-specific extras (go-to-drivers, preprocessor highlighting), waveform commands, and the
Schematic Viewer.
The archive ships a LazyVim config in the fromco.nvim folder, which
unlocks fromco-specific features such as waveforms and preprocessor fading. Install
fromco.lua by hand, or copy it with install.sh.
Copy fromco.nvim somewhere and set its dir parameter:
-- Provide a path to fromco.nvim
dir = "/path-to/fromco.nvim",
dependencies = { "neovim/nvim-lspconfig" },
ft = { "verilog", "systemverilog" },
opts = {
-- Provide a path to fromco-lsp if it is not copied to PATH locations
cmd = { "fromco-lsp" },
lsp_log_level = "OFF",
-- Change here for faster feedback
defer_ms = 200,
},
}
There is no dedicated plugin for these editors yet, but because fromco speaks the Language Server Protocol, the core features (semantic navigation, references, linting, hover and completion) work in any LSP-capable editor. Point the editor's LSP client at the fromco-lsp command for the verilog and systemverilog file types. Editor-specific extras such as the Schematic Viewer and waveform integration are currently only in the VSCode and Neovim plugins.
In Sublime Text, install the
LSP
package via Package Control, then register fromco-lsp as a client under
Preferences -> Package Settings -> LSP -> Settings. See the
client configuration guide
for the full list of options.
// Preferences -> Package Settings -> LSP -> Settings
{
"clients": {
"fromco": {
"enabled": true,
"command": ["fromco-lsp"],
"selector": "source.systemverilog, source.verilog"
}
}
}
Whichever editor you use, open a SystemVerilog file to confirm the server is running: you should see inline diagnostics and working go-to-definition.