CORE Generator
COE File Syntax
The following syntax displays the general form for a COE file:
Keyword =Value ; Optional Comment
Keyword =Value ; Optional Comment
<Radix_Keyword> =Value ; Optional Comment
 
<Data_Keyword> =Data_Value1, Data_Value2, Data_Value3;
The following table describes COE file keywords for specifying radix values for data. Keywords are not case sensitive. For information on the specific keywords required for a core, please refer to that core’s data sheet.
COE File Keywords for Radix Values
KeywordDescription
RADIXUsed for non-memory cores to indicate the radix being used to specify the coefficients of the filter.
MEMORY_INITIALIZATION_RADIXUsed for memory initialization values to specify the radix used.
The following table describes COE file keywords for data values. Keywords are not case sensitive.
COE File Keywords for Data Values
KeywordDescription
COEFDATAUsed for filters to indicate that the data that follows comprises the coefficients of the filter.
MEMORY_INITIALIZATION_VECTORUsed for block and distributed memories.
PATTERNUsed for Bit Correlator COE files.
BRANCH_LENGTH_VECTORUsed in Interleaver COE files.
MEMDATAObsolete keyword.
Note :  Any text after a semicolon is treated as a comment and is ignored.
One of the following keywords must be the last keyword specified in the COE file:
  •  COEFDATA
  •  MEMORY_INITIALIZATION_VECTOR
  •  MEMDATA (an obsolete keyword, supported for backward compatibility)
Any other keywords that follow are ignored.
You can find examples of COE files for the Distributed Arithmetic FIR Filter, Bit Correlator, Digital Down Converter, RAM-based Shift Register, and Distributed Memory in the $XILINX/coregen/data directory.
Below is a selection of the COE files from this area.
******************************************************************
*************  Example of Virtex Bit Correlator.COE  *************
******************************************************************
; Sample .COE coefficient file for v2.0 and later 
; versions of the Bit Correlator core.
;
; In this core, a COE file is used to specify the value 
; of the bit mask when the Pattern Mask option is selected.
;
; Specifications:
;
; - 19 taps, hexadecimal coefficients
; - Serial input data
;
; Please refer to the datasheet for this core for more
; details on using the Mask option.
radix = 16;
pattern = 3 0 3 1 0 1 1 3 0 2 2 2 3 0 1 1 3 0 3;
******************************************************************
*********  Example of Dual Port Block Memory .COE file  **********
******************************************************************
; Sample memory initialization file for Dual Port Block Memory,
; v3.0 or later.
;
; This .COE file specifies the contents for a block memory
; of depth=16, and width=4.  In this case, values are specified
; in hexadecimal format.
memory_initialization_radix=2;
memory_initialization_vector=
1111,
1111,
1111,
1111,
1111,
0000,
0101,
0011,
0000,
1111,
1111,
1111,
1111,
1111,
1111,
1111;
******************************************************************
********  Example of Single Port Block Memory .COE file  *********
******************************************************************
; Sample memory initialization file for Single Port Block Memory, 
; v3.0 or later.
;
; This .COE file specifies initialization values for a block 
; memory of depth=16, and width=8. In this case, values are 
; specified in hexadecimal format.
memory_initialization_radix=16;
memory_initialization_vector=
ff,
ab,
f0,
11,
11,
00,
01,
aa,
bb,
cc,
dd,
ef,
ee,
ff,
00,
ff;
******************************************************************
************  Example of Distributed Memory .COE file  ***********
******************************************************************
; Sample memory initialization file for Distributed Memory v2.0 and 
; later.
; 
; This .COE file is NOT compatible with v1.0 of Distributed Memory Core.
; 
; The example specifies initialization values for a memory of depth= 32, 
; and width=16. In this case, values are specified in hexadecimal
; format.
memory_initialization_radix = 16;
memory_initialization_vector = 23f4 0721 11ff ABe1 0001 1 0A 0
 23f4 0721 11ff ABe1 0001 1 0A 0
 23f4 721 11ff ABe1 0001 1 A 0
 23f4 721 11ff ABe1 0001 1 A 0;
******************************************************************
******  Example of Distributed Arithmetic FIR Filter .COE file ***
******************************************************************
; Example of a Distributed Arithmetic (DA) FIR Filter .COE file
; with hex coefficients, 8 symmetrical taps, and 12-bit
; coefficients.
;
; Compatible with all versions of the Distributed Arithmetic
; FIR Filter which supports Virtex and Spartan
Radix = 16;
CoefData= 346, EDA, 0D6, F91, F91, 0D6, EDA, 346;
See Also

© Copyright 1995–2009, Xilinx® Inc. All rights reserved.