Visible to Intel only — GUID: iga1405468727729
Ixiasoft
Visible to Intel only — GUID: iga1405468727729
Ixiasoft
11.4.1.1. Driver Options: Fast vs Small Implementations
To accommodate the requirements of different types of systems, the UART driver provides two variants: a fast version and a small version. The fast version is the default. Both fast and small drivers fully support the C standard library functions and the HAL API.
The fast driver is an interrupt-driven implementation, which allows the processor to perform other tasks when the device is not ready to send or receive data. Because the UART data rate is slow compared to the processor, the fast driver can provide a large performance benefit for systems that could be performing other tasks in the interim.
The small driver is a polled implementation that waits for the UART hardware before sending and receiving each character. There are two ways to enable the small footprint driver:
- Enable the small footprint setting for the HAL system library project. This option affects device drivers for all devices in the system as well.
- Specify the preprocessor option -DALTERA_AVALON_UART_SMALL. You can use this option if you want the small, polled implementation of the UART driver, but do not want to affect the drivers for other devices.
Refer to the help system in the Nios® II IDE for details about how to set HAL properties and preprocessor options.