Using XPM Memory in Vivado - 2023.2 English

UpdateMEM User Guide (UG1580)

Document ID
UG1580
Release Date
2023-11-01
Version
2023.2 English

To use XPM Memory in Vivado you need to create design sources for the XPM memory. Follow the following steps to create XPM memory.

  1. Launch Vivado and create a Project.
  2. In the Sources window, right-click Design Sources, and select Add Sources from the popup menu.

  3. In the Add or Create Design Sources page, click Create File.

  4. In the Create Source File dialog box, specify the HDL language of your choice from the File type drop-down menu, and type a name for the memory block being created in the File name field.
  5. Keep the File location to its default value <Local to Project>.
  6. Click OK as shown in the following figure.

  7. In the Add or Create Design Sources page, click Finish.

  8. The Define Module dialog box opens. Click Cancel to dismiss the dialog box.
  9. The Define Module dialog box asks to confirm that you indeed do not want to create the template for the HDL file.
  10. Click Yes.

    This example copies a pre-existing XPRM template in the next steps into the HDL file.

  11. You can see the newly created Verilog file in the Sources window.

  12. In the Flow Navigator, under Project Manager, click Language Templates.

  13. The Language Template dialog box opens. In the Search field type xpm and select the template for the appropriate HDL code (VHDL/Verilog), shown in the following figure.

  14. Cut and paste the template for the Single Port RAM memory and add the instantiation template to the HDL file. Complete the definition of the HDL file by adding the appropriate entity and/or module definition. Set the USE_MEM_INIT_MMI parameter in the instantiation to 1.
  15. Integrate your XPM memory block with the rest of the design. You can use the IP Integrator tool to integrate the XPM memory as a RTL module.

  16. Set the appropriate depth of the memory instantiated in the Address Editor.

  17. Generate output products, synthesize, implement, and create the bitstream for the design.
  18. If you have a mem file, you can use that to populate the initialization strings of the XPM memory using the following updatemem command as an example:
    updatemem -meminfo <mmi_file_name>.mmi -data <mem_file_name>.mem -bit <bit file 
    name>.bit -proc <path to xpm memory instance> -out <output bit file name>.bit
  19. You can also use the -debug switch to see the init_strings of the XPM memory. Below is an example of using the -debug switch.
    updatemem -debug -meminfo <mmi_file_name>.mmi -data <mem_file_name>.mem -bit <bit 
    file name>.bit -proc <path to xpm memory instance> -out <output bit file name>.bit > 
    dmp.txt<