Typedef and functions to check the version and compatibility of the libpynq library and the FPGA bitstream.
Semantic versioning (https://semver.org) is used. Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes between libpynq and FPGA bitstream (SD-card image)
- MINOR version when you add functionality in a backward compatible manner.
- PATCH version when you make backward compatible bug fixes.
When the libpynq library version and the FPGA bitstream version are not the same:
- libpynq.MAJOR < bitstream.MAJOR: you MUST update libpynq to the latest version compatible with the bitstream version. The check_version function will fail and exit your program.
- libpynq.MAJOR > bitstream.MAJOR: you MUST update the bitstream to the latest version compatible with the libpynq version (or downgrade the libpynq version to bitstream.MAJOR). The print/check_version function will fail and exit your program.
- libpynq.MINOR > bitstream.MINOR: it is recommended to update the bitstream to the latest version compatible with the libpynq version. The print_version function will print an INFO message.
- libpynq.MINOR < bitstream.MINOR: it is recommended to update the libpynq to the latest version compatible with the bitstream version. The print_version function will print an INFO message.
- libpynq.PATCH != bitstream.PATCH: no action required
◆ check_version()
void check_version |
( |
void |
| ) |
|
Check the version of the hardware (bitstream) and the libpynq library. Called by e.g. the switchbox but can also be called in user code.
- Warning
- Fails with program exit when versions are incompatible.
Definition at line 68 of file version.c.
◆ print_version()
void print_version |
( |
void |
| ) |
|
Print the version of the hardware (bitstream) and the libpynq library.
Prints INFO message when minor/patch versions are different.
Definition at line 44 of file version.c.
◆ libpynq_version
Constant containing the version of this the libpynq library.
Definition at line 34 of file version.c.