Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

5.8.3. Specifying the Default System Timer

The bsp-timer-utils.tcl script provides procedures to choose a default system timer slave descriptor and to set the hal.sys_clk_timer BSP setting to that value.

For more information about this setting, refer to the Nios® II Software Build Tools Reference section.

The script searches the .sopcinfo file for a timer component to use as the default system timer. To be an appropriate system timer, the component must have the following characteristics:

  • It must be a timer, that is, is_timer_device must return true.
  • It must have a slave port connected to the Nios® II processor.

When the script finds an appropriate system timer component, it sets hal.sys_clk_timer to the timer slave port descriptor. The script prefers a slave port whose descriptor contains the string sys_clk, if one exists. If no appropriate system timer component is found, the script sets hal.sys_clk_timer to none.