The hdl_registers project is an open-source HDL register generator fast enough to run in real time. It can easily be plugged into your development environment so that VHDL register code generation is done before each build and simulation. For your FPGA release artifacts it can generate headers and documentation.
To install the Python package, see Installation. To check out the source code go to the gitlab page.
The typical use case is to let hdl_registers parse a
.toml file with register definitions that
make up a register map.
It is also possible to work directly with the Python abstractions as well, without using a
The following code can be generated by the tool:
VHDL package containing the register constant values, as well as a type with all the registers and their modes. This can be used with a generic register file in your VHDL code.
HTML website with documentation of the registers and constants.
C header with constant values, register addresses, and register field information.
C++ header and implementation with constant values, and setters/getters for registers and fields. The header has an abstract interface class which can be used for mocking.