MAX 10 Plus User
Manual
54
May 31, 2019
Chapter 6
NIOS Based Example Codes
There are several NIOS based examples for users to get started and try them on the MAX 10 Plus
board. All the NIOS based examples can be found in the system CD under the folder named
Demonstrations. Users are free to use or modify these examples for personal use or education
purpose.
Note: The output files generated after compilation in Quartus II e.g. .sof and .pof files, are saved in
the folder "output_files" under the directory of demo project. The workspace of Nios II Eclipse
project is located in the folder "software" under the directory of demo project.
6.1
Power Monitor
The power monitor demo shows how to measure the power consumed through the onboard power
monitor chip LTC2990. There are three LTC2990 to monitor the following power rails:
•
3.3V VCCIO
•
2.5V Core
•
2.5V VCCIO
•
1.5V VCCIO
•
1.2V VCC
The power monitor chip LTC2990 communicates with the FPGA via I2C protocol. The I2C
OpenCore IP is used in this demonstration for the MAX 10 device to communicate with the three
LTC2990, which have different I2C slave address 98h, 9Ah, and 9Ch.
◼
Block Diagram
shows the system block diagram of this demonstration. The NIOS program is stored in
the onchip memory and the Nios II processor is running at 50MHz. The I2C library is located in the
files named I2C_core.cpp and I2C_core.h. The I2C OpenCore IP is located in the folder
“ip/i2c_opencores” under the project directory.