Example Software
To help you get started writing software for the Sapphire, Efinix provides a variety of example software code that performs functions such as communicating through the UART, controlling GPIO interrupts, performing Dhrystone benchmarking, etc. Each example includes a makefile and src directory that contains the source code.
Note: Many of these examples display messages on a UART. Refer to the
following topics for information on attaching a UART module and connecting to it in
a terminal:
| Directory | Description |
|---|---|
| bootloader | This software is the bootloader for the system. |
| common | Provides linking for the makefiles. |
| clintTimerInterruptDemo | This example shows how to use the clint timer with interrupt. |
| coremark | This example is a synthetic computing benchmark program. |
| customInstructionDemo | This example illustrates how to implement a custom instruction. |
| dCacheFlushDemo | This example illustrates how to invalidate the data cache. |
| dhrystone Example | This example is a synthetic computing benchmark program. |
| driver | This directory contains the system drivers for the peripherals (I2C, UART, SPI, etc.). Refer to API Reference for details. |
| fatFSDemo | This example demonstrates the implementation of the FatFS File System with a Command Line Interface (CLI) for interaction. |
| FreeRTOS Examples | This example shows the example software projects targeting the RTOS. |
| fpuDemo | This example shows how to use the floating-point unit. |
| gpioDemo | This example shows how to control the GPIO and its interrupt. |
| iCacheFlushDemo | This example illustrates how to invalidate the instruction cache. |
| inlineASMDemo | This example illustrates utilizing the inline assembly feature. |
| lwipIperfServer | This example illustrates how to use the LWIP software stack to enable the Sapphire high-performance RISC-V SoC as an Iperf server. |
| memTest Example | This example provides example code that performs a memory test on the external memory module and reports the results on a UART terminal. |
| nestedInterruptDemo | This example shows how to set a higher priority to an interrupt routine, which allows the CPU to prioritize the task execution instead of other interrupts. |
| oob Example | The out-of-box example provides example code that performs multi core operation where Core 0 controls the LED(s) blinking while Core 1 controls the printing of a rotating donut. |
| I2cMasterDemo | This example illustrates how to utilize the Sapphire SoC as an I2C master effectively. |
| I2cMasterInterruptDemo | This example is based on the i2cMasterDemo for the Sapphire SoC, with an important enhancement: timeout interrupt handling. |
| I2cSlaveDemo | This example illustrates how to utilize the Sapphire SoC as an I2C slave effectively. |
| rtcDemo | This example shows how to use the on-board PCF8523 RTC module on the Ti375C529 FPGA. |
| sdhcDemo | This example evaluates the throughput performance of the SD Host Controller (SDHC) by reading and writing a specific amount of data to and from the SD card. |
| semihostingDemo | This examples shows how to use write and read debug messages through semihosting. |
| smpDemo | This example illustrates how to use multiple cores to execute the Tiny encryption algorithm in parallel. |
| temperatureSensorDemo | This example shows how to communicate with the on-board EMC1413 temperature module on Ti375 C529 Development Board. |
| uartEchoDemo | This example shows how to use the UART. |
| UartInterruptDemo | This exmple shows how to use a UART interrupt. |
| userTimerDemo | This example shows how to use the user timer with interrupt. |