4.4.1 Data Storage in eNVM Using the Libero eNVM Client
The Libero eNVM client creates the eNVM data that the FlashPro software uses to initialize the eNVM during programming. The programmed eNVM can be accessed by the Cortex-M3 processor, High Performance Direct Memory Access (HPDMA), Peripheral Direct Memory Access (PDMA), or the FPGA fabric master connected to the AHB bus matrix.
The following figure shows the initial System Builder window where the required device features can be selected. For more information on how to launch the System Builder and how to use it, see SmartFusion2 System Builder User Guide.
The following steps describe how to generate a programming file with the eNVM client in an application using System Builder.
- Check the MSS On-chip Flash Memory (eNVM) check box under the Device Features tab and leave the other check boxes unchecked. The following figure shows the .
- Click Next to navigate to the Memories tab. The following figure shows the tab.
- Select Data Storage under Available Client
Types and click Add to System.
The following figure shows the Add Data Storage Client dialog box. It supports the following file formats:
- Intel-Hex
- Motorola-S
- Microsemi-Hex
- Microsemi-Binary
- Create the memory file in
any one of the above formats with the executable code or data. Memory file
can be created for the code using the SoftConsole v3.4 or later with the
linker script
production-execute-in-place.ld
. For more information on using the SoftConsole, see SoftConsole Documentation. - Enter the Client name, navigate to the Memory file location, and select it. Give the rest of the parameters according to the requirements and click OK to add the eNVM client. For more information on Use absolute addressing, Use as ROM, and other options, click Help.
- Create the memory file in
any one of the above formats with the executable code or data. Memory file
can be created for the code using the SoftConsole v3.4 or later with the
linker script
The following figure shows the Add Data Storage Client Dialog box.
The eNVM client data is populated in the
. The following figure shows the with two eNVM clients. - Navigate to the
Microcontroller tab in the System Builder and select
AHB Bus Matrix to confirm the remapping of eNVM to the
Cortex-M3 code space. eNVM is remapped to the Cortex-M3 code space, by default. For more
information on eNVM Remap Region Size and Base Address, click
Help and select AHB Bus Matrix to
access the help document, as shown in the following figure. See AC390: SmartFusion2 SoC FPGA – Remapping eNVM, eSRAM, and DDR/SDR SDRAM
Memories Application Note.Important:
- The code executing from eNVM can program the other regions of eNVM memory. Ensure that the code executing region is not overwritten.
- Configure “eNVM Remap Region Size” and “eNVM Remap Base Address (Cortex-M3)” such that the end address of the eNVM remap region is less than 0x00040000. The end address is obtained by adding the eNVM Remap Region Size to the eNVM Remap Base Address. This is applicable to SmartFusion 2 M2S090 and M2S150 devices only.
- If the user design is using the FPGA fabric based master, the
Cortex-M3 processor requires a valid program in eNVM (from eNVM start address
0x60000000) to execute at power-up or Power-on Reset. The valid program can be
a simple user boot code or a simple loop program. You can select a .hex file of
a valid program for eNVM data client using the System
Builder.
The read and write permission options for different masters are available for data and design security enabled devices like M2S050TS only.
For more information on configuring the security options, see SmartFusion2 MSS Security Configuration User Guide.
- Navigate to the Security tab to select the read and write access permissions of eNVM including protected regions for different masters, as shown in the following figure.
- Navigate to the Memory Map tab giving the required data in the rest of the System Builder tabs and click Finish to proceed with creating the MSS Subsystem.
- Do required Pin connections and Save the project. Generate the SmartDesign in Libero by clicking Generate Component.
- Double click Run PROGRAM Action in the Libero Design Flow window to program the SmartFusion 2 device to initialize the eNVM with the memory file.
- The MSS eNVM supports full behavioral simulation models. For information on how to simulate the eNVM operations, see SmartFusion2 MSS Embedded Nonvolatile Memory (eNVM) Simulation User Guide.
- For information on how to access the eNVM using FPGA fabric logic, see AC429: SmartFusion2 and IGLOO2 - Accessing eNVM and eSRAM from FPGA Fabric Application Note.
- For more information on how to add multiple eNVM data storage clients using the Libero SoC software, see AC426: Implementing Production Release Mode Programming for SmartFusion2 Application Note.