We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 11744

CORE Generator - Hints for creating COE files for memory cores (Block Memory, Dist Memory, ROM, RAM, etc.)


This Answer Record contains hints for creating COE files.


For information regarding the correct format of a ".coe" file, please refer to the specific core's data sheet, or see the example ".coe" files in:
where <XILINX> is the location in which Xilinx Implementation software has been installed.
Q. What is the correct way to add comment lines in the ".coe" file for CORE Generator?
A. The comments in the ".coe" file should be preceded by a semi-colon (";"). CORE Generator ignores everything in the line that is preceded by ";".
Q. As address locations are not specified in the ".coe" file, how do I know which location is first?
A. The data in the COE files are read from top to bottom, with location 0 at the top and moving down to depth-1.
Use Memory Editor:
In ISE 10.1.03, Memory Editor can be accessed from the CORE Generator interface by selecting Tools -> Memory Editor.
In ISE 11.1 and later, Memory Editor can be accessed from a script file. Use mem_edit.bat (Windows platforms) or mem_edit (Linux platforms). This script is available in the $XILINX/bin/&ltOS&gt directory.
The Memory Editor can be used to create COE files in two ways:
  1. Enter your memory data values directly into the Memory Editor GUI and then select File -> Generate -> COE files(s) to create the COE files.
  2. Enter your memory data into Excel (use whatever formulas you need there), export to CSV format, and then Import the CSV into Memory Editor (File -> Import -> CSV file). When a CSV file is imported, Memory Editor prompts you to specify the Memory Depth, Word Width, Data and Address Radix, and Start Address.

After the CSV file has been imported, you should inspect the Memory Content window for accuracy, and then select File -> Generate -> COE files(s) to create the COE files.
AR# 11744
Date 12/15/2012
Status Active
Type General Article
  • ISE - 8.1i
  • ISE - 9.1i
  • ISE - 10.1
  • More
  • ISE Design Suite - 11.1
  • ISE Design Suite - 12.1
  • ISE Design Suite - 13.1
  • Less