一乐电子

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

QQ登录

只需一步,快速开始

微信扫码登录

手机号码,快捷登录

手机号码,快捷登录

搜索
查看: 6235|回复: 0

coe file syntax

[复制链接]
发表于 2019-4-13 21:08 | 显示全部楼层 |阅读模式
COE File Syntax' q  x7 z# y' x: r
The following syntax displays the general form for a COE file:; D, a" q/ U! w& P& _
Keyword =Value ; Optional Comment) Y/ S8 U/ k! |& N1 e# E
Keyword =Value ; Optional Comment
. i4 l" E9 Q& q8 Y$ l<Radix_Keyword> =Value ; Optional Comment
. ~6 f9 W9 E# L
$ k4 D6 a9 ~: J) T$ c9 A9 X2 @<Data_Keyword> =Data_Value1, Data_Value2, Data_Value3;
/ m, p4 H7 d7 KThe 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.; ~. j9 u3 M4 I/ ]
COE File Keywords for Radix Values
6 ?: @8 Z  p. V: K5 b0 a8 J0 @3 ZKeyword        Description# X4 C5 Z% Q+ g, I& Y
RADIX        Used for non-memory cores to indicate the radix being used to specify the coefficients of the filter.* g( c! ]4 d& v. ?& H5 d
MEMORY_INITIALIZATION_RADIX        Used for memory initialization values to specify the radix used.' X3 v, q/ p& @! l% ^
The following table describes COE file keywords for data values. Keywords are not case sensitive." |5 m* `! y$ g( }% k9 v2 r
COE File Keywords for Data Values
- k: ~9 v5 x8 l2 pKeyword        Description& `! f# S7 X9 K. H% }0 \
COEFDATA        Used for filters to indicate that the data that follows comprises the coefficients of the filter.8 d( T* A0 u9 H, o" ?
MEMORY_INITIALIZATION_VECTOR        Used for block and distributed memories.+ b5 A% Z4 |6 C5 W, Y
PATTERN        Used for Bit Correlator COE files.2 J5 ~- g: k" p/ ]
BRANCH_LENGTH_VECTOR        Used in Interleaver COE files.8 {; k# f9 v8 y8 U7 ]) l+ w
MEMDATA        Obsolete keyword." I- l( T7 |! _# O& E& N
Note :  Any text after a semicolon is treated as a comment and is ignored.
8 j! L0 z/ t, w3 EOne of the following keywords must be the last keyword specified in the COE file:
, u( p8 S  z3 p COEFDATA
! }& e* X5 M- V" i+ r  X2 _ MEMORY_INITIALIZATION_VECTOR
9 G  V$ E" g: X* w3 Z, ^8 P MEMDATA (an obsolete keyword, supported for backward compatibility): h: D+ n* l& j  {; ^2 m. T
Any other keywords that follow are ignored.3 O: j" f- z4 b
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.3 [4 y2 u9 H) j1 p- b( d  i. }" x
Below is a selection of the COE files from this area.; Q% D4 V! B( _) Q0 t6 a/ T
******************************************************************, e3 o& r& o, v4 ~
*************  Example of Virtex Bit Correlator.COE  *************
5 ]) h* w8 q/ K+ i& e) u6 M******************************************************************
" E% s) a. a1 i% `5 h$ e; Sample .COE coefficient file for v2.0 and later ! k" b8 V. V% L5 K* @
; versions of the Bit Correlator core.
; R. W! k' C+ ~" }- c: ~;- A8 j; p8 t9 w% e$ p. c. r& z
; In this core, a COE file is used to specify the value & C! v1 M0 w1 F* ]
; of the bit mask when the Pattern Mask option is selected.
  l  y% {  V/ Y0 N: f/ B' _8 r;
0 B" C9 h9 x+ Z  E$ A% B; Specifications:
4 N" Z: V( I2 Q+ Y( w0 t- k) Q;
8 t. K# q' x' j: e; - 19 taps, hexadecimal coefficients# h2 R5 h1 r' j( ^7 ]5 d  ^
; - Serial input data
$ X- G( B: Z% p# k  }$ w: u) Y;( `5 V5 n/ h7 u. ~
; Please refer to the datasheet for this core for more
  }' I2 c5 e% e& r1 Z; details on using the Mask option.( d7 }2 a2 ~" e! n: m
radix = 16;8 Z" w4 p* j' j
pattern = 3 0 3 1 0 1 1 3 0 2 2 2 3 0 1 1 3 0 3;* t& R9 c8 W; s. d! D  b9 e/ |( Q4 B
******************************************************************9 C: h: K- I7 n; l3 D
*********  Example of Dual Port Block Memory .COE file  **********
; Q: t" N: E- U. l******************************************************************
/ h* g! ~4 p6 g2 D3 K; Sample memory initialization file for Dual Port Block Memory,6 [) R6 g7 C- n9 E
; v3.0 or later.
9 M; I0 {1 K3 B- j- [;
$ ^7 f- }: i" y/ g( z6 H/ x; This .COE file specifies the contents for a block memory
* a: V& q5 E/ J; of depth=16, and width=4.  In this case, values are specified
1 q. v' G) j9 M4 _5 Y* I/ m; b% o; in hexadecimal format.) V% ^% k+ g7 j, v3 ^% [
memory_initialization_radix=2;
2 R& `6 o5 x$ B- F( Xmemory_initialization_vector=
2 F( B. ~) }6 X1111,4 S& P. E+ N8 G+ ]2 _' Y( J
1111,; g, f  Z8 q& E+ {4 C% c$ w' K" S
1111,% P+ C# `' F( T$ h9 i8 |
1111,
( O0 x' ^) c) _) ?. w2 i! Z" H2 _; f1111,6 k( l" |; E5 B) e
0000,+ b' D/ b6 U: i+ t6 t  F% P
0101,6 S' r2 U5 k  q7 \/ A& `" L6 Q
0011,9 C$ a! z! B% s
0000,
" f- Y; h. I) G7 p1111,
, a5 b1 P/ P6 C4 q1111,( l/ u! \* z( M, e% x
1111,
: {. F  Z4 \# w& l1 G* ?, O; M! M' Q1111,
. J+ k* S- ?0 J4 H1111,: e6 S/ r% o, ?8 Z
1111," |; z! P2 l4 R* f0 X, V
1111;
# e/ I- q1 W. H# n8 h******************************************************************& Q5 j, P, U6 U/ @
********  Example of Single Port Block Memory .COE file  *********" n2 m9 ]2 ^# P) ^9 S
******************************************************************
6 i( ]$ D! M$ m. C, |; Sample memory initialization file for Single Port Block Memory, 2 e8 G5 a8 Y1 q8 [
; v3.0 or later.
( C  E7 }. ?$ b;  j8 f; ], H; W6 V4 H
; This .COE file specifies initialization values for a block + S9 b; h5 C8 b4 @5 d
; memory of depth=16, and width=8. In this case, values are 1 _( l- m9 \$ m/ W' {
; specified in hexadecimal format.
1 X3 D& |! q5 u; }: K* Wmemory_initialization_radix=16;
. T1 \6 a9 Z# T6 R4 Umemory_initialization_vector=
3 N) N! [0 D1 C# d2 u- y6 {- ^ff,
; U- e; M6 e# J9 B, M, Cab,) l* Z' m2 t7 g: \$ j
f0,& o/ J9 L+ y( D0 @' G' `
11,; ^! r! E! p' }* x/ X
11,' t7 w& ]- c% [  i6 [
00,
. p0 d! `3 x& d/ I3 w01,+ ?" x3 S9 i7 o& V, E1 B
aa,3 T( n9 s: v/ G  u5 J+ @
bb,+ \$ t9 \, p9 g+ V+ b) d
cc,
0 e' u% I* E, W6 Wdd,6 w) k* ]5 \, D9 O1 l
ef,7 p/ f. S, E  j! s
ee,
; {& Z: B6 c0 L0 v% U0 kff,
6 k/ D( {/ P' y3 H$ F00,3 V3 z6 i0 P5 X. s9 c
ff;
$ o* R  G# k; j: j/ q- N2 J******************************************************************; H; l  {% ^5 R6 J0 f* r3 x
************  Example of Distributed Memory .COE file  ***********7 B3 T+ R5 c0 e
******************************************************************3 R+ N+ e+ j! H% f
; Sample memory initialization file for Distributed Memory v2.0 and
" _8 O7 C' q) x) B; C( l$ b; later.
' {: k6 d3 ^" u' b# C; A2 u;
. o6 f% N2 K1 ]7 ]; This .COE file is NOT compatible with v1.0 of Distributed Memory Core.4 R7 p5 D$ `9 x
;
% P) H. P- k7 }3 N( p% q; The example specifies initialization values for a memory of depth= 32, 8 z" M  }# }- P+ [0 O# }$ Z
; and width=16. In this case, values are specified in hexadecimal
8 d1 o$ ~. P5 Z3 C; format.: o+ d3 ?6 i& r# f6 W  z; E
memory_initialization_radix = 16;
( q5 u: Y4 z; A; p0 E& hmemory_initialization_vector = 23f4 0721 11ff ABe1 0001 1 0A 0
, A* ?" y. g1 D: h 23f4 0721 11ff ABe1 0001 1 0A 0+ O- |; s4 t/ G4 y( J
23f4 721 11ff ABe1 0001 1 A 0
" B. p! h+ ^. Y 23f4 721 11ff ABe1 0001 1 A 0;, D# v2 y4 a5 b8 V. G2 j) F2 y
******************************************************************
6 q8 s0 G: d9 |. G) p, p******  Example of Distributed Arithmetic FIR Filter .COE file ***
+ P+ V" O3 ?* \1 Q& W, ]******************************************************************& ?. }7 w1 {3 {5 ]5 Z" [/ e4 @& H
; Example of a Distributed Arithmetic (DA) FIR Filter .COE file
7 i- f7 `* [1 T! G; o0 {; with hex coefficients, 8 symmetrical taps, and 12-bit4 h. T2 U5 p. g  y
; coefficients.6 v( _* C+ W" |+ [* a' w6 |
;2 D9 N' |" d5 {  z
; Compatible with all versions of the Distributed Arithmetic
9 q& T/ U' _) }; Q; FIR Filter which supports Virtex and Spartan
) v0 a6 s; b9 Q" v* t6 b4 Z1 pRadix = 16;6 Y3 V" Z1 r% u! A
CoefData= 346, EDA, 0D6, F91, F91, 0D6, EDA, 346;& ~6 K0 b. O! s* w! x' b
7 Z' K, C" }4 W/ N! a4 {# j+ O# K

8 u$ D7 U# j4 N4 f' v& Chttps://www.xilinx.com/support/d ... coe_file_syntax.htm

本版积分规则

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

GMT+8, 2025-10-27 06:44 , Processed in 0.030310 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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