版主
  
主题
帖子
积分10609
阅读权限200
注册时间2008-11-22
最后登录1970-1-1
在线时间 小时
|
COE File Syntax
' O+ p G; U4 J9 b9 RThe following syntax displays the general form for a COE file:" x4 O/ r( b5 ]
Keyword =Value ; Optional Comment+ D% T# U) g* _/ j& e/ q* L
Keyword =Value ; Optional Comment; _" t$ b, L K& e
<Radix_Keyword> =Value ; Optional Comment" J' w+ J& d4 a! r1 x) H( d
{. |/ X Q2 v/ [# ^' A9 T
<Data_Keyword> =Data_Value1, Data_Value2, Data_Value3;
/ _5 d' e2 \4 n* D0 ]( JThe 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.
. e$ ^& X3 {! H6 x7 j2 MCOE File Keywords for Radix Values4 _. s0 y H. K: V* m
Keyword Description
% ?0 Q$ t2 B$ Q. M @RADIX Used for non-memory cores to indicate the radix being used to specify the coefficients of the filter.
/ H: }: w! K) {" \5 [MEMORY_INITIALIZATION_RADIX Used for memory initialization values to specify the radix used.
- W4 o# n. H! K$ x# ? ?- @The following table describes COE file keywords for data values. Keywords are not case sensitive.
0 |; [$ t1 `6 G- s* r& _; o; nCOE File Keywords for Data Values
9 r0 Q; W) q& fKeyword Description
# W+ O, N p& Q7 e0 J' w1 u) ~COEFDATA Used for filters to indicate that the data that follows comprises the coefficients of the filter.0 j( q- G- p7 s* p$ F
MEMORY_INITIALIZATION_VECTOR Used for block and distributed memories.- ?7 |5 E7 a |1 y( A; \
PATTERN Used for Bit Correlator COE files.
1 _: X- K7 @7 b: |+ X: }BRANCH_LENGTH_VECTOR Used in Interleaver COE files.8 V2 R$ ?6 K/ Z8 i: j% m1 J- l2 } f
MEMDATA Obsolete keyword.1 M$ d& r3 V2 j
Note : Any text after a semicolon is treated as a comment and is ignored.
# w' i/ | z4 Y9 t' o/ TOne of the following keywords must be the last keyword specified in the COE file:0 @, l2 E# m- l) r' ^
COEFDATA
; W* b! H& ]5 N& C- N' e) k- D MEMORY_INITIALIZATION_VECTOR
1 P" B: V* Q* Z n" f MEMDATA (an obsolete keyword, supported for backward compatibility)
3 c& b) C, h3 B% ~& E) w. HAny other keywords that follow are ignored.
! [! Z; [$ d+ T aYou 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.0 h% ?5 N/ C( \9 Q( \$ q
Below is a selection of the COE files from this area.
6 ?& E% b! t- U1 f5 K6 l5 W1 [: n******************************************************************% e. r3 c- ~- z, ^+ C+ Y
************* Example of Virtex Bit Correlator.COE *************/ |1 n. H7 V% U+ S. C3 [# F
******************************************************************* {9 R) O; c" v2 |2 @
; Sample .COE coefficient file for v2.0 and later / v3 c3 k0 c/ a, U+ G
; versions of the Bit Correlator core.+ T- J7 d) F% B K# G
;
6 a9 F0 v) Z' }6 M; In this core, a COE file is used to specify the value 9 t( F$ W3 z* U& M; g6 p
; of the bit mask when the Pattern Mask option is selected.
% x- C# E1 b2 `' L0 u r. ?& e4 |;. q3 `, l3 ?! K9 p' f
; Specifications:
' m5 X: z# h3 i! W( v, n8 X;. |! a" D5 K( z$ q* y U; P/ I
; - 19 taps, hexadecimal coefficients
) E9 C) H. \, }4 w" L; - Serial input data
8 m# X, p9 z! _6 {;% w, s2 E! C( I5 E- _8 j
; Please refer to the datasheet for this core for more! e& ^1 @3 M: `. e0 J) W2 R
; details on using the Mask option.
) L- J4 O1 y% i5 v6 X' Hradix = 16;
/ d* H3 G2 K( K" M1 \pattern = 3 0 3 1 0 1 1 3 0 2 2 2 3 0 1 1 3 0 3;2 M; X6 s* K* @* H
******************************************************************
" k( K, \" G) U7 d' x3 Q1 D********* Example of Dual Port Block Memory .COE file **********& e$ i7 E& Y! {( L8 [# \0 g# i2 I
******************************************************************1 T2 r2 A" T8 C) d, L: \* i& C
; Sample memory initialization file for Dual Port Block Memory,3 ` ]3 @2 X$ U# g$ |# J' v" R6 U% R
; v3.0 or later.* A W7 m3 r- L# k. U
;
D9 ?6 l" r0 k; This .COE file specifies the contents for a block memory! [% a0 r' x* a% n
; of depth=16, and width=4. In this case, values are specified$ ~* g/ L2 S5 k4 x
; in hexadecimal format.
9 u1 S5 h+ L) E4 b5 n4 `" ememory_initialization_radix=2;
. Z1 m+ v/ O4 N5 t' Umemory_initialization_vector=
# k, _! p9 N+ S3 `+ a2 }1111,
3 D3 S1 @7 O$ h8 i4 [) S; l- t& G9 {1111,( P. i! m& W8 v4 J4 O% z
1111,
0 e) ^- n2 I' v* w3 N& P1111,$ ?1 K5 E3 s9 ^2 R
1111,, Q" y8 |, r8 g
0000,/ J' W4 C6 @; `4 e0 d9 g
0101,' z$ z6 a5 H: ~5 ] ]
0011,+ n/ B) t- f {, A9 z$ u
0000,
C' p9 f3 f: l/ ?6 A& b1111,
, L, e% d; g+ E% X. }9 A1111,+ u5 X# ]+ l7 N: j
1111,
4 f" q9 A+ Q; R/ Q" V* X3 F, ?! E1111,
- O5 ~& l b5 g8 R" i1111,
% `) L/ a+ S9 s& L1111,/ f! e ~1 p1 f+ O9 V( q. p+ a
1111;9 \$ P! f6 p& b* [0 w
******************************************************************1 f" s* F1 z/ `1 P% _/ k! i7 d
******** Example of Single Port Block Memory .COE file *********
7 ^5 [. K$ l) r( U****************************************************************** e% S# h% o! J. N! t
; Sample memory initialization file for Single Port Block Memory, ' y( S ~ \8 g l$ v3 J6 {. {
; v3.0 or later.: [! }* T b% D
;
G, o8 w( \8 @+ _( ? r; This .COE file specifies initialization values for a block
/ U3 R9 O& ~9 V3 }; memory of depth=16, and width=8. In this case, values are
" D8 `/ Q" P8 o) K! w+ h; specified in hexadecimal format.
' T! Q& z& X( Y, \ E% }memory_initialization_radix=16;
% u: w* Q, [: J1 s& z6 u, L4 {memory_initialization_vector=) O+ k- X: Q+ m4 S2 c& j+ {
ff,
, Y: v0 |/ r& b0 uab,
, ?* a; Z( i. Of0,! N7 }* ?8 M Y* f8 d) E2 v U! a
11,& ?& k) W7 v- b5 S" K r
11,- V& B# @: B" _# w
00,
m+ n! y5 x* T9 K( j01,
$ t# Q8 l. H6 `# X% a/ U: H1 N+ yaa,
* T# B0 j! n3 e* ?5 Sbb,
; o! |& s/ i V/ p% dcc,3 B" B0 w8 y7 ^1 N% S) C
dd,% L! b5 U/ x8 L( l6 U. J
ef,
4 g( p3 B6 B2 I5 D7 Tee," S. a4 J4 a6 ^5 }: c7 d
ff,
# [8 ?) \) R* k8 S00,
0 U2 }4 L" p/ @ff;3 H3 D" ~3 k1 o5 i3 P. a
******************************************************************
' U5 E) @4 i. ^8 n1 z8 V************ Example of Distributed Memory .COE file ***********7 M2 V3 C: E) b
******************************************************************3 o" p+ ?/ v1 M1 t5 i
; Sample memory initialization file for Distributed Memory v2.0 and " B* q7 K+ O' f* Z
; later.
: K& q ?+ v, N; |- G% y# `9 Z4 @; ( l/ C" W: F$ D/ S+ j
; This .COE file is NOT compatible with v1.0 of Distributed Memory Core., w+ H; u9 V4 T( I
; # h' r0 K+ M4 N& U5 r
; The example specifies initialization values for a memory of depth= 32, 2 T' v5 d# [! {1 S5 H' L" k
; and width=16. In this case, values are specified in hexadecimal
& j$ ^. W/ q5 Z" N/ j; format.
: b! ~( t# w+ I+ l, L4 ]memory_initialization_radix = 16;* {8 e6 }. K0 S
memory_initialization_vector = 23f4 0721 11ff ABe1 0001 1 0A 04 w d' W, f% ? a8 ?
23f4 0721 11ff ABe1 0001 1 0A 06 H. {: J) ^" E5 D) Q7 ?& u1 o& A: e
23f4 721 11ff ABe1 0001 1 A 0
3 n, s1 v0 l, H+ [4 O! { 23f4 721 11ff ABe1 0001 1 A 0;. B3 T7 m& P3 t9 g- O/ K
******************************************************************
) P3 _9 O9 i+ e8 J****** Example of Distributed Arithmetic FIR Filter .COE file ***6 H" a6 \+ e7 ]2 W: x9 D$ u
******************************************************************- h. Y" J/ _, v0 K& o& |
; Example of a Distributed Arithmetic (DA) FIR Filter .COE file
9 g( B; }0 L$ M; with hex coefficients, 8 symmetrical taps, and 12-bit
6 B1 l0 X7 c6 \' ?6 S; coefficients.2 B% \! y5 H/ l1 m4 ~* M
;! b$ l, t" [! o. [$ Y) j5 k7 v
; Compatible with all versions of the Distributed Arithmetic+ ?# M7 J' R( z. w' U, I5 C! {
; FIR Filter which supports Virtex and Spartan
3 I7 H" @# [3 M- l, Y; LRadix = 16;7 m/ b; n, j7 l. w
CoefData= 346, EDA, 0D6, F91, F91, 0D6, EDA, 346;
5 ?- e2 Q( S; k$ k
, ?! Z e7 U4 G5 Y$ e7 f8 D; B/ K2 E$ y2 l
https://www.xilinx.com/support/d ... coe_file_syntax.htm |
|