4.4 Software Implementation

For information about creating and building a SoftConsole project for the Mi-V processor subsystem, see AN4997: PolarFire FPGA Building a Mi-V Processor Subsystem .

To use the User Cryptoprocessor services in the application, the user needs to download the SoftConsole example project firmware from the GitHub, which also contains the pre-compiled PolarFire Crypto CAL library. The User Crypto CAL folder contains config_user.h file for driver configuration. In the config_user.h file, define the PKX0_BASE macro as the base address of the User Cryptoprocessor, according to the Libero design.

Important: To access the source code of the PolarFire User Crypto CAL library, the user can refer to the Steps to Access PolarFire Security CAL and Documentation section.
Figure 4-7. User Crypto CAL Driver

For both debug and release configurations, browse and add the config_user.h file to GNU RISC-V Cross C Compiler > Preprocessor, as shown in the following figure.

Figure 4-8. CALCONFIGH

The following figure shows the intended directory structure for a project based on MIV_RV32, using SoftConsole.

Figure 4-9. SoftConsole Project Directory Structure

The UART base address, SPI base address, GPIO base address, System Services base address, and system clock frequency are provided in the fpga_design_config.h file.

Figure 4-10. Peripheral Base Address