AN 947: Testing the Nios® II Software with Unit-Test Framework

ID 683606
Date 4/30/2021
Public

Unit-Test Structure with System Mock

Figure 2. Unit-test Framework High-level View

This diagram provides visualization on how to integrate Nios® II code into a System Mock unit-test framework. During compilation, Nios® II code must include System Mock library files to access mock IP components and the right definitions of built-in functions. Intel recommends using a common header file to include Nios® II BSP library in your Nios® II code. This allows you to insert System Mock library from one location. Afterwards, individual unit-test suite can include the Nios® II source code, either partially or fully depending on its test scope.