Nios® V Processor Software Developer Handbook

ID 743810
Date 2/14/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

12.5.4.7. set_sw_property

Usage

set_sw_property <property> <value>

Options

  • <property>: Type of software property being set.
  • <value>: Value assigned to the property.

Description

Sets the specified value to the specified property. The properties this command supports can only hold a single value. This command overwrites the existing (or default) contents of a particular property with the specified value. This command applies to device drivers and software packages.

This command supports the following properties:

  • hw_class_name—The name of the hardware class which your device driver supports. The hardware class name is also the Component Name shown in the Component Editor. Example: altera_avalon_uart. This property is only available for device drivers. This property is required for all drivers.
  • version—The version number of this package. set_sw_property uses version numbers to determine compatibility between hardware (peripherals) and their software (drivers), as well as to choose the most recent software or driver if multiple compatible versions are available. A version can be any alphanumeric string, but is usually a major and one or more minor revision integers. The dot (.) character separates major and minor revision numbers. Examples: 9.0, 5.0sp1, 3.2.11. This property is optional, but recommended. If you do not specify a version, the newest version of the package is used.
  • min_compatible_hw_version—Specifies that the device driver supports the specified hardware version, or all greater versions. This property is only available for device drivers. If your device driver supports only one or more specific versions of a hardware class, use the add_sw_property specific_compatible_hw_version command instead. See the version property documentation for information about version strings. This property is optional. This property is only available for device drivers.
  • auto_initialize—Boolean value that specifies alt_sys_init.c needs to initialize your package. If enabled, you must provide a header file containing INSTANCE and INIT macros.

    This property is optional; if unspecified, alt_sys_init.c does not contain references to your driver or software. This property is only available for device drivers and software packages.

  • bsp_subdirectory—Specifies the top-level directory where niosv-bsp copies all source files for this package. This property is a path relative to the top-level BSP directory. This property is optional; if unspecified, niosv-bsp copies the driver or software package into the drivers subdirectory of any BSP including this software.
  • alt_sys_init_priority—This property assigns a priority to the software package or device driver. The value of this property must be a positive integer. Use this property to customize the order of macro calls in the BSP alt_sys_init.c file. Specifying the priority is useful if your software or driver must be initialized before or after other software in the system. For example, your driver might depend on another driver already being initialized.
This property is optional. The default priority is 1000. This property is only available for device drivers and software packages.
  • display_name—This property is used for user interfaces and other tools that wish to show a human-readable name to identify the software being described in the .tcl script. display_name is set to a few words of text (in quotes) that name your software. For example: Intel FPGA Nios V driver.
This property is optional. If not set, tools that attempt to use the display name use the package name created with the appropriate create_ command.
  • extends_bsp_type—This property specifies which BSP type that an operating system (created with the create_os command) extends (if any). Currently, only the Intel FPGA HAL (HAL) is supported. This command is required for all operating systems that wish to use HAL-compatible generators in the Nios® V processor BSP tools. It is also required for operating systems that require the Intel HAL, device driver, or software package source files that are HAL compatible in BSPs created with that operating system. An operating system that extends HAL is presumed to be compatible with device drivers that support HAL. This command is only available for operating systems.
  • callback_source_file—This property specifies a Tcl source file containing callback functions.
  • initialization_callback—This property specifies the name of a Tcl callback function which is intended to run in the following environment:
    • Run time: initialization
    • Scope: component instance
    • Function argument(s): component instance name
  • validation_callback—This property specifies the name of a Tcl callback function which is intended to run in the following environment:
    • Run time: validation
    • Scope: component instance
    • Function argument(s): component instance name
  • generation_callback—This property specifies the name of a callback function which is intended to run in the following environment:
    • Run time: generation
    • Scope: component instance
    • Function argument(s): component instance name, BSP generate target directory, driver BSP subdirectory
  • class_initialization_callback—This property specifies the name of a callback function which is intended to run in the following environment:
    • Run time: initialization
    • Scope: component instance
    • Function argument(s): driver class name
  • class_validation_callback—This property specifies the name of a callback function which is intended to run in the following environment:
    • Run time: validation
    • Scope: component instance
    • Function argument(s): driver class name
  • class_generation_callback—This property specifies the name of a callback function which is intended to run in the following environment:
    • Run time: generation
    • Scope: component instance
    • Function argument(s): driver class name, BSP generate target directory, driver BSP subdirectory
  • supported_interrupt_apis—Specifies the interrupt API that the device driver supports. Specify enhanced_interrupt_api only because the Nios® V processor supports the Enhanced HAL Interrupt API only.
Note: This property is only available for device drivers.
  • isr_preemption_supported—Specify true if your device driver ISR can be preempted by a higher priority ISR. If you do not specify whether ISR preemption is supported, the Nios® V processor tools assumes that your device driver does not support preemption. If your driver does not have an ISR, but the associated device has an interrupt port, you can set this property to true.
Note: This property is valid for operating systems and device drivers.