Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Project setup

There are several use cases of fromco executable. It can be used either as LSP server or CLI utility for linting, and documentation extraction.

Lsp setup

Create a configuration file .fromco_cfg.json at project root directory

{
	"top_module"     	: "top",
	"file_list"      	: "filelist.f",
	"exclude_globs"  	: ["glob1", "glob2", "..."],
	"use_file_watcher" 	: true
}

If you have dependencies e.g. UVM, just create a separate filelist for UVM and add it to root file list.

For example uvm_1_2.f:

+define+UVM_MAJOR_VERSION=1
+define+UVM_MINOR_VERSION=2
+incdir+/path_to_uvm/UVM/1.2/
/path_to_uvm/UVM/1.2/uvm_pkg.sv

If your filelist has dependency from environment variable, you can add it to IDE env variables or you can define it via in .env file. They will be visible only for LSP and substituted into described filelists. So, fromco-lsp is just a simple wrapper:

#!/bin/bash
FROMCO_ROOT="$(pwd)"
if [ -f "$FROMCO_ROOT/.env" ]; then
	export $(grep -v '^#' "$FROMCO_ROOT/.env" | xargs)
fi
exec fromco --lsp

IDE setup

The default distribution contains pre-defined configs for number of a common text editors. Feel free to modify and reuse it. See lsp/ directory.

Visual Studio Code

See lsp/vscode_fromco.vsix The default distribution contains fromco*.vsix extension which can be installed via Extensions->Install from VSIX . It provides key LSP protocol functionality (see LSP features), additional functionality (e.g. goto drivers, preprocessor highlights), and Schematic Viewer.

Nvim

See lsp/nvim_fromco.lua

Sublime text

See lsp/sublime_text_fromco.json

CLI setup

Can be used for fast linting and CI integration.

$ fromco -h

Documentation generator setup (CLI)

fromco provides a documentation extraction functionality for any project. It can be easily integrated into CI or other workflows which will enable a documentation vs RTL consistency.

$ fromco -F <filelist path> --dump-json <entity kind> --focus hier_path.[entity1,entity2]

The tool output might be postprocessed and inserted into your documentation build pipeline. Default distribution provides an example script which consumes names intended to be dumped and produces a number of latex or adoc tables. For example:

$ fromco-dump --yaml hooks.yaml --adoc -o hooks.adoc 

You can open an examples/documentation folder and inspect a template of documentation generation pipeline.