一乐电子

一乐电子百科

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

QQ登录

只需一步,快速开始

快捷登录

手机号码,快捷登录

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

coe file syntax

[复制链接]
发表于 2019-4-13 21:08 | 显示全部楼层 |阅读模式
COE File Syntax
3 T! R* t  M/ K1 G7 P  O' b* qThe following syntax displays the general form for a COE file:
3 x$ [8 H5 ?* x2 x7 b+ t6 Q' dKeyword =Value ; Optional Comment0 i3 q0 x" Z# q0 D9 W/ w
Keyword =Value ; Optional Comment
! E% i3 r& Q) F/ g<Radix_Keyword> =Value ; Optional Comment
+ V+ n- z+ b! |. ~$ ?' C " P8 j% q( J3 V1 C% i0 g2 d$ R
<Data_Keyword> =Data_Value1, Data_Value2, Data_Value3;
9 H) z- S- M, |' vThe 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." E3 \/ J) b! q( i3 d; J2 X  R
COE File Keywords for Radix Values
: _6 u+ ~/ C) N, ]$ I/ K$ V# ^Keyword        Description
. l+ r# E- l: O  Z9 d2 w6 g0 l# l# ^RADIX        Used for non-memory cores to indicate the radix being used to specify the coefficients of the filter.% [; e+ F6 K# l* p, _! H; U
MEMORY_INITIALIZATION_RADIX        Used for memory initialization values to specify the radix used.* t9 X7 J" I% m& B# x1 P
The following table describes COE file keywords for data values. Keywords are not case sensitive.  ?. q! u7 _  H1 ?  g
COE File Keywords for Data Values
' r; }; B5 @8 R* nKeyword        Description
; k( `7 |' q7 {3 h! N' n+ zCOEFDATA        Used for filters to indicate that the data that follows comprises the coefficients of the filter.5 u1 f6 R( a9 W' f' z3 x
MEMORY_INITIALIZATION_VECTOR        Used for block and distributed memories.
3 ]) E3 k4 Y: ^9 KPATTERN        Used for Bit Correlator COE files.
% N5 e+ h$ G8 V, d5 x) DBRANCH_LENGTH_VECTOR        Used in Interleaver COE files.* d1 P2 @  W) X8 r/ A7 e
MEMDATA        Obsolete keyword.
* b$ w) _! A: c! l% P( s4 J! I0 {Note :  Any text after a semicolon is treated as a comment and is ignored.
. \$ m5 M6 v7 K- p; l+ F, z' \8 bOne of the following keywords must be the last keyword specified in the COE file:, D: L" H  U( U" q9 n# j
COEFDATA
, N; n- f9 X9 U. z; {& }+ C MEMORY_INITIALIZATION_VECTOR
5 }) N0 Q* n; u. h) K% J6 S MEMDATA (an obsolete keyword, supported for backward compatibility): h- w4 E3 I8 Z- P7 l4 N, a
Any other keywords that follow are ignored.
4 Y$ u8 v$ ?6 ^" _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.
* \9 b: N. p9 v3 x: F6 J  \. }Below is a selection of the COE files from this area.
: s! a6 J: ~" j. w! ~" z6 ?. _******************************************************************7 a' W- Z" p* R8 d9 c8 G+ e/ [7 g
*************  Example of Virtex Bit Correlator.COE  *************6 c( \' Y! ?7 y; q; N/ ?! R
******************************************************************1 _+ g9 C% g% Y' c
; Sample .COE coefficient file for v2.0 and later 9 x* ^, I2 o! n  o0 B
; versions of the Bit Correlator core.  }& Z3 M' U) d: v% {" T
;+ {# M! V* j) N9 F1 N& ]
; In this core, a COE file is used to specify the value
1 L- T5 J6 J& D. l8 }+ K9 g; of the bit mask when the Pattern Mask option is selected.
- Z% _: l% I& r6 G;
; p* X2 B3 n- `9 l, M9 k! M; Specifications:
1 U$ o- ^3 p. h& [;4 v8 F; G/ m( W* G% X( @/ R
; - 19 taps, hexadecimal coefficients+ e& n, O0 o5 H3 s" G2 |* t
; - Serial input data) l5 X" ?4 b' k: H  Z4 r
;
& n+ q  T& [" b( Q% |6 U; Please refer to the datasheet for this core for more
* F1 T) N% s  W6 ^5 F4 v, ?; details on using the Mask option.
6 n# m' {, C/ @5 yradix = 16;" r$ ^$ r6 \: z1 @. ]0 [
pattern = 3 0 3 1 0 1 1 3 0 2 2 2 3 0 1 1 3 0 3;+ J4 h5 k% W" B. S9 l
******************************************************************: i- O. c( R1 t5 Q
*********  Example of Dual Port Block Memory .COE file  **********$ p- K$ r/ N, q, ?
******************************************************************# G2 X2 \& Z9 S
; Sample memory initialization file for Dual Port Block Memory,
, p% y3 \' h  K  n. `; v3.0 or later.
8 P& S" k1 Y6 M  m" F* J8 r4 `' F  M;
; k+ [2 w/ P" Q& M7 D; This .COE file specifies the contents for a block memory
7 J6 C0 S7 _. j* r: P- C2 E; of depth=16, and width=4.  In this case, values are specified& t# m* c5 \9 k5 b- s& f
; in hexadecimal format.. K/ G" o$ ~4 v/ b1 q% g  [
memory_initialization_radix=2;
- ?. T" A8 ]4 u( W' pmemory_initialization_vector=! E0 J+ Y; z0 H/ D6 x0 C+ z
1111,
: T+ \% o" v' n5 ^0 l/ U! j1111,. R6 c1 n2 D# v0 b  Z
1111,' C7 @6 ?2 T( n
1111,
/ {3 ~/ [* v, V& f5 [0 {1111,
+ k+ Y2 K9 V! E- r0000,1 w7 n7 X* z# T8 c; j0 k* i9 d
0101,% k# P2 l' O8 j/ @+ L7 @4 M2 S
0011,
9 c" g6 a/ ^3 `2 E0000,
7 C' z2 R6 N4 o" I1 O# V, n5 H1111,0 X% c8 U* Q2 P% o% A: c
1111,
0 [0 d, p& K# u% M0 ?) u# Y1111,
1 o/ v0 X# D, l0 W1 ~. k1111,' w" z* T; Y" H+ J+ V
1111,2 t- O9 @( k+ e# U4 N* S0 P
1111,
" v9 W6 W& l  B1 Y% A5 ?( y9 o* T* A1111;! M. M4 Y% f1 k2 c8 a2 G" J
******************************************************************) F8 k6 k) S! _+ I* e
********  Example of Single Port Block Memory .COE file  *********3 L2 j# U4 s0 Q0 ^6 S( o1 _+ e/ H
******************************************************************# l' t# U% @7 ?% H
; Sample memory initialization file for Single Port Block Memory,
5 E, p0 E  ]+ l" j5 Q; v3.0 or later.
/ d8 U8 P- w" E+ T# Y) \) B;* N. f" N( |9 e: ^: `/ s, w
; This .COE file specifies initialization values for a block
7 R6 i  U. v9 i, e6 t$ M; u/ h* G( a; memory of depth=16, and width=8. In this case, values are ' e6 M0 _3 G3 J
; specified in hexadecimal format.
, o4 `2 a) H4 @, t+ ememory_initialization_radix=16;
' @, ]3 P3 }' G8 I$ k8 {memory_initialization_vector=
# m% {. q; `' f+ g- f0 Mff,
- w3 J9 c+ [, a  K$ Z) K; wab,
$ i; V: K. s, l5 j* u* _f0,7 ]5 E. T7 A: c$ R( y6 a& j- W
11,- h. @7 w3 Z  H. e, [' [
11,
& {% w" O1 f. G4 i6 ?2 m0 T00,
. k/ n' k' W/ O1 D1 a01,0 a0 I. ^. t0 x4 ~" q2 C
aa,) N' ^8 e( N# \- S% D3 S0 u
bb,4 T& ~' s+ G! e$ ~
cc,
, }8 V7 r8 p- d2 {" Edd,
8 l" b7 d* E5 B. G! Z3 aef,4 h6 f1 n" w# B5 F1 c, P
ee,  _2 e4 u8 N" H
ff,
  s- D7 B: c% n2 q9 p. P00,- W% m9 ^0 N4 H1 m4 t/ t  d: w
ff;$ @/ [$ G: O3 _+ V3 ]
******************************************************************
, U# d! h! |5 F* r************  Example of Distributed Memory .COE file  ***********
$ h1 b& N7 h! j1 Q: N******************************************************************, i4 I. J) z; E9 h
; Sample memory initialization file for Distributed Memory v2.0 and 8 x2 r& \, ]/ E8 z! g- e
; later.
: v9 `8 I. A  h;
/ s; o9 Z2 K7 t6 R) U7 q. G5 s; This .COE file is NOT compatible with v1.0 of Distributed Memory Core.
& @$ r7 I8 f% [;
8 k0 ~4 h4 I- Z4 [; The example specifies initialization values for a memory of depth= 32, ! x  m( F( \$ f. x
; and width=16. In this case, values are specified in hexadecimal6 f$ _$ ]$ M- W+ r. H1 n
; format." q* S- t- @1 u  r# K& \
memory_initialization_radix = 16;
* C5 K  l2 O, U( i% g6 imemory_initialization_vector = 23f4 0721 11ff ABe1 0001 1 0A 0
5 ?  V( _7 O% \ 23f4 0721 11ff ABe1 0001 1 0A 0! _0 t3 C7 F( d1 n0 x# e
23f4 721 11ff ABe1 0001 1 A 0. G6 i- s7 Y+ A! b0 k/ C
23f4 721 11ff ABe1 0001 1 A 0;
; X& P: {* S6 ]% z/ b******************************************************************  w" }5 a8 a6 [7 _. b
******  Example of Distributed Arithmetic FIR Filter .COE file ***
! N8 d' D9 X! `* |******************************************************************3 X. L8 I  Q; p# A% O1 B
; Example of a Distributed Arithmetic (DA) FIR Filter .COE file1 q/ @1 N7 c6 H2 w% R& U5 D9 r$ {
; with hex coefficients, 8 symmetrical taps, and 12-bit
2 h1 C/ S) o) V8 \% n3 ]1 t+ ?; coefficients.
4 `5 M% Y' L2 G2 ?: ^;$ g0 c: s7 z  F+ ]3 p* r6 y
; Compatible with all versions of the Distributed Arithmetic9 }3 ]4 s, O7 o: m
; FIR Filter which supports Virtex and Spartan, K  J2 U! l8 }; B- u
Radix = 16;
7 o! k% i7 O6 q- L1 vCoefData= 346, EDA, 0D6, F91, F91, 0D6, EDA, 346;6 n" ?/ f4 `) ]) v
) _7 h+ t, U  @$ N

" N4 M$ e+ B8 T" xhttps://www.xilinx.com/support/d ... coe_file_syntax.htm

本版积分规则

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

GMT+8, 2024-5-21 12:45 , Processed in 0.052119 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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