Development#

Sphinx + Read the docs theme - Autodoc Matlab - Markdown sourcing - Math equations

Matlab#

VSCode + plugins : alternative to Matlab Editor#

The built-in editor of Matlab although it is customable in terms of syntax coloring and shortcuts lacks a decent autocompletion. An alternative is to edit the scirpts in VSCode paired with a Matlab plugin that will allow efficient auto-completion and link to functions.

Useful commands#

  • Ctrl + MouseClickLeft : on a function it will open the script that defines the function

Python#

VSCode + plugins + pip#

This environment is based on the use of pip for the management of Python package and VSCode paired with some plugin to act as an IDE. This version is lighter than using Anaconda (Anaconda is about 9 Go) since you only install what you need without any extra package and faster at startup. The package manager pip can be installed from the Python installer.

Useful commands#

  • Ctrl + Shift + P > Execute current Python script in Terminal : Launch your Python script

  • Ctrl + Shift + P > Select Python interpreter : Select what version of Python to use

  • Ctrl + Shift + P > Python : List all the actions related to Python

How to use pip#

If you installed from Python installer and if your environment variables are correctly set, you may call pip installer from windows shell using the following command.

Win + R > cmd : to open windows shell

pip install Sphinx --user

Otherwise you might need to call it as below.

python -m pip install Sphinx --user

Anaconda#

The alternative is the use of anaconda that a very complete platform that will allow to handle easily python virtual environments and comes with a numerous softwares. However, you are more likely to spend most of your time using the IDE named Spider so as you are a very small percentage of the Anaconda’s features. This is why unless you are in need of a particular setup, you may want to opt for the VSCode+plugins+pip solution.

Links#

VSCode + Python - Python Linter VSCode - Python Extension VSCode

Pip documentation

Anaconda

VSCode Useful default shortcuts (Windows)#

  • Ctrl + Shift + Alt + Up/Down : multi column selection

  • Ctrl + Shift + Left/Right : word to word selection

  • Alt + Shift : duplicate current selection or line

  • Alt + Up/Down : move line up or down

  • Ctrl + X : cut but could be use to delete line

  • Home : Start of line

  • End : End of line

  • Ctrl + Home : Start of file

  • Ctrl + End : End of file

TerosHDL Useful Macros

  • libieee : generate libraries (standard, …)

  • entarch : generate entity and architecture tempalte

  • process : generate process (async, sync, comb, …)

  • slv : std logic vector declaration or cast

  • compinst : port map instance

  • Generate VHDL Testbench : generate testbench from source in clipboard

Other alternatives#

  • Notepad : as a very light and simple editor, is also an alternative to Vivado editor. It allows add-ons and plugins and is included on most computers installation scripts.

  • Atom + TerosHDL : it is a solution very close to the first one. Atom slightly differs with VSCode on plugin management but I find VSCode more user friendly.

  • Neovim : if you spent a decent amount of time using vim that might a good alternative if paired with appropriates plugins.

  • Your favorite editor : any editor your familiar with is a good choice as long as it has hdl support available.

Improve the environment#

  • A siginificant improvement might be the introduction of fly-on syntax check powered by Sigasi for example (used in Vivado, educational license available). Numerous open source hdl syntax check tools among which ghdl are also available.

  • Another useful tool is the incremental selection that turns out to be very convenient for instanciation and pipeline signals numbering.

Links#

VSCode