Constant overview

Using register constants is a convenient way to avoid duplication or hard-coding of important values. It makes it possible to programmatically provide values from the HDL project build flow to the software that will integrate it. Adding a constant to a register list will make it available in the generated code, e.g. in VHDL for HDL use, and in e.g. C++ header for software use.

We support all conceivable types of constants. See the menu sidebar for details about the different types and how to use them.

Adding a constant to a register list in Python is done by running RegisterList.add_constant() on a RegisterList object. Or in a TOML data file e.g. like this. See the menubar to the left for an article about each constant type. They contain more details about both Python API and TOML format.