Nios II Classic Software Developer’s Handbook

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

7.11. HAL Namespace Allocation

To avoid conflicting names for symbols defined by devices in the hardware system, all global symbols need a defined prefix. Global symbols include global variable and function names. For device drivers, the prefix is the name of the component followed by an underscore. Because this naming can result in long strings, an alternate short form is also permitted. This short form is based on the vendor name, for example alt_ is the prefix for components published by Intel FPGA. It is expected that vendors test the interoperability of all components they supply.

For example, for the altera_avalon_jtag_uart component, the following function names are valid:

  • altera_avalon_jtag_uart_init()
  • alt_jtag_uart_init()

The following names are invalid:

  • avalon_jtag_uart_init()
  • jtag_uart_init()

As source files are located using search paths, these namespace restrictions also apply to file names for device driver source and header files.