版主
主题
回帖0
积分10609
阅读权限200
注册时间2008-11-22
最后登录1970-1-1
在线时间 小时
|
COE File Syntax. `0 ]* r6 r4 h; Y
The following syntax displays the general form for a COE file:
, o; |4 e5 [3 W" B3 q# R5 [Keyword =Value ; Optional Comment
7 V! [+ h0 F: K1 d, D+ Q4 |Keyword =Value ; Optional Comment
: Q; n& [* ~7 }: [<Radix_Keyword> =Value ; Optional Comment7 b! n U* s8 X* i K
, C- Z8 Y2 G- ~, p' K& |
<Data_Keyword> =Data_Value1, Data_Value2, Data_Value3;
u2 v! {/ t: c2 d) z# OThe 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" x' Z# b! k7 B
COE File Keywords for Radix Values
w# W O7 y1 ~( S3 V) Y3 | ^Keyword Description
5 s* v8 k6 i0 R1 z" v9 Y: s$ \RADIX Used for non-memory cores to indicate the radix being used to specify the coefficients of the filter.8 j& U3 c0 B+ F
MEMORY_INITIALIZATION_RADIX Used for memory initialization values to specify the radix used.
# g: o0 V7 e1 C% s0 JThe following table describes COE file keywords for data values. Keywords are not case sensitive.
' ~9 h, O: J* A/ P/ ZCOE File Keywords for Data Values
& M) w. ]/ k: F% z! i" y8 RKeyword Description) p2 Q1 B4 j9 J' \( P; G
COEFDATA Used for filters to indicate that the data that follows comprises the coefficients of the filter.
0 t% i- U1 z3 E3 z7 {0 M( |4 EMEMORY_INITIALIZATION_VECTOR Used for block and distributed memories.. a. k. w* x5 B2 ?4 I. q
PATTERN Used for Bit Correlator COE files.
" q8 k: O0 J* O7 b' @9 }* r- R, hBRANCH_LENGTH_VECTOR Used in Interleaver COE files.( L1 \9 l6 i6 S
MEMDATA Obsolete keyword.. m$ f1 [# m) k+ j2 g0 D1 Y( B
Note : Any text after a semicolon is treated as a comment and is ignored." X0 A r# u8 J; T8 O+ T
One of the following keywords must be the last keyword specified in the COE file:& @4 @, a5 L' o
COEFDATA
- o3 w$ j) |, n4 d6 } MEMORY_INITIALIZATION_VECTOR
3 ?( q p( _! D- T! Q8 F MEMDATA (an obsolete keyword, supported for backward compatibility)# |: ~8 Z* u4 v
Any other keywords that follow are ignored.' L3 q6 \/ ~) ~2 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.
8 e5 i7 X) F1 d3 X# Y. [Below is a selection of the COE files from this area.
8 y6 D, r/ ^+ ?/ g0 O# k9 c8 _. [******************************************************************
7 W, K" d) M9 O% r2 Q************* Example of Virtex Bit Correlator.COE *************& m8 x0 ^- N+ A. }$ ]
******************************************************************& @( M0 a: \7 [/ ?$ O( S) r
; Sample .COE coefficient file for v2.0 and later ; ]8 v. P4 g9 ?4 v$ W/ k
; versions of the Bit Correlator core.6 j1 W; V# V1 H8 N: r, O6 x
;
- K% n# `5 h$ w" E; In this core, a COE file is used to specify the value
! o0 I! s2 Q. V4 q% n/ G! G* c+ \. }; of the bit mask when the Pattern Mask option is selected.
" T6 J# K+ d- K;
" l! j* a$ f# i; Specifications:& _ Y. O( D( X; x; e
;
( y, A4 k$ Y# @" [. O- u6 G4 y; - 19 taps, hexadecimal coefficients0 C$ _1 G* @1 g+ M
; - Serial input data1 q# a6 R2 `6 b0 N( L3 k% f
;
8 r2 H4 T. \# K& j; Please refer to the datasheet for this core for more8 y. m- G2 Z* N# f, j. b! a
; details on using the Mask option.
2 v& u; s* D" U/ l& Y: @' o* ?radix = 16;9 z1 w! @ g/ G' J g2 N
pattern = 3 0 3 1 0 1 1 3 0 2 2 2 3 0 1 1 3 0 3;
* P4 u( Z) u% p2 k# ?: Z% M******************************************************************
' b4 f3 C" @5 }& a* [********* Example of Dual Port Block Memory .COE file **********
% P$ d" c9 _" U4 s r7 S******************************************************************% S& v" G( k7 _ j
; Sample memory initialization file for Dual Port Block Memory,' A9 ]; l- r0 x* G+ c( L& p
; v3.0 or later.# g( p# i7 |4 A% ~/ S
;5 |/ \1 K! Q5 J
; This .COE file specifies the contents for a block memory* N2 b3 P; L$ H3 g1 Y# \
; of depth=16, and width=4. In this case, values are specified+ s: H: ?2 B; n( V6 j: p+ o7 Q9 S
; in hexadecimal format.5 ]% {$ ?. P, { k' L
memory_initialization_radix=2;0 T. ^: W2 C0 u: R
memory_initialization_vector=
p! x) Z6 n3 @1111,' D/ U0 E* Q' v& [
1111,
; O: G9 w' ^% U! V9 y- k1111,9 N- q* T) Y/ ?9 d
1111,1 w& v) x T$ Q2 u
1111,
* L9 s( _' Q- I$ k+ T( T0000,
* \5 f) C M3 e! a5 _; A g- c0101,2 H/ X8 \7 k5 ~
0011,: ]/ t; ^; r9 o& w0 ^
0000,% _; u+ s' z6 U5 T p
1111,
3 H$ h2 i2 M4 p ?7 q/ O1111,! r% e6 g7 ]: `- j$ Y% D5 ^& |8 l. c
1111,) a; \# V, F. _6 Y4 F, l# `, j
1111,
& [& u0 S. a4 Y3 c1 B1111,
* w4 @0 J5 `! p1111,4 v" \5 m1 i- ?0 i
1111;
2 W! N A9 m9 {; D******************************************************************! u& H. U. M$ O; Q3 @' o
******** Example of Single Port Block Memory .COE file *********/ v% E8 H6 C* R0 C2 A
******************************************************************
1 j7 h {/ n' i! C) V- Y% T; Sample memory initialization file for Single Port Block Memory, " Z; W" }1 _7 Z) c% U
; v3.0 or later. @# [3 @! m) Z$ J! @0 ^
;: k3 W1 @4 j1 B8 k8 g1 B+ q1 w
; This .COE file specifies initialization values for a block 2 k& ~9 w+ T! K2 n, d6 B
; memory of depth=16, and width=8. In this case, values are
; f' o0 p6 f, x; specified in hexadecimal format.) L9 [. M: i: ~
memory_initialization_radix=16;% o; N. j! y9 M# O
memory_initialization_vector= Y' `9 r7 O! r0 w# l& K4 g" G, o% N: q
ff,- j- M& _2 E$ x1 n' J# Y: O
ab,
# H" G9 G2 s$ ~/ a1 bf0,+ }& f4 X2 W3 z# D& c! V* g
11,. r; o0 N8 g! O7 W' O' ?
11,6 r# e3 W, ]) G* T2 M) b" ^
00,# [3 A+ c: n. X4 L" K1 o8 I- T
01,
- p4 `7 R C1 f8 Naa,! v8 j0 y$ L+ F
bb,
. Y. Y% O. K) D- Scc,8 K1 _6 r' l* f1 q0 V, E8 a
dd,
/ |0 d( l7 U' |5 V: T. g$ bef,$ M+ `8 ]1 ?& }+ x# w/ x( c6 Q
ee,
* {9 P/ e6 ]% O! B: ?( P' P: qff,, r0 |( ~; }' [; t
00, X2 u5 s$ P0 o
ff;
! h; O9 H4 d: J& J: X******************************************************************
) u' ]0 {- H; C$ B' w% ^& u************ Example of Distributed Memory .COE file ***********
- o& J% g8 i0 i% _6 Z******************************************************************: t9 Z+ O. H3 c6 c( f. y) A
; Sample memory initialization file for Distributed Memory v2.0 and
6 ^. q$ C2 }) h# L; later.) u2 S9 i4 a! L1 D
;
5 r( J! P$ }% H1 [- q- A; This .COE file is NOT compatible with v1.0 of Distributed Memory Core.
* H# [: U$ P0 J( M; 2 J% h8 l k9 B6 m( Q
; The example specifies initialization values for a memory of depth= 32, 0 P O9 @6 O t- k. j
; and width=16. In this case, values are specified in hexadecimal
a! V* Y4 i m. s( i: N; format.
5 v( q4 L3 b& w# k5 rmemory_initialization_radix = 16;
1 j- N5 W- G. Imemory_initialization_vector = 23f4 0721 11ff ABe1 0001 1 0A 0 z8 K8 d* C$ u5 q" h
23f4 0721 11ff ABe1 0001 1 0A 0& k" Y7 ~6 D& I
23f4 721 11ff ABe1 0001 1 A 0, B* [ c0 m& V5 C5 w2 j, {
23f4 721 11ff ABe1 0001 1 A 0;5 `" V" ^7 Q7 H/ ?! F1 ^* R
******************************************************************2 k( y" G- L0 T; q0 c: f' F7 t
****** Example of Distributed Arithmetic FIR Filter .COE file ***, _* V- b* G8 [2 F& ~
******************************************************************2 l: A) S: m( }( i9 N
; Example of a Distributed Arithmetic (DA) FIR Filter .COE file2 ]0 t* l; J F. `! ^( m# j" t: q
; with hex coefficients, 8 symmetrical taps, and 12-bit
! [( Z- Y/ U6 F4 A# n5 R: ?9 i; coefficients.' D; z+ S, L; C- X0 i
;
) ^9 b( I! z' r3 N0 Z3 t; Compatible with all versions of the Distributed Arithmetic8 r" T8 ~- X) n: L
; FIR Filter which supports Virtex and Spartan
& a5 e8 w6 X- I$ ]- CRadix = 16;
$ R- S, {7 |& m$ P" C. kCoefData= 346, EDA, 0D6, F91, F91, 0D6, EDA, 346;
: S6 H5 p O1 `( C6 @8 S ~! }- g" A- m3 V! ~1 {3 W, N1 G% ^
" {0 y$ f r4 U* G' l
https://www.xilinx.com/support/d ... coe_file_syntax.htm |
|