Parameters/Generics#
Warning
Outdated Documentation! This documentation version is out of date. Please check the latest version 2026.1.
At project creation time and just before synthesis starts[1][2], Hog injects a set of values into your design.
This mechanism links the generated binary file to the exact state of the repository at the moment of synthesis. Hog achieves this by leveraging VHDL generics or Verilog parameters[3]. This section details the generics/parameters provided by Hog.
These generics/parameters should be connected to dedicated registers that can be accessed at run time on the device (e.g., via IPBus/AXI registers).
To access the Hog generics/parameters, you must define the following in your top-level entity:
Name |
Type (VHDL) |
Size |
Description |
|---|---|---|---|
|
|
32 bit |
Date of last commit when the project was modified. Format: ddmmyyyy (hex with decimal digits, no digit greater than 9 is used) |
|
|
32 bit |
Time of last commit when the project was modified. Format: 00HHMMSS (hex with decimal digits, no digit greater than 9 is used) |
|
|
32 bit |
Last version tag when the project was modified. Version m.M.p encoded as 0xMMmmpppp |
|
|
32 bit |
Git commit hash (SHA) of the last commit when the project was modified |
|
|
32 bit |
Version of the top directory (containing hog.conf and other files), encoded as 0xMMmmpppp |
|
|
32 bit |
Git commit hash (SHA) of the top directory |
|
|
32 bit |
Version of the constraint files, encoded as 0xMMmmpppp |
|
|
32 bit |
Git commit hash (SHA) of the constraint files |
|
|
32 bit |
Hog submodule version, encoded as 0xMMmmpppp |
|
|
32 bit |
Hog submodule git commit hash (SHA) |
|
|
32 bit |
(optional) IPbus XML version, encoded as 0xMMmmpppp |
|
|
32 bit |
(optional) IPbus XML git commit hash (SHA) |
|
|
32 bit |
(one per library, i.e., per |
|
|
32 bit |
(one per library, i.e., per |
|
|
32 bit |
(one per external library) Git commit hash (SHA) of the |
|
integer |
(integer) Flavour used for generating this bit file, set if your project uses Hog flavours to produce bit files for different devices |
Encoding details:
Dates and times are encoded in hexadecimal using only decimal digits (0–9). For example, the date 5 July 1952 is encoded as
0x05071952, and the time 12:34:56 as0x00123456.Version numbers of the form M.m.p are encoded as
0xMMmmpppp. For example, version 7.10.255 becomes0x070A00FF.SHA values are the 7-digit hexadecimal git commit hash.
To guarantee synthesis reproducibility, Hog uses the last-commit date and time, not the synthesis date and time.
The version and hash for a subset of files are calculated using git log, meaning the latest commit (and version tag) where at least one of those files was changed.
Note that there is not a one-to-one correspondence between tag and hash, as not all commits are tagged—a tag can correspond to several hashes (all those between that tag and the previous one).
You are not required to use all these generics/parameters in your design. If you do not need them, you can leave them unconnected or omit them from your top module; the HDL synthesizer will ignore them (though it may issue a warning)[4].