版主
主题
回帖0
积分10609
阅读权限200
注册时间2008-11-22
最后登录1970-1-1
在线时间 小时
|
COE File Syntax
5 L+ Y( v) l+ n8 f/ `. S7 l+ b, d+ qThe following syntax displays the general form for a COE file:4 c: A8 I/ @( {" [0 B- x" N
Keyword =Value ; Optional Comment
, P1 p# E v/ a2 A6 g. m8 pKeyword =Value ; Optional Comment1 `9 X% N6 r0 A+ o! L4 E" i
<Radix_Keyword> =Value ; Optional Comment( l8 P% s* C( R H+ ]3 d
, L( G5 a! X; u2 _. f3 q
<Data_Keyword> =Data_Value1, Data_Value2, Data_Value3;9 z( W' ^* u$ d! C
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.# Z) s, U/ \- I( A" P' w' G
COE File Keywords for Radix Values
* m# ?3 q" N+ ^3 x0 a+ {0 D% E9 W6 fKeyword Description
' c6 h! w5 Y" b& wRADIX Used for non-memory cores to indicate the radix being used to specify the coefficients of the filter.
3 v& |, G9 C- c* T' RMEMORY_INITIALIZATION_RADIX Used for memory initialization values to specify the radix used.
, Y# p3 Q, g( U3 N% qThe following table describes COE file keywords for data values. Keywords are not case sensitive., `# p* `/ P2 ^' ?: Q
COE File Keywords for Data Values% ]: `/ K2 t ]% D0 L# ?
Keyword Description
% g- @# p/ M: {% ?COEFDATA Used for filters to indicate that the data that follows comprises the coefficients of the filter.3 g$ ?4 B# U6 T) G+ i# B
MEMORY_INITIALIZATION_VECTOR Used for block and distributed memories.1 ~# c2 `- B' E/ R
PATTERN Used for Bit Correlator COE files.$ U. [ C+ ~! f4 L8 C
BRANCH_LENGTH_VECTOR Used in Interleaver COE files.$ ]2 h: d M; v, p
MEMDATA Obsolete keyword.3 _! v, Y$ y y; y. J9 C1 Z
Note : Any text after a semicolon is treated as a comment and is ignored.
# K6 r8 j/ f/ _! ?% L) p3 f! COne of the following keywords must be the last keyword specified in the COE file:
$ g3 K; I, |9 D: A COEFDATA) Z7 D3 l; D5 a& [
MEMORY_INITIALIZATION_VECTOR
3 R4 n" W# [+ S& a# O& Q4 W MEMDATA (an obsolete keyword, supported for backward compatibility) ~: a0 i0 B7 ?4 R. _2 |
Any other keywords that follow are ignored.7 F4 ~: c2 s1 s" `: m$ s
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.+ V H" N4 d+ b3 E7 D# n
Below is a selection of the COE files from this area.* O- J, I) j4 r( A
******************************************************************
6 {( ~& T$ f$ l- h* P( [************* Example of Virtex Bit Correlator.COE *************+ ^+ `4 p/ O9 x; X r( C
******************************************************************
9 w6 ~! g9 k% h3 s# g2 Q u/ r; Sample .COE coefficient file for v2.0 and later - R& S" y- w- l( B) G6 ?) a7 b! _( ^
; versions of the Bit Correlator core.
7 g: Y" z: ?5 k* \3 o# U3 |;
$ k& Z% |2 G0 I( p* f( @1 ?) i; In this core, a COE file is used to specify the value ) B7 H& ]+ D2 v* A8 m
; of the bit mask when the Pattern Mask option is selected., l+ `* s- {) t7 \
;/ ] l6 y/ S# t' e5 j. g6 b
; Specifications:
, R; ?4 R- j; H& D9 a* V;0 o& Z( P" V* S$ o7 L* q! E
; - 19 taps, hexadecimal coefficients
+ l1 d" _% Q: l$ i/ O; - Serial input data
! u' ?7 T. j, p! D. K- w2 v' R;, F, a: Q8 q0 C+ E# w
; Please refer to the datasheet for this core for more
3 z* B U- U2 H" P; details on using the Mask option.
$ r" H4 [ z7 A. h( B' K- ^+ g; r% Pradix = 16;
8 h4 ~! @$ l( b9 `2 Z8 {8 `. y2 r6 upattern = 3 0 3 1 0 1 1 3 0 2 2 2 3 0 1 1 3 0 3;8 d: ^# y$ j) Q3 F4 Z
******************************************************************, x+ A( g! q- Q( X+ [1 e% O( L
********* Example of Dual Port Block Memory .COE file **********5 j* o. X9 ^+ A) \6 S2 H
******************************************************************- ] [. C9 R( V) C( h
; Sample memory initialization file for Dual Port Block Memory,) N w6 I- W" K+ m% B: O6 `- \
; v3.0 or later.
! `0 {) m/ E% Q+ {;
7 x5 ~: f4 ?% w1 q4 A! g; This .COE file specifies the contents for a block memory$ \' q3 k' r1 P/ x
; of depth=16, and width=4. In this case, values are specified
; t {: h' ?3 Q5 G; in hexadecimal format.. F/ n" H* n! \7 v
memory_initialization_radix=2;
% S% J9 G) W4 L% d8 umemory_initialization_vector=
2 [9 p# a5 [1 ?4 a* W, K# z4 R" Y1111," H& i$ f3 w9 G, [; z, i
1111,
% O3 Z! D; x8 R' k1111,
! D- I! G. l4 r1111,9 C# d# H% S. d+ s
1111,
, S: Q# J( ~6 g1 w0000,, H/ m8 T9 S" K$ y: k, T
0101,' U; c7 z9 C" `6 I
0011,
$ ], q4 @/ t! T! r" Q0000,7 ]$ m, ^: t% n9 l9 U( t$ Y# m
1111,
' `3 k& A# |1 k' V3 P1111,+ s: N- {1 |9 |: M @3 A
1111,, R. i6 G6 [% B5 {# Q
1111,
$ F" _2 }, O# b, V+ D1111,
% v* W7 ?& Q: \. g9 w1111,1 K1 X* R5 @' I0 J* ?
1111;
0 }1 Q2 O p! r% d/ A' a4 a3 Q******************************************************************) H5 d- U% Y/ q" G) @' z
******** Example of Single Port Block Memory .COE file *********
/ z3 i5 O5 S8 c) c9 z) K9 N( \" |******************************************************************
, g+ P6 L* K. B+ F& ?! v; Sample memory initialization file for Single Port Block Memory, 6 I/ \- s2 A3 A& |7 Z
; v3.0 or later. [0 \$ o8 i$ b, C& O6 i5 t: E1 f
;
4 C5 m) q/ n i; This .COE file specifies initialization values for a block
& q: L3 u& k" `; H) H' F4 B, i; memory of depth=16, and width=8. In this case, values are
7 C1 u5 {3 ?8 F/ U$ E/ q# Q! ?; specified in hexadecimal format.
. H. I v2 B3 L" H. ?memory_initialization_radix=16;
( d' x1 v7 \0 ^2 B1 Nmemory_initialization_vector=3 u9 P' e+ e4 I
ff,
3 [4 I1 q& @' U" g/ n# j5 S9 Bab,
$ |# k) x+ W. B8 B. Ef0,: j, g+ K# l' l6 L/ j& w- i4 G
11,3 v- o" k# j+ o# x* ~* \) j
11,8 M- a W" i! W: H
00,
+ i, Q! O* n: D/ E01,; E' ^" }: Q1 r" ?, u9 ~, z
aa,
7 a, D( S# B9 q6 ^bb,
4 y& |: p' p' n) k) `$ ]4 [cc,; [; y0 j& a* a1 K7 z) x- j- Q! V
dd,
! ?* j2 X5 c- aef,
( y9 K0 L9 p0 D" see,. o" | ]& D; y4 b: _4 v" |
ff,, ` y; G% U# k1 z
00,$ n: h& U/ e( c- h/ q8 X& p4 b
ff;
$ B0 z8 K. ?- ]$ i, K******************************************************************
* S3 f6 e7 |' P4 g************ Example of Distributed Memory .COE file ***********
! {. C$ W% q3 `# Y; z ~0 p5 v******************************************************************( n! P# e! ~7 \
; Sample memory initialization file for Distributed Memory v2.0 and
4 ^" [) s. T+ q- C% }; later.7 E7 K5 e3 ^/ d+ H+ b( |6 v4 z! S& ~
; ; d# f5 z1 H# X3 H) n
; This .COE file is NOT compatible with v1.0 of Distributed Memory Core.
6 m" n2 Y- G I$ _$ G5 q, r; ) U. T8 Q, A+ `" v
; The example specifies initialization values for a memory of depth= 32, * J n: ^! f6 u& d7 h% P
; and width=16. In this case, values are specified in hexadecimal
# t, D. ]3 a& ~9 J; format.
3 y, Y2 s* r+ a0 _$ {memory_initialization_radix = 16;" M8 X' w" s+ h J( r9 D0 I- Q' ?, A! ^
memory_initialization_vector = 23f4 0721 11ff ABe1 0001 1 0A 03 i( F& N; j( N L( X
23f4 0721 11ff ABe1 0001 1 0A 0( e t. b; R G7 t
23f4 721 11ff ABe1 0001 1 A 03 g. l. z. a- A$ x' `7 D
23f4 721 11ff ABe1 0001 1 A 0;4 i) _; j, z6 H% T6 x
******************************************************************( T& N4 n" _2 d
****** Example of Distributed Arithmetic FIR Filter .COE file ***
6 M# K9 t7 i3 q. D( F" [3 L( Y******************************************************************$ l& g' n/ i5 [5 e8 H* H1 p
; Example of a Distributed Arithmetic (DA) FIR Filter .COE file
! Q0 w0 r( `% {8 I/ R! b3 b, N3 [; with hex coefficients, 8 symmetrical taps, and 12-bit
h5 J1 n2 r% P8 h$ {+ Y) d; coefficients.5 U' o2 v& T1 D4 m* b
;7 }' i/ d/ n- E1 u0 Q3 j+ `
; Compatible with all versions of the Distributed Arithmetic
. J! Z2 F2 I/ [- P/ N; FIR Filter which supports Virtex and Spartan) ]- `; w% q* w8 i
Radix = 16;
5 t" { p+ D4 @( e/ A( a. }( v6 u. PCoefData= 346, EDA, 0D6, F91, F91, 0D6, EDA, 346;
; ^' _/ G% p! i) }" n7 q1 B
/ `( h6 P) f' C- J- F$ o6 M8 @3 L; c! W3 G+ ^4 k" |+ h0 n
https://www.xilinx.com/support/d ... coe_file_syntax.htm |
|