Nios® V Processor Software Developer Handbook

ID 743810
Date 7/08/2024
Public

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

Document Table of Contents

7.3. The system.h System Description File

The system.h file provides a complete software description of the Nios® V system hardware. Not all information in system.h is useful to you as a programmer, and it is rarely necessary to include it explicitly in your C source files. Nonetheless, system.h holds the answer to the question, “What hardware is present in this system?”

The system.h file describes each peripheral in the system and provides the following details:

  • The hardware configuration of the peripheral
  • The base address
  • Interrupt request (IRQ) information (if any)
  • A symbolic name for the peripheral

The Nios® V processor tools generates the system.h file for HAL BSP projects. The contents of system.h depend on both the hardware configuration and the HAL BSP properties.

Note: Do not edit system.h. Use Nios® V processor tools facilities to manipulate system settings.

Excerpts from a system.h File Detailing Hardware Configuration Options

/*
* sys_clk_timer configuration
*
*/
#define SYS_CLK_TIMER_NAME "/dev/sys_clk_timer"
#define SYS_CLK_TIMER_TYPE "altera_avalon_timer"
#define SYS_CLK_TIMER_BASE 0x00920800
#define SYS_CLK_TIMER_IRQ 0
#define SYS_CLK_TIMER_ALWAYS_RUN 0
#define SYS_CLK_TIMER_FIXED_PERIOD 0
/*
* jtag_uart configuration
*
*/
#define JTAG_UART_NAME "/dev/jtag_uart"
#define JTAG_UART_TYPE "altera_avalon_jtag_uart"
#define JTAG_UART_BASE 0x00920820
#define JTAG_UART_IRQ 1