一乐电子

一乐电子百科

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

QQ登录

只需一步,快速开始

快捷登录

手机号码,快捷登录

搜索
查看: 3233|回复: 0
收起左侧

coe file syntax

[复制链接]
发表于 2019-4-13 21:08 | 显示全部楼层 |阅读模式
COE File Syntax
: G$ P- x& C0 z4 u# c* @The following syntax displays the general form for a COE file:7 X+ v( f4 k( t. F" I1 L% ?
Keyword =Value ; Optional Comment
& ]7 D2 J5 V; I6 G5 ZKeyword =Value ; Optional Comment
; x, K! l3 o+ o! y& H<Radix_Keyword> =Value ; Optional Comment
5 Q3 `( ]  w8 j1 [* S& {# C . z+ s* o+ J$ Y- |7 D3 c! I
<Data_Keyword> =Data_Value1, Data_Value2, Data_Value3;: `1 [' Y- c( H- u
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.1 E0 m: O' I' e" h
COE File Keywords for Radix Values/ P/ H" }( {( B" `/ l( P
Keyword        Description
3 p2 x/ Y; h5 q6 E) T/ xRADIX        Used for non-memory cores to indicate the radix being used to specify the coefficients of the filter.3 f/ O$ R4 s6 p* Q4 k! u( a* z
MEMORY_INITIALIZATION_RADIX        Used for memory initialization values to specify the radix used.! z( L2 o( g4 J# N3 \( ?
The following table describes COE file keywords for data values. Keywords are not case sensitive.
5 k- N5 T1 T" S9 g, PCOE File Keywords for Data Values
7 K3 f4 x* n) x8 wKeyword        Description
" E9 n7 |+ c/ k0 Q% R8 O: zCOEFDATA        Used for filters to indicate that the data that follows comprises the coefficients of the filter.$ d+ R; W' |- v# M! @2 F
MEMORY_INITIALIZATION_VECTOR        Used for block and distributed memories.! c+ e# ^8 C3 i2 P8 ~8 g  _
PATTERN        Used for Bit Correlator COE files.
" L; O  b4 D# W, a& G, gBRANCH_LENGTH_VECTOR        Used in Interleaver COE files.1 W  D& y; [7 T* t5 ^
MEMDATA        Obsolete keyword.8 H' r. H, `" W
Note :  Any text after a semicolon is treated as a comment and is ignored.! t' G$ P3 Z) y1 U/ k
One of the following keywords must be the last keyword specified in the COE file:6 D1 w' \: R2 `) X& L
COEFDATA
8 B1 }) u) t% I  ]9 \# v MEMORY_INITIALIZATION_VECTOR
( _4 F1 e& M; |) V MEMDATA (an obsolete keyword, supported for backward compatibility)
5 B8 d9 e: \- v1 \- pAny other keywords that follow are ignored.2 d% a6 y- K4 k! O% E
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./ f& n; P6 ^: e0 d  W& o
Below is a selection of the COE files from this area.1 }$ E; L4 F  b- s( r) ?
******************************************************************4 F4 ~! C, V$ d/ C) q. r, T
*************  Example of Virtex Bit Correlator.COE  *************
4 t6 I" e  j0 r* D: e$ p3 Q: N******************************************************************
+ w; J/ l5 ]  l  i0 g; Sample .COE coefficient file for v2.0 and later 6 f/ i. q% {3 l+ D$ y% p6 k+ e* N
; versions of the Bit Correlator core.  u  }- G, W6 W# \: h
;1 I) n) x: q6 R: Q- W4 z( @
; In this core, a COE file is used to specify the value
+ K  s% D! v  B% r+ h1 |3 Z4 [9 e; of the bit mask when the Pattern Mask option is selected.# m3 C1 B6 `) m$ B; M8 J) ~1 `
;% c& j, t8 g( f% ]+ L; q
; Specifications:8 S& Y' {1 \; M/ c
;/ s. P- t7 `5 `& b
; - 19 taps, hexadecimal coefficients, v* \6 y+ i7 D. b  |' D. k4 ]0 M
; - Serial input data; c8 L, Q8 |; l& l6 M! t
;
- Q+ }4 c) M7 A1 g" v- E; Please refer to the datasheet for this core for more, m! K' [  A* H; e# J2 j
; details on using the Mask option.- W0 {" ]' [; [! g  v# B0 C& T$ _
radix = 16;$ X$ ]9 y! e0 m: l7 f
pattern = 3 0 3 1 0 1 1 3 0 2 2 2 3 0 1 1 3 0 3;
1 R& b+ A+ W+ @% Z9 T******************************************************************
4 K' v0 c7 e' |*********  Example of Dual Port Block Memory .COE file  **********/ `' d% Y' j) i
******************************************************************8 {1 \! L- s& V% l3 D
; Sample memory initialization file for Dual Port Block Memory,
' e) z) p9 P3 r* h; v3.0 or later.
: n( p) d  A  A0 ^;% h8 A9 _. j4 R' h+ d- ?+ D
; This .COE file specifies the contents for a block memory
! P, f$ D7 E) W6 o; of depth=16, and width=4.  In this case, values are specified
# u, l1 M/ a/ R) {, O$ c1 [" a; in hexadecimal format.
+ A+ ~$ t5 ?& omemory_initialization_radix=2;6 I8 s2 a; ?& h$ I$ k
memory_initialization_vector=; _; Z6 u* n& I  t, F
1111,2 \+ T" w+ x4 F, U2 k
1111,* B5 s- n$ L# Y7 Y' G9 j5 o
1111,+ n" _+ r9 S7 f" P# o
1111,3 k. \! o5 Q5 q
1111,
8 Q1 @5 Y. v; ]5 C. h, \0000,
% g9 e( Y2 \: b5 Q3 c. l' a( X0101,
; Y7 j* L9 D/ e& ]" p: n1 r3 `0011,
# ~7 O8 X" G( E8 i3 ^0000,$ \1 x) L, ~5 a) t/ f
1111,
- i8 A6 Z) B1 R* G1111,: ]: m% D% v" q+ b
1111,% S2 l8 F4 G+ n; l: d  u+ V6 x8 e
1111,
2 O# o" n4 r- m1111,! M/ w6 Q7 O+ a4 T! j
1111,
/ k5 G( r- Q( L9 S& z8 T) v1111;
2 J( G1 [% ]. V******************************************************************/ u& u2 m  ~) v1 S) T5 B
********  Example of Single Port Block Memory .COE file  *********
" J2 d4 s" Z8 ~$ h9 f, e+ o6 @5 C******************************************************************
$ W' t* o- p! K/ H, d3 o! L; Sample memory initialization file for Single Port Block Memory,
. K" j8 M' W# g. N( q; N; v3.0 or later.
: e& d) P: F% R+ e5 }8 X; c' {;
" F' w0 t1 [0 ?! b; This .COE file specifies initialization values for a block
( R; o/ b+ H; i/ s( _0 z; memory of depth=16, and width=8. In this case, values are ( b" o9 T# X) q9 |$ t: V
; specified in hexadecimal format.$ M  |/ p, y4 C4 C/ R$ A( y* _& }
memory_initialization_radix=16;
- B# W2 V0 y7 g& v- rmemory_initialization_vector=
% [. a& h+ r' @$ R0 q6 O0 @; vff,( g) [2 h9 L" E! E# k* B. t
ab,8 @9 R' J4 _# W, k9 ~
f0,! f3 K6 f% q6 g* q
11,7 a& Q8 ?: x. K+ ^
11,
5 w4 \9 w9 U1 C1 e4 Z- }00,5 _; T/ i8 A, s9 |/ e
01,
: I: J$ j; w. o2 E: i6 ~: J; F7 paa,
% I5 A2 T8 Y, Q9 q3 E3 g! n* \bb,$ [& l' d9 g$ k, Y
cc,$ c% R+ F" _5 g2 z0 t" f+ `* h' Q
dd,* C0 m9 \( |  l& i8 j% P0 \( k/ @
ef,) C& H9 q4 n6 }
ee,( I. e3 n7 a1 \+ o# \. V: D1 j2 P
ff,
. `- Z; l: `+ _: \) X00,
7 |; U% _2 l9 g  b3 \& wff;
# M6 v$ e0 M2 t3 \******************************************************************
$ b  C2 r3 d. M* G************  Example of Distributed Memory .COE file  ***********
  U* Z6 ?1 K8 x' s******************************************************************
' T9 t3 |& R6 W3 [4 V( ]; Sample memory initialization file for Distributed Memory v2.0 and 8 Q" U1 G" E) u8 \7 y
; later.% @( A  ^  W' P
;
# j2 e% G% a3 y" d' i2 Y. ]; This .COE file is NOT compatible with v1.0 of Distributed Memory Core.* \3 s( Z% b" F7 \  e
;
0 r# h% L% \2 B; The example specifies initialization values for a memory of depth= 32, # c0 \1 s+ j# x; b+ P: V
; and width=16. In this case, values are specified in hexadecimal! G( r/ i! W7 v% C, m" G
; format.
4 ^  Q% `9 B. pmemory_initialization_radix = 16;6 g7 O2 {% d( [) W
memory_initialization_vector = 23f4 0721 11ff ABe1 0001 1 0A 0
, d6 ^4 z$ Z* g1 K 23f4 0721 11ff ABe1 0001 1 0A 0! d9 {5 B: f- Y% `" ^
23f4 721 11ff ABe1 0001 1 A 05 N9 `  K5 m5 q% a
23f4 721 11ff ABe1 0001 1 A 0;0 o9 h" F; q( u: W) _& B5 W) Q
******************************************************************, }$ @/ N; |3 U0 D' h- y8 c
******  Example of Distributed Arithmetic FIR Filter .COE file ***3 i) t- i. U8 z, @
******************************************************************
$ j) y' T+ t: e+ P* ?6 s; Example of a Distributed Arithmetic (DA) FIR Filter .COE file
- q* w' ]7 A- I" `% `3 T, X; with hex coefficients, 8 symmetrical taps, and 12-bit
' P+ ]1 m% C: o2 v$ s/ K" c" J8 k; coefficients.! H9 i/ G* C1 |3 n1 L* s% x
;
. E0 F) C! N: c; Compatible with all versions of the Distributed Arithmetic& n/ ?. y3 J4 S6 [3 s' j" l
; FIR Filter which supports Virtex and Spartan
: i1 G4 ~1 {1 u' v, J+ R% ORadix = 16;) s/ H$ \: c5 t% Y+ B
CoefData= 346, EDA, 0D6, F91, F91, 0D6, EDA, 346;9 ?% U6 h6 b! y4 X" o

) m" n$ n. [9 h. x) s# Z7 Q: H* f/ u" M( X( Z/ X7 U* v2 a# z
https://www.xilinx.com/support/d ... coe_file_syntax.htm

本版积分规则

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

GMT+8, 2024-5-17 12:25 , Processed in 0.063966 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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