一乐电子

一乐电子百科

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

QQ登录

只需一步,快速开始

快捷登录

手机号码,快捷登录

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

coe file syntax

[复制链接]
发表于 2019-4-13 21:08 | 显示全部楼层 |阅读模式
COE File Syntax
' T4 v6 @& m+ w& \" |The following syntax displays the general form for a COE file:, `6 w. y( ]# D
Keyword =Value ; Optional Comment/ R$ c7 v# y* E8 \9 i
Keyword =Value ; Optional Comment6 f+ [" R; Z! Y! q, C7 K
<Radix_Keyword> =Value ; Optional Comment
- j" J* b( d. L1 O ' Z3 o/ [7 W+ l7 u7 A# d# t4 W
<Data_Keyword> =Data_Value1, Data_Value2, Data_Value3;: K! _1 }. m) [0 v: z
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.
! s0 [3 A- B( q! I% Y8 UCOE File Keywords for Radix Values
) B+ k7 J/ h2 NKeyword        Description9 A! p$ `1 Y  U# s* x' x2 b/ U
RADIX        Used for non-memory cores to indicate the radix being used to specify the coefficients of the filter.+ F: K# O/ h' X$ N
MEMORY_INITIALIZATION_RADIX        Used for memory initialization values to specify the radix used.
: ?) f8 T8 t; h4 s& CThe following table describes COE file keywords for data values. Keywords are not case sensitive.6 [) k! O0 K# f  _
COE File Keywords for Data Values
# q& @$ }0 m6 ]Keyword        Description' ^6 _: B* m2 D# c
COEFDATA        Used for filters to indicate that the data that follows comprises the coefficients of the filter.
) y9 {3 {& S0 w9 |5 g2 o4 t  ^MEMORY_INITIALIZATION_VECTOR        Used for block and distributed memories.
+ p/ ?9 \5 z; E7 y9 |4 d8 [PATTERN        Used for Bit Correlator COE files.
. o/ t# u* v' p8 z# y/ F* S" LBRANCH_LENGTH_VECTOR        Used in Interleaver COE files.
8 n- h4 N) F1 t: `8 r  mMEMDATA        Obsolete keyword.: A4 B% z8 \) H9 D, J
Note :  Any text after a semicolon is treated as a comment and is ignored.
, g. T4 W$ K7 T3 XOne of the following keywords must be the last keyword specified in the COE file:4 y8 y, F2 d# h3 ?
COEFDATA; |# ~: L9 V: q1 l* f4 q, e
MEMORY_INITIALIZATION_VECTOR
5 L9 }$ s' m9 \: C" [4 y* Q MEMDATA (an obsolete keyword, supported for backward compatibility)
$ n# \, I2 h# C5 ]/ rAny other keywords that follow are ignored." {% h' m! ]' W% M2 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.3 t: e1 E" [! G! c9 `# q
Below is a selection of the COE files from this area.
- J% Q6 \" l% B: j7 y8 d******************************************************************5 T+ [! w8 r) @5 r) _; `, j
*************  Example of Virtex Bit Correlator.COE  *************
# T% N( {* u2 a' e; o+ N- |- [******************************************************************
" B) l; x" e0 _) r( U9 v( L$ ?; Sample .COE coefficient file for v2.0 and later
8 h' w5 M% F0 }" D; V, Y" }2 k; versions of the Bit Correlator core.
- r4 x. G- k7 Y8 |, X7 K7 |;9 e2 T* g( |$ n( o* f& t+ ~/ X9 z. q
; In this core, a COE file is used to specify the value 9 D1 y6 R8 _/ }! u0 i7 T; [
; of the bit mask when the Pattern Mask option is selected.; g5 Q; N! w" D# f3 H6 N8 G
;5 _- U& x/ \: S
; Specifications:3 n7 r# c6 Z- Y, h
;2 D5 C( A, |$ _, N8 h& L
; - 19 taps, hexadecimal coefficients
7 t  J$ p) Q  D/ T0 `; - Serial input data
$ e( u: ]8 Z0 u* b* d# |;
1 J. c' F/ Q. _4 m; Please refer to the datasheet for this core for more/ u( f1 u  A0 o& U% s! f8 G5 `
; details on using the Mask option.( u( ?* d- {* I6 A  [
radix = 16;
2 A, r: s6 t3 {+ f  i& \pattern = 3 0 3 1 0 1 1 3 0 2 2 2 3 0 1 1 3 0 3;
' p' S' @! S" U, v; s# ^7 @! G+ d7 S******************************************************************: S8 R7 n6 @( X# V. G2 r
*********  Example of Dual Port Block Memory .COE file  **********
  O$ M3 |, I; {******************************************************************% ?! i8 H) Q. o4 G
; Sample memory initialization file for Dual Port Block Memory,
* _6 o5 F! ]% e0 q; v3.0 or later.
! e9 l8 e# x8 _  ]" P$ x;
5 k6 g* `$ `8 `% O; This .COE file specifies the contents for a block memory) n+ p4 j4 T5 E" E( o
; of depth=16, and width=4.  In this case, values are specified
7 m2 a: m& Y/ ?/ f* K; in hexadecimal format.
) h8 }4 |3 @2 k6 z( |/ Gmemory_initialization_radix=2;% G: a6 f4 Z# ~
memory_initialization_vector=
5 w; y0 t) X0 M7 A+ }# {1111,; q7 Q7 A) j7 p
1111,
3 W+ O5 ~$ a/ t2 s1111,
' U) ]& {. w; F% M' l1111,
8 c7 Q6 e8 \: A+ L1111,
2 w- o! s0 D7 Q0 ~$ q0000,6 M- W& B3 C" W7 g
0101,. \  b7 b+ Q& L0 i+ [! C
0011,& [  O0 V7 O2 t4 V1 m2 |* m
0000,+ l& R$ E$ w7 z% z
1111,( G' V4 g0 S! \3 n+ {; \
1111,
6 e: I# W; d! m- Z" b1111,# w- \- b: v7 L* {  B, `" ^1 `
1111,
" ?1 `) `3 ?6 ~% U/ A$ Y1111,
; Y- P2 F* @5 }8 b1 j) t+ Z- q1111,3 o5 U. {+ A) v$ o* I' z
1111;# F' r7 P0 ?5 H; U- X
******************************************************************
0 e2 Q0 ~6 }; \3 E********  Example of Single Port Block Memory .COE file  *********
  ]' U4 j. j. Q& v; i( t******************************************************************$ @7 o# {$ D7 X& q1 N% A: ?
; Sample memory initialization file for Single Port Block Memory,
. A1 n$ h3 i6 {% k2 {; v3.0 or later.
% M4 e7 W. ?& d. l) c0 M1 M;
1 M2 S- [' C- q  ?$ `; This .COE file specifies initialization values for a block , v+ F; x7 n/ t4 B; R
; memory of depth=16, and width=8. In this case, values are   u# \: h4 y* m% q1 Z3 N6 J" u& }" ^
; specified in hexadecimal format.& e: _! ?# v, N3 w: Z+ z; Q
memory_initialization_radix=16;/ H$ y% y2 L, [0 }2 S, k8 k" y
memory_initialization_vector=
8 V/ H9 s1 m6 {% l/ c: _( }+ a# sff,9 _9 n/ A; D- n: @$ m: D
ab,
: i* U( F" x& t8 \f0,
) `- `& R: |; {) l11,
$ o- O& }. @, J1 F) W% Q11,% [' F1 w! T9 ~6 l4 K/ s
00,7 h# t5 _9 n; a2 v2 ]
01,* j' r8 g! l5 ^& h) @) A+ D8 B" }
aa,; [9 V/ |5 [3 r2 T
bb,. W2 F7 k7 v9 g
cc,7 d3 x  W8 Y1 d/ Y
dd,
( b. o! ^$ o* [' z' xef,
+ ^! x% ?( u5 H1 zee,2 d  p. V  G- f, x9 n. E1 `- d8 S
ff,: \& I, k; b. I) b6 Q+ Z1 c
00,
/ d8 y: e, z1 A, B: Pff;
" q& `0 Y9 }. ^1 w******************************************************************1 m3 k' n! P6 q% i! {& e
************  Example of Distributed Memory .COE file  ***********) ?3 V/ i( o& V* \
******************************************************************9 M6 s# R: M5 u3 E
; Sample memory initialization file for Distributed Memory v2.0 and
% [. F6 m4 W- W; later.
/ i! c9 [1 |6 e( @  d;
/ E3 h% t/ S& m; This .COE file is NOT compatible with v1.0 of Distributed Memory Core.
0 D) ^4 p. a, B1 H; ( x0 G. u& `. b# \3 S" `
; The example specifies initialization values for a memory of depth= 32, : f$ s' Q+ b! r* t" N
; and width=16. In this case, values are specified in hexadecimal
: G+ l" m8 s! @  p# _: v: a; format.& ?; G3 W: H9 U& c( d0 ?
memory_initialization_radix = 16;" B( c4 i$ d' r% G: z6 \. E
memory_initialization_vector = 23f4 0721 11ff ABe1 0001 1 0A 0
: ~9 \, C$ V' P$ P. `: X& u! ~ 23f4 0721 11ff ABe1 0001 1 0A 0) `. b$ G0 h  V; J  s
23f4 721 11ff ABe1 0001 1 A 0
3 K) m2 l, c, A7 `! q4 P. V 23f4 721 11ff ABe1 0001 1 A 0;) x. I0 w# h( J( H4 l, M8 N
******************************************************************2 C2 I( s, O# z: V( N
******  Example of Distributed Arithmetic FIR Filter .COE file ***
7 C! ^% T' ]) {" v. g7 k6 V******************************************************************( W9 G( w8 ]# _# N2 {6 I
; Example of a Distributed Arithmetic (DA) FIR Filter .COE file6 \! P7 P/ _0 h/ w2 V
; with hex coefficients, 8 symmetrical taps, and 12-bit
0 H$ e( Q2 r- i1 A# B' S2 {' K; coefficients.
6 q5 d- W/ a5 R+ ?  ^" o;
( n, R. ^; H# _" u" }7 e; Compatible with all versions of the Distributed Arithmetic: ?4 ^- s) ~5 S5 R( _- [
; FIR Filter which supports Virtex and Spartan
8 k) V1 z: ^+ L; x. p7 [1 f! ~) YRadix = 16;' ]6 D  `8 _8 a1 L, N
CoefData= 346, EDA, 0D6, F91, F91, 0D6, EDA, 346;
0 k2 D$ |% W) Z6 o: g# g0 J* U, W
# E, S, s+ Q. B5 ^) L& q4 C6 k! u( M) |+ L- \
https://www.xilinx.com/support/d ... coe_file_syntax.htm

本版积分规则

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

GMT+8, 2024-3-28 20:46 , Processed in 0.048300 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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