V4P - VHDL for Professionals
This extension provides full VHDL (2008) programming language support for Visual Studio Code. It is intended for professional VHDL developers who need sophisticated IDE support for their daily work, but of course every VHDL engineer - whether student or hobbyist - will benefit greatly from the rich feature-set: Renaming, code navigation capabilities, syntax checks, etc. are only some examples of V4P's capabilities.
Take a look at the CheatSheet for a complete list of features.
Contents
List of Features
Highlights
Upcoming Features
Config Files
Commands
Visual Studio Settings
Limitations
Licensing
Features
- VHDL 2008 support
- Full Syntax Support, no limitations: Generic Packages, Generic Subroutines, External/Hierarchical Names, Enhanced Bit String Literals, Protected Types, Contexts, Vector Aggregates, Conditional Statements, ...
- Syntax Highlighting
- Syntax Errors
- Built-In Standard IEEE libraries
- Code Statistics (Lines of code, comments, empty lines)
- Semantic Highlighting (Signals, Variables, Constants, Generics, Types, Ports, ...)
- Type-Time Checks, LINTing
- Syntax Errors
- Symbol not found
- Signal vs. variable assignment operator
- Symbol already defined
- End-labels mismatch
- Unassociated port signals for instances
- Symbol cannot be target of assignment
- Symbol is never written
- Symbol is never read
- Meta-Comments (pragmas) and configuration settings to disable warnings
- Stutter Mode
- Code Assist
- Refactoring: Renaming
- Insert missing instance associations (and create local signals)
- Create signal declarations for unknown instance associations
- Code Formatter
- Full Document / Selected Range
- Highly configurable
- Meta-Comments (pragmas) for in-file control
- Code Navigation
- Goto Definition
- Goto Declaration
- Goto Type Definition
- Find all References
- Find all (signal-) sources
- Hover Info / Quickinfo (colorized 😉 )
- Symbol Information, Type Information
- Expression Evaluator
- Number Conversion
- Alias/Type Resolution
- Generic Type Resolution
- Code Completion (context sensitive)
- Snippets (Instances, Case, Processes, Entities/Architectures, ...)
- Symbols (Variables, Signals, Constants, Types, ...)
- Hierarchy/Record/Protected Type Name Resolution
- Side-Panel Views
- Access all commands (HDL Panel)
- Library View (HDL Panel)
- Hierarchy View (HDL Panel)
- Document outline (Explorer Panel)
- Parameter Help for (overloaded) functions/procedures/components/instances
- Smart Indentation when typing
- VHDL specific Outlining / Code Folding
- Multiple VHDL libraries per Design File
- Per-Folder / Project-Wide Preferences
- Indentation
- Formatting (Keyword-style, Capitalization of Standard-Libs, ...)
- Code Completion
- Hover Info
Highlights
Overview Video
Semantic Highlighting and Error Checking
Snippets: Instantiate Entites and Components
Insert missing instance associations and create corresponding local signals
Code Completion: Record Field Resultion
Config Files
A detailed description of the config files can be found in the CheatSheet.
- Create a file named
config.v4p
in one (or more) of your workspace / root folders
- Optional: You can also create a
MasterConfig
, eg. in your home directory, for global settings
- Add JSON-based or INI-based (recommended) settings as shown in the example snippets below.
- libraries: Define the file(s) as glob pattern and assign a comma-separated list of VHDL library names. No files are added to the project! This is just a mapping of filenames to library names!
- excludes: Define the file(s) as glob pattern and enable (true) or disable (false) exclusion from parsing etc.
- settings: Various aspects can be configured, please refer to the CheatSheet for details
- ignores: Warnings and errors can be deactivated for files/symbols/scopes inside this section
- In your
Master Config
you should only use patterns starting with **
(to match anything, no matter where it's located)
- In your folder-specific configs, you should use relative patterns (like in the
libraries
section below), they are always relative to the current root-folder
{
"libraries": {
"spi_pkg.vhd": "spi_lib, spi_test_lib",
"libs/math/*.vhd": "math_lib",
"libs/**/string*.vhd": "string_lib"
},
"excludes": {
"**/out/*.vhd": true
},
"settings": {
"V4p.Settings.Formatting.Indentation.TabWidth": 4,
"V4p.Settings.Formatting.Indentation.UseTabs": true
},
"ignores": {
"**/_dbg.vhd @ signal_*_dbg_s": "never-read, never-written",
"duts/dut*.vhd @ dut_inst.*_dbg_o": "missing-association"
}
}
[libraries]
spi_pkg.vhd = "spi_lib, spi_test_lib"
libs/math/*.vhd = "math_lib"
libs/**/string*.vhd = "string_lib"
[excludes]
**/out/*.vhd = true
bin/** = true
[settings]
V4p.Settings.Formatting.Indentation.TabWidth = 4
V4p.Settings.Formatting.Indentation.UseTabs = true
[ignores]
**/_dbg.vhd @ signal_*_dbg_s = "never-read, never-written"
duts/dut*.vhd @ dut_inst.*_dbg_o = missing-association
Commands
The command input prompt can be activated by pressing ctrl
+shift
+P
, or by navigating V4P's activity bar panel. The following table is not complete, please refer to the CheatSheet.
Name |
Description |
v4p.version |
Displays the current version and build date |
v4p.license |
Displays information about all found licenses |
v4p.license.renew |
Opens the webpage to renew your curront license |
v4p.license.mac |
Opens the webpage to change your MAC addresses |
v4p.logfile |
Opens the logfile in the editor |
v4p.reload |
Reloads the the config.v4p files |
v4p.thirdparty |
Shows licensing information of all used Third Party Software / Tools |
v4p.settings |
Shows a detailed map of V4P's settings (MasterConfig, FolderConfig) |
v4p.masterconfig |
Shows the existing or creates a new masterconfig |
v4p.localconfig |
Shows or creates a new local config for the active rootfolder |
v4p.eula |
Show End User License Agreement |
v4p.fileinfo |
Show detailed information about all files in the workspace |
v4p.stats |
Shows code statistics (lines of code, comments, empty lines) in a table |
v4p.cheatsheet |
Opens the cheatsheet in a browser window |
v4p.demo |
Opens the demo project |
Required Visual Studio Code Settings
There are a couple of useful Visual Studio Code related settings which one should take a look at. Some settings need to be changed in order to enable the VHDL specific functions provided by V4P, other settings are just useful to know as they greatly influence the editor's appearance.
Description |
Shortcut |
Recommendation |
Auto Indentation |
ctrl +, editor.formatOnType |
Enable ( required for VHDL specific smart indentation) |
Code Folding (Enable) |
ctrl +, editor.folding |
Enable ( required to use VHDL specific code folding) |
Code Folding (Strategy) |
ctrl +, editor.foldingStrategy |
Auto ( required to use VHDL specific code folding) |
Snippets (Enable) |
ctrl +, editor.suggest.showSnippets |
Enable snippets (required) |
Enable Semantic Highlighting |
ctrl +, editor.semanticHighlighting.enabled |
True or ConfiguredByTheme . Theme must support semantic highlighting |
Code Completion (Auto Suggestions) |
ctrl +, editor.wordBasedSuggestions |
Disable (optional) |
Other Extensions
Linty HDL Designer by Linty Services: Our partner checks 220+ rules in real-time on your VHDL, Verilog/SystemVerilog and Tcl code. Review and investigate clock domain crossings (CDC), finite state machines (FSM), combinatorial loops and many more through reports, graphs and diagrams.
Limitations
No software is without bugs, and V4P is no exception. Should you find any bugs, or have special feature requests, please just contact me per email: info@vide-software.at. I kindly ask you to give me the chance to improve V4P before you give it a bad rating.
License
V4P comes with a pre-installed, fully-featured 30-day trial license. Once the trial period has expired, V4P continues to work with a very reduced feature set.
A paid license can be obtained via the official website http://www.vide-software.at in order to get all the handy features working again 😊.
There are various options how to install the license.
Please notice that V4P is not intended to be used without a license. The reduced feature set has no sophisticated functions whatsoever.