一乐电子

 找回密码
 请使用微信账号登录和注册会员

QQ登录

只需一步,快速开始

微信扫码登录

手机号码,快捷登录

手机号码,快捷登录

搜索
查看: 6654|回复: 0

coe file syntax

[复制链接]
发表于 2019-4-13 21:08 | 显示全部楼层 |阅读模式
COE File Syntax/ f. X. ?, s0 q  C; j+ n
The following syntax displays the general form for a COE file:+ t4 |. p, @' @; \2 e, ~0 p5 @
Keyword =Value ; Optional Comment. {& o6 U, v& c0 l: H9 B4 u0 n
Keyword =Value ; Optional Comment
7 S8 K, w2 B2 Z9 [<Radix_Keyword> =Value ; Optional Comment
0 o8 i+ e  D  \" f* j
$ D& X6 \8 ]/ V" p( U7 X<Data_Keyword> =Data_Value1, Data_Value2, Data_Value3;( r& N  c* m3 g8 n! X% ^
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.( u* ~* o* j6 ]* Q
COE File Keywords for Radix Values+ H  J; Z$ J5 X0 S$ W: ]; Q  D8 }
Keyword        Description- W: Z3 d6 J& [" M
RADIX        Used for non-memory cores to indicate the radix being used to specify the coefficients of the filter.
4 d* o7 |/ `. X; `3 dMEMORY_INITIALIZATION_RADIX        Used for memory initialization values to specify the radix used.& z/ O) t" k" Q0 P
The following table describes COE file keywords for data values. Keywords are not case sensitive.
5 L) v! A2 q; L9 CCOE File Keywords for Data Values
. K- I8 t# p1 l5 F+ c. c+ h' y; TKeyword        Description  H4 B. r$ i9 c+ Z8 i) J6 T9 |
COEFDATA        Used for filters to indicate that the data that follows comprises the coefficients of the filter.. E( g$ a: z) d8 P8 y% V
MEMORY_INITIALIZATION_VECTOR        Used for block and distributed memories.
, I7 j+ E0 `  a6 `0 P, B9 fPATTERN        Used for Bit Correlator COE files.
9 c( I1 k: H( \* v3 M7 jBRANCH_LENGTH_VECTOR        Used in Interleaver COE files.
. p( M$ d. B0 u+ k# Y( r( UMEMDATA        Obsolete keyword.
+ ]5 e& X  i2 H0 L' pNote :  Any text after a semicolon is treated as a comment and is ignored.) h7 K  j0 m# R" l6 |* i) a' v
One of the following keywords must be the last keyword specified in the COE file:
8 A6 k/ a6 X: m, x% q: T7 f! _ COEFDATA
# T- Q5 Z4 d; m8 ~) S5 {- \1 W MEMORY_INITIALIZATION_VECTOR
& H# Y% K5 d+ n MEMDATA (an obsolete keyword, supported for backward compatibility)6 N. R' q% f6 b* P0 O* ?/ J
Any other keywords that follow are ignored.9 Y" {% }" W0 _; \" |# c
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./ r( S8 u8 }  E( I, r" h
Below is a selection of the COE files from this area.
+ s! d: U$ W2 n. p8 w+ d******************************************************************( ]6 E0 w8 h( {' _
*************  Example of Virtex Bit Correlator.COE  *************
* s, B0 {; b2 n) H******************************************************************
# D& @7 X4 \7 A4 z  z0 ?; Sample .COE coefficient file for v2.0 and later 4 r, {% k; y+ y
; versions of the Bit Correlator core.# [! i1 w& O  m& C2 A. p9 f
;' e7 d/ Y! [/ f- g7 w
; In this core, a COE file is used to specify the value
3 m; d+ M- E1 `& e5 l' `; of the bit mask when the Pattern Mask option is selected.( S* P2 z& B7 I$ X! Y
;) {/ A, z9 Z4 V) H3 z
; Specifications:0 A8 q( {; @. o; o& G
;
. k  h0 @/ j4 U1 d( T0 D& h1 ^; - 19 taps, hexadecimal coefficients& X: O  r9 I2 L2 W( J' a& H. b
; - Serial input data
6 z/ D) z3 i; t3 i! {5 ]# I4 a;1 T( `! y% A: I, h
; Please refer to the datasheet for this core for more
1 H- z  v0 N6 @: P) D" T' {+ D; details on using the Mask option.
5 T6 m7 H7 K. M+ o  i0 _. Iradix = 16;7 ^$ B% K; g; Q5 M" [
pattern = 3 0 3 1 0 1 1 3 0 2 2 2 3 0 1 1 3 0 3;
4 C5 r% m5 Y5 F8 Q! q! b******************************************************************
$ L" s" ?; Y) I*********  Example of Dual Port Block Memory .COE file  **********
9 B) W1 q# t* }5 a******************************************************************
/ x2 V' d% G. q+ m3 h; Sample memory initialization file for Dual Port Block Memory,9 b! }7 U' T% v8 C# i, s( G
; v3.0 or later.: z% ?. L' o& J2 b/ q
;8 n) x; P) e9 X! {) Y4 G4 p4 i
; This .COE file specifies the contents for a block memory
, P6 o+ {4 z8 |; of depth=16, and width=4.  In this case, values are specified
/ E8 u) l% c1 ?8 F7 L6 w$ v* w; in hexadecimal format.
' l6 e( Z9 z& W  x" `memory_initialization_radix=2;2 O0 y' h8 T! h3 m: j) U  G  E4 p
memory_initialization_vector=+ L" h6 |' w+ y3 K0 q% U
1111,# T4 N2 }7 T0 k& C* O& N
1111,
3 C5 N3 z! H3 Z  K. {1 r: @/ R+ b1111,6 y% \: ^9 p- k2 I1 r6 l! G# ?
1111,$ d+ O7 ?- k& M) k3 V
1111,( `7 o9 Q4 U( G1 |( k: Y1 h* l
0000,' l4 _, q& N0 d. l
0101,) o+ O' l9 n" A; q
0011,0 d& _* S- D( n. L$ k/ ]4 _
0000,6 B' h+ n5 b9 [+ t
1111,4 T+ K% o* D4 Y+ _( Q
1111,
7 c) t; p9 D9 x; t' r# j% ~! L1111,
) A6 y$ Z2 I: b4 `( ]& N0 Q1111,  V1 a2 G) Z0 z  L( N  N
1111,
) V4 ?- K! N# z  `, E7 u, B) O8 \4 D% A1111,* R9 H+ ]  F' I) q3 b/ s3 Z: h
1111;: T5 Z( N  q9 ?- j  P/ l9 y
******************************************************************
5 u1 V) ~, o8 n5 f- {* |********  Example of Single Port Block Memory .COE file  *********
8 v; J* Q9 B$ K* [******************************************************************
3 H7 \3 C5 O8 o; I2 J' f; Sample memory initialization file for Single Port Block Memory, $ r7 h- q* O& L
; v3.0 or later.2 z8 L# i; @! @6 M* G
;
8 d/ W. c% R3 r% {; This .COE file specifies initialization values for a block 2 p' @! L% E) ~/ ]
; memory of depth=16, and width=8. In this case, values are 4 B9 i$ J- _" n  W- g
; specified in hexadecimal format.
! t9 q1 k- v9 T) I6 Zmemory_initialization_radix=16;* {1 }! ]' A2 k4 d9 T2 S
memory_initialization_vector=
' ~9 X5 w4 V6 T4 e! Cff,0 w6 D# _! {% L
ab,) f3 l8 }& x/ J2 l9 z7 x" m* s
f0,
* Z" F( C  x, f; y- c* C3 l. R11,
: S. F! f; j/ s, x" o% |4 b11,/ C. Y- C/ p4 S& G1 q0 M; `* A
00,
' q& ?' {/ z2 ^( |- A01,
( s2 U( X# v, n" }aa,9 u" N& M- \# w. S2 g
bb,7 g" z7 I- A) z# H7 |& [
cc,% n* _- j& b! {! C
dd,( M2 c8 ~7 E. T2 q% k
ef,
* _: e5 v+ }7 ~3 ?( \+ l7 hee,
4 [: [' U1 i4 S1 [2 sff,5 L( \) P9 R; A. a6 V7 a$ k3 ?
00,* X4 p& M& g! u5 i
ff;1 G2 ^: t) q* T8 v, w6 I0 I- d
******************************************************************
! |, p- @- S7 C5 E5 U+ q: ?; C2 c************  Example of Distributed Memory .COE file  ***********8 c7 M) s/ ^. R
******************************************************************' J7 d& j1 o, J7 d5 F/ P
; Sample memory initialization file for Distributed Memory v2.0 and 2 E' i( b" C  n$ V& S/ x
; later.
2 b# K: \$ z( T* J; L;
) f0 C9 o: @, J& \4 [/ i; This .COE file is NOT compatible with v1.0 of Distributed Memory Core.
3 e# d: h! ]4 a) e3 }- n;
+ c: C3 ?9 b7 F; The example specifies initialization values for a memory of depth= 32, 0 f! Y9 e. f3 Z
; and width=16. In this case, values are specified in hexadecimal, O8 Q3 ~! _$ e2 o4 p& Z
; format.6 M3 f. }* A! o  Z
memory_initialization_radix = 16;. B6 P2 v8 t3 x' l0 t: o/ \
memory_initialization_vector = 23f4 0721 11ff ABe1 0001 1 0A 0
0 C: x5 ]: o' u3 q' Q 23f4 0721 11ff ABe1 0001 1 0A 0# t% Z' g6 e) H+ W9 r
23f4 721 11ff ABe1 0001 1 A 0
4 J, |3 K/ S' D* k+ D9 b! x 23f4 721 11ff ABe1 0001 1 A 0;
, ~  d, t0 f" g  P* m0 w2 }******************************************************************3 Q- I' U' n7 M% `0 _- x
******  Example of Distributed Arithmetic FIR Filter .COE file ***
  I0 O& u$ o  V  ~* @******************************************************************
( C+ u' z1 d! }( x( t, A7 b; Example of a Distributed Arithmetic (DA) FIR Filter .COE file
# O# c$ }* f% W7 x  N2 w* S; with hex coefficients, 8 symmetrical taps, and 12-bit0 I( ~- {1 ?- S
; coefficients.8 b2 `! X# R+ F# a
;' n: ?; `* i& ~2 ?- G- M0 S
; Compatible with all versions of the Distributed Arithmetic2 I' u' U2 b2 }: n8 w' o: p& r) i
; FIR Filter which supports Virtex and Spartan/ J# n: x/ c" D4 T- u
Radix = 16;
+ K# o2 I+ w- C7 c; o3 ^CoefData= 346, EDA, 0D6, F91, F91, 0D6, EDA, 346;. I) y' d/ z/ }% v; r
( [; e- d0 ]& x$ }! E

7 C5 b. |3 _# {- Lhttps://www.xilinx.com/support/d ... coe_file_syntax.htm

本版积分规则

QQ|一淘宝店|手机版|商店|一乐电子 ( 粤ICP备09076165号 ) 公安备案粤公网安备 44522102000183号

GMT+8, 2026-1-11 17:23 , Processed in 0.029902 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表