Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

7.8.5.2.9. Version Compatibility

Your device driver or software package can optionally specify versioning information through the Tcl command interface. The driver and software package Tcl commands specifying versioning information allow the following functionality:
  • You can request a specific version of your driver or software package with BSP settings.
  • You can make updates to your device driver and specify that the driver is still compatible with a minimum hardware class version, or specific hardware class versions. This facility is especially useful in situations in which a hardware design is stable and you foresee making software updates over time.

The <version> argument in each of the following versioning-related commands can be a string containing numbers and characters. Examples of version strings are 8.0, 5.1.1, 6.1, and 6.1sp1. The “.” character is a separator. The BSP generator compares versions against each other to determine if one is more recent than the other, or if two are equal, by successively comparing the strings between each separator. Thus, 2.1 is greater than 2.0, and 2.1sp1 is greater than 2.1. Two versions are equal if their version assignment strings are identical.

Use the version argument of set_sw_property to assign a version to your driver or software package. If you do not assign a version to your software or device driver, the version of the Nios II EDS installation (containing the Nios II BSP commands being executed) is set for your driver or software package:

set_sw_property version 7.1

Device drivers (but not software packages) can use the min_compatible_hw_version and specific_compatible_hw_version arguments to establish compatibility with their associated hardware class, as follows:

set_sw_property min_compatible_hw_version 5.0.1
add_sw_property specific_compatible_hw_version 6.1sp1

You can add multiple specific compatible versions. This functionality allows you to roll out a new version of a device driver that tracks changes supporting a hardware peripheral change.

For device drivers, if no compatible version information is specified, the version of the device driver must be equal to the associated hardware class. Thus, if you do not wish to use this feature, Intel FPGA recommends setting the min_compatible_hw_version of your driver to the lowest version of the associated hardware class your driver is compatible with.