一乐电子

一乐电子百科

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

QQ登录

只需一步,快速开始

快捷登录

手机号码,快捷登录

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

coe file syntax

[复制链接]
发表于 2019-4-13 21:08 | 显示全部楼层 |阅读模式
COE File Syntax! e" |/ U* W$ Z4 L4 Z
The following syntax displays the general form for a COE file:; b/ }- Z) k, \6 w+ v/ Q) }; i  P
Keyword =Value ; Optional Comment! R9 j* ~/ v1 W- X
Keyword =Value ; Optional Comment7 }8 U" J; J/ e
<Radix_Keyword> =Value ; Optional Comment
0 W( R! X' ?3 r% b- Q/ A5 x( f
% r# h, r6 u; E6 q% R; E<Data_Keyword> =Data_Value1, Data_Value2, Data_Value3;
: e# r, S9 d# @3 rThe 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.
7 ~' O6 j9 U. ACOE File Keywords for Radix Values- f6 Z* G$ \/ i6 [' t
Keyword        Description
0 g6 m9 {0 g4 J( l+ c* H# URADIX        Used for non-memory cores to indicate the radix being used to specify the coefficients of the filter.$ S- x- z4 {* g% b# @0 s
MEMORY_INITIALIZATION_RADIX        Used for memory initialization values to specify the radix used.8 x6 x* Y/ V/ p+ n0 t
The following table describes COE file keywords for data values. Keywords are not case sensitive.4 |( s, f4 K' C  r3 S5 J
COE File Keywords for Data Values
( ~' T3 H$ ]% c, l" JKeyword        Description
7 {4 ~, p, H" ]; a; uCOEFDATA        Used for filters to indicate that the data that follows comprises the coefficients of the filter.4 J0 z" k& O( ~5 b# b# e4 q% s
MEMORY_INITIALIZATION_VECTOR        Used for block and distributed memories.
% U2 n2 Z- I9 \2 r% G' w2 G4 N* ?PATTERN        Used for Bit Correlator COE files.% x+ ?- V' C" P- x) [
BRANCH_LENGTH_VECTOR        Used in Interleaver COE files.
, Z4 H) @  r; k% w# q  sMEMDATA        Obsolete keyword.
; m1 U) x+ Q1 dNote :  Any text after a semicolon is treated as a comment and is ignored.. ^1 y+ d2 V. |, {5 _7 A% u+ C' m
One of the following keywords must be the last keyword specified in the COE file:6 \% z( V& k. _1 G) P) I6 g' {
COEFDATA
" ^: [3 x7 H$ Z/ S MEMORY_INITIALIZATION_VECTOR
' W+ y$ p* W) H) `" _+ H5 a MEMDATA (an obsolete keyword, supported for backward compatibility)
- y" n+ C/ q9 z4 }; r8 a( Y$ mAny other keywords that follow are ignored.3 E% n  t& E3 n/ w
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.& b2 ^$ C* {" R. o- Z! d( ~
Below is a selection of the COE files from this area.5 S3 x  ?& Z* E  T8 l5 W
******************************************************************( r* l" e# V/ v, B
*************  Example of Virtex Bit Correlator.COE  *************
  [& J- F* e$ g3 U7 T) E, [) B******************************************************************
5 ~" a, D; y, ?$ J5 Q7 v' A5 F; Sample .COE coefficient file for v2.0 and later
. g& Z# L/ V! c5 j& Y) |; versions of the Bit Correlator core.1 K1 g& b( O# ?
;" R+ W/ x' U* q5 C- I
; In this core, a COE file is used to specify the value 1 ]2 }! Z9 P% E
; of the bit mask when the Pattern Mask option is selected.) n* f% U4 W5 k% z9 w2 l2 ?) j
;
$ I' p3 V8 I6 y! _* a1 G; Q; Specifications:0 a/ Y- |" d. E) b
;# G1 {9 a) I/ X- G1 f  K
; - 19 taps, hexadecimal coefficients
! |+ L& ~2 p, y; - Serial input data
% V9 S- @; u+ l;1 E# V$ G. \! E* W* \; d3 Q8 J. Q
; Please refer to the datasheet for this core for more
" Q: A* l  v2 F# }+ J$ T; details on using the Mask option., W5 Z$ ?4 ~: c, {9 B% G" X+ H" V! `
radix = 16;
9 C9 G. O% U  b4 C' |pattern = 3 0 3 1 0 1 1 3 0 2 2 2 3 0 1 1 3 0 3;" ]4 ^2 Z- D6 w! c) s3 Y
******************************************************************9 k8 s- _3 b% I; A& B
*********  Example of Dual Port Block Memory .COE file  **********
3 i; W3 w" T  Z- J7 c******************************************************************0 X$ R  T. {+ j0 H
; Sample memory initialization file for Dual Port Block Memory,9 ?" E$ @% A% @- |" H
; v3.0 or later., s' a9 J% [& V
;
- f3 a1 [3 D' }, T- h& |/ a; This .COE file specifies the contents for a block memory
0 g" q  o9 C. K+ n, N* S; of depth=16, and width=4.  In this case, values are specified
& G) O* _$ x+ F8 n! G! ]; in hexadecimal format.7 B4 ^5 Z. `  f8 h1 I: a5 P
memory_initialization_radix=2;
2 |: m, f/ G0 ~/ [3 I1 Y; Ememory_initialization_vector=: F1 L) M: {( m3 g9 `- g6 E7 l
1111,# n; p- `- M8 h& D- A( G, Z
1111,
% w2 L6 z- w* I7 n  b2 `1111,
& o# i# f& @, O/ M% L' {1111,) `! H1 h; D0 S! B$ s
1111,
6 J# Y9 o7 F. v1 B0000,
( }# G0 n  ?( A  w3 r0101,
1 f5 R- Z/ o. C4 u' S. ]3 l0011,
9 e9 e, Q) o% x" J9 R: Z5 n' w0000,
5 i: P1 a+ P1 @: L1 y4 f1111,  J. E0 X" m* M& e4 G  r4 [
1111,
" P: A$ `  I( u1111,
5 O# I) Y$ g- l2 O: x, K1111,9 e2 x3 T4 H4 q8 p
1111,
* t! f9 H9 i# U8 S/ G' F# O1111,
- }8 E# t6 _" Q* P3 l1111;7 V& V' I# e$ p) T, L1 r+ |
******************************************************************
2 P' e4 o! C/ a$ N5 H! u********  Example of Single Port Block Memory .COE file  *********5 H1 X' |9 D1 U  e$ M7 l
******************************************************************! Y- V$ N; a3 j. G% j4 E) H: F
; Sample memory initialization file for Single Port Block Memory, $ S# t* ]. `7 \8 z# G- S
; v3.0 or later.% \: J  M( l6 X: e" K& F9 C
;
% ^9 a6 X5 `4 ]1 Y! p# j3 _; This .COE file specifies initialization values for a block
1 q% w+ P+ O* N- m0 H; memory of depth=16, and width=8. In this case, values are
" x% j, |6 d, P9 \! D  w; R; specified in hexadecimal format.
$ \7 u, R1 x3 Q; q  P- c* k$ ememory_initialization_radix=16;
" b1 G2 T3 |: ~* |# W; Ymemory_initialization_vector=; ]( d! Z7 G# V; r3 w+ V2 t
ff,
) I. l9 _0 n" C3 y$ j% `  Dab,0 T; e2 z" C$ \$ T: E' ^$ p
f0,
: a) ]5 y5 C. M11,- {( ^4 T/ H8 X: G
11,
, p: [* M4 U3 ^) t- j00,4 g, b3 m: o/ w$ X0 T
01,
$ ]. ~1 o, j" L5 M! c- Maa,, i* R* E+ n3 _$ I. w5 N9 ?
bb,
: q# Q6 b0 K- ?) ^" a+ S$ T% J2 Ncc,$ y! A+ ~5 x, O: f) ?  ]
dd,
, p* ~; m1 P* v( ?  `) M  Def,
/ A8 n6 j% k' }( Gee," G5 o5 G2 X' E8 r, o
ff,
1 H' _) e2 O% i1 b* N, f00,
' Y  i- c5 W& X* E& Y6 ~1 eff;0 Y9 ?3 |+ J. {+ h4 e' ]- x* D7 z
******************************************************************
8 W+ I- [  x5 `0 _- P0 k************  Example of Distributed Memory .COE file  ***********
8 b" k+ l8 p6 f******************************************************************
3 ^5 X9 {: G) {) W) A; Sample memory initialization file for Distributed Memory v2.0 and + e- c5 e# Y5 n) M0 B( a7 I: M: @6 R
; later.! k: A: L, W* m7 O' U, R6 _
; ! Y, S! M. J+ X
; This .COE file is NOT compatible with v1.0 of Distributed Memory Core.
1 s# S& B0 }2 I0 q$ a* D( W- k;
7 k+ }/ N3 u8 X3 c% y; The example specifies initialization values for a memory of depth= 32, $ B# v$ Y, V+ C- \
; and width=16. In this case, values are specified in hexadecimal
. J. ^6 _6 N8 j* C5 l! Y5 I2 c; format.
) ?3 L6 e. m8 W+ S1 nmemory_initialization_radix = 16;8 _% Q, Q% I3 s
memory_initialization_vector = 23f4 0721 11ff ABe1 0001 1 0A 04 j! \3 V$ B2 f  H: N' K1 k
23f4 0721 11ff ABe1 0001 1 0A 0( d% o9 G+ C7 U/ e* }+ J
23f4 721 11ff ABe1 0001 1 A 0) E+ E6 R/ a, B+ G" w  M; ^$ x
23f4 721 11ff ABe1 0001 1 A 0;% e  Z9 k4 m1 o0 S
******************************************************************
  B. G; i- r- `- t8 l, D- I******  Example of Distributed Arithmetic FIR Filter .COE file ***$ b! V* {3 A6 R/ B- c! ~* L9 ~5 i
******************************************************************/ b+ I! m, x9 y
; Example of a Distributed Arithmetic (DA) FIR Filter .COE file& A5 J1 i+ N, v2 T' I; M5 x+ m
; with hex coefficients, 8 symmetrical taps, and 12-bit( c! I  Q' c  E) P5 ^
; coefficients.
' _9 o% I7 _9 g* Y, i;
7 A5 n7 f' X, `' U, `0 z0 q; Compatible with all versions of the Distributed Arithmetic
) X( _  h4 D, g2 \& `) k4 q; FIR Filter which supports Virtex and Spartan
: d: e7 |0 p6 D9 ]0 oRadix = 16;: j: q3 E- h  B- Y2 i
CoefData= 346, EDA, 0D6, F91, F91, 0D6, EDA, 346;1 b7 A$ O5 T8 v% Z1 w
  A; A. m% {1 C" |( w  z0 M
8 S. c5 w; Z  M
https://www.xilinx.com/support/d ... coe_file_syntax.htm

本版积分规则

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

GMT+8, 2025-4-28 08:26 , Processed in 0.041960 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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