##// END OF EJS Templates
Improved doxygen html output, improved documentation on some VHDL and C files.
alexis -
r67:10679dca7fe8 default
parent child
Show More
@@ -0,0 +1,6
1 <div id="footer">
2 <p>© Copyright 2011 LPP-CNRS | Design by Alexis Jeandet</p>
3 </div>
4 </div>
5
6 </body></html>
@@ -0,0 +1,16
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <title>lib-lpp: Main Page</title>
6 <link href="search/search.css" rel="stylesheet" type="text/css"/>
7 <script type="text/javaScript" src="search/search.js"></script>
8 <link href="doxygen.css" rel="stylesheet" type="text/css"/>
9 </head>
10 <body onload='searchBox.OnSelectItem(0);'>
11 <div id="wrap">
12 <div id="header">
13 <h1><a name="Free_VHDL_library" /><a href="../../">Free
14 VHDL library<br />
15 </a></h1>
16 </div>
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -0,0 +1,419
1 body {
2 font-family: Arial, sans-serif;
3 line-height: 1.5;
4 font-size: 14px;
5 background: #333;
6 margin: 0;
7 padding: 0;
8 }
9
10 #wrap {
11 width: 800px;
12 margin: 20px auto;
13 background: #333 url(center.jpg);
14 }
15
16 a { color: #50708F; text-decoration: none;}
17 a:hover { color: #880000; }
18
19 h1 {
20 margin: 0;
21 padding-left: 50px;
22 }
23
24 h1 a { text-decoration: none; color: #F9F7ED; }
25 h1 a:hover { border-bottom: 1px solid #F9F7ED; color: #F9F7ED; }
26
27
28 #header {
29 background: #333 url(header.jpg) no-repeat;
30 height: 140px;
31 line-height: 170px;
32 }
33
34
35
36 .tabs, .tabs2, .tabs3, .tablist {
37 background: #52add7 url(menu.jpg) no-repeat;
38 height: 30px;
39 line-height: 30px;
40 }
41
42 .tabs ul,.tabs2 ul,.tabs3 ul {
43 list-style-type: none;
44 margin: 0;
45 padding-left: 40px;
46 }
47
48 .tabs ul li,.tabs2 ul li,.tabs3 ul li {
49 display: block;
50 float: left;
51 }
52
53 .tabs ul li a,.tabs2 ul li a,.tabs3 ul li a {
54 display: block;
55 padding: 0 10px 0 10px;
56 text-decoration: none;
57 color: #fff;
58 font-size: 14px;
59 font-weight: 600;
60 }
61 .tabs ul li a:hover,.tabs2 ul li a:hover,.tabs3 ul li a:hover {
62 color: #fff;
63 background: url(menuover.png) repeat-x;
64 }
65
66 .tabs ul li div {
67 display: block;
68 margin-right: 150px;
69
70 color: #fff;
71 }
72
73
74 div.header
75 {
76 background-image:url('center.jpg');
77 background-color: #F9FAFC;
78 margin: 0px;
79 }
80
81 div.headertitle
82 {
83 padding: 5px 5px 5px 10px;
84 }
85
86 div.summary
87 {
88 float: right;
89 font-size: 8pt;
90 padding-right: 5px;
91 width: 50%;
92 text-align: right;
93 }
94
95 div.summary a
96 {
97 white-space: nowrap;
98 }
99
100 div.contents {
101 margin-top: 10px;
102 margin-left: 50px;
103 margin-right: 10px;
104 }
105
106 .mdescLeft, .mdescRight,
107 .memItemLeft, .memItemRight,
108 .memTemplItemLeft, .memTemplItemRight, .memTemplParams {
109 background-color: #F9FAFC;
110 border: none;
111 margin: 4px;
112 padding: 1px 0 0 8px;
113 }
114
115 .memItemLeft, .memItemRight, .memTemplParams {
116 border-top: 1px solid #C4CFE5;
117 }
118
119 td.indexkey {
120 background-color: #EBEFF6;
121 font-weight: bold;
122 border: 1px solid #C4CFE5;
123 margin: 2px 0px 2px 0;
124 padding: 2px 10px;
125 }
126
127 td.indexvalue {
128 background-color: #EBEFF6;
129 border: 1px solid #C4CFE5;
130 padding: 2px 10px;
131 margin: 2px 0px;
132 }
133
134 tr.memlist {
135 background-color: #EEF1F7;
136 }
137
138 div.qindex, div.navtab{
139 background-color: #EBEFF6;
140 border: 1px solid #A3B4D7;
141 text-align: center;
142 margin-right: 40px;
143 }
144
145 div.ah {
146 background-color: black;
147 font-weight: bold;
148 color: #ffffff;
149 margin-bottom: 3px;
150 margin-top: 3px;
151 padding: 0.2em;
152 border: solid thin #333;
153 border-radius: 0.5em;
154 -webkit-border-radius: .5em;
155 -moz-border-radius: .5em;
156 -webkit-box-shadow: 2px 2px 3px #999;
157 -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
158 background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
159 background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
160 }
161
162
163 a.el {
164 font-weight: bold;
165 }
166
167
168 .memItemLeft, .memTemplItemLeft {
169 white-space: nowrap;
170 }
171
172
173
174
175
176 .memtemplate {
177 font-size: 80%;
178 color: #4665A2;
179 font-weight: normal;
180 margin-left: 3px;
181 }
182
183 .memnav {
184 background-color: #EBEFF6;
185 border: 1px solid #A3B4D7;
186 text-align: center;
187 margin: 2px;
188 margin-right: 15px;
189 padding: 2px;
190 }
191
192 .memitem {
193 padding: 0;
194 margin-bottom: 10px;
195 }
196
197 .memname {
198 white-space: nowrap;
199 font-weight: bold;
200 margin-left: 6px;
201 }
202
203 .memproto {
204 border-top: 1px solid #A8B8D9;
205 border-left: 1px solid #A8B8D9;
206 border-right: 1px solid #A8B8D9;
207 padding: 6px 0px 6px 0px;
208 color: #253555;
209 font-weight: bold;
210 text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
211 /* firefox specific markup */
212 -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
213 -moz-border-radius-topright: 8px;
214 -moz-border-radius-topleft: 8px;
215 /* webkit specific markup */
216 -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
217 -webkit-border-top-right-radius: 8px;
218 -webkit-border-top-left-radius: 8px;
219 background-image:url('nav_f.png');
220 background-repeat:repeat-x;
221 background-color: #E2E8F2;
222
223 }
224
225 .memdoc {
226 border-bottom: 1px solid #A8B8D9;
227 border-left: 1px solid #A8B8D9;
228 border-right: 1px solid #A8B8D9;
229 padding: 2px 5px;
230 background-color: #FBFCFD;
231 border-top-width: 0;
232 /* firefox specific markup */
233 -moz-border-radius-bottomleft: 8px;
234 -moz-border-radius-bottomright: 8px;
235 -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
236 background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7);
237 /* webkit specific markup */
238 -webkit-border-bottom-left-radius: 8px;
239 -webkit-border-bottom-right-radius: 8px;
240 -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
241 background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7));
242 }
243
244
245 .paramkey {
246 text-align: right;
247 }
248
249 .paramtype {
250 white-space: nowrap;
251 }
252
253 .paramname {
254 color: #602020;
255 white-space: nowrap;
256 }
257 .paramname em {
258 font-style: normal;
259 }
260
261
262 .fragment {
263 font-family: monospace, fixed;
264 font-size: 105%;
265 }
266
267 pre.fragment {
268 border: 1px solid #C4CFE5;
269 background-color: #FBFCFD;
270 padding: 4px 6px;
271 margin: 4px 8px 4px 2px;
272 overflow: auto;
273 word-wrap: break-word;
274 font-size: 9pt;
275 line-height: 125%;
276 }
277
278
279 span.keyword {
280 color: #008000
281 }
282
283 span.keywordtype {
284 color: #604020
285 }
286
287 span.keywordflow {
288 color: #e08000
289 }
290
291 span.comment {
292 color: #800000
293 }
294
295 span.preprocessor {
296 color: #806020
297 }
298
299 span.stringliteral {
300 color: #002080
301 }
302
303 span.charliteral {
304 color: #008080
305 }
306
307 span.vhdldigit {
308 color: #ff00ff
309 }
310
311 span.vhdlchar {
312 color: #000000
313 }
314
315 span.vhdlkeyword {
316 color: #700070
317 }
318
319 span.vhdllogic {
320 color: #ff0000
321 }
322
323 .ftvtree {
324 font-family: sans-serif;
325 margin: 0px;
326 }
327
328 .tabsearch {
329 top: 0px;
330 left: 10px;
331 height: 36px;
332 background-image: url('tab_b.png');
333 z-index: 101;
334 overflow: hidden;
335 font-size: 13px;
336 }
337
338 .swap {
339 color: white;
340 }
341
342 .directory div p a.el {
343 color: #ffd;
344
345 }
346
347 /* these are for tree view when used as main index */
348
349 .directory {
350 font-size: 9pt;
351 font-weight: bold;
352 margin: 5px;
353 }
354
355 .directory h3 {
356 margin: 0px;
357 margin-top: 1em;
358 font-size: 11pt;
359 }
360
361 .directory > h3 {
362 margin-top: 0;
363 }
364
365 .directory p {
366 margin: 0px;
367 white-space: nowrap;
368 }
369
370 .directory div {
371 display: none;
372 margin: 0px;
373 }
374
375 .directory img {
376 vertical-align: -30%;
377 }
378
379 /* these are for tree view when not used as main index */
380
381 .directory-alt {
382 font-size: 100%;
383 font-weight: bold;
384 }
385
386 .directory-alt h3 {
387 margin: 0px;
388 margin-top: 1em;
389 font-size: 11pt;
390 }
391
392 .directory-alt > h3 {
393 margin-top: 0;
394 }
395
396 .directory-alt p {
397 margin: 0px;
398 white-space: nowrap;
399 }
400
401 .directory-alt div {
402 display: none;
403 margin: 0px;
404 }
405
406 .directory-alt img {
407 vertical-align: -30%;
408 }
409
410 #footer {
411 background: #333 url(footer.jpg)no-repeat;
412 text-align: center;
413 color: #fff;
414 height: 90px;
415 line-height: 90px;
416 }
417 #footer p { padding: 0; margin: 0; }
418 #footer a { color: #fff; }
419 #footer a:hover { text-decoration: underline; }
@@ -0,0 +1,51
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the LPP VHDL IP LIBRARY
3 -- Copyright (C) 2009 - 2010, Laboratory of Plasmas Physic - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 3 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 #include "stdio.h"
20 #include "lpp_apb_functions.h"
21
22
23
24 int main()
25 {
26 int d=0;
27 while(d!=10)
28 {
29 scanf("%d",&d);
30 switch(d)
31 {
32 case 0:
33 printf("cursor OFF \n");
34 break;
35 case 1:
36 printf("cursor ON \n");
37 break;
38 case 2:
39 break;
40 case 3:
41 apbprintdeviceslist();
42 break;
43 case 10:
44 return 0;
45 break;
46 default:
47 break;
48 }
49 }
50 return 0;
51 }
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -0,0 +1,6
1 <div id="footer">
2 <p>© Copyright 2011 LPP-CNRS | Design by Alexis Jeandet</p>
3 </div>
4 </div>
5
6 </body></html>
@@ -0,0 +1,14
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <title>lib-lpp: Main Page</title>
6 <link href="search/search.css" rel="stylesheet" type="text/css"/>
7 <script type="text/javaScript" src="search/search.js"></script>
8 <link href="doxygen.css" rel="stylesheet" type="text/css"/>
9 </head>
10 <body >
11 <div id="wrap">
12 <div id="header">
13 <h1><a href="../../index.html">Free VHDL library</a></h1>
14 </div>
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -0,0 +1,419
1 body {
2 font-family: Arial, sans-serif;
3 line-height: 1.5;
4 font-size: 14px;
5 background: #333;
6 margin: 0;
7 padding: 0;
8 }
9
10 #wrap {
11 width: 800px;
12 margin: 20px auto;
13 background: #333 url(center.jpg);
14 }
15
16 a { color: #50708F; text-decoration: none;}
17 a:hover { color: #880000; }
18
19 h1 {
20 margin: 0;
21 padding-left: 50px;
22 }
23
24 h1 a { text-decoration: none; color: #F9F7ED; }
25 h1 a:hover { border-bottom: 1px solid #F9F7ED; color: #F9F7ED; }
26
27
28 #header {
29 background: #333 url(header.jpg) no-repeat;
30 height: 140px;
31 line-height: 170px;
32 }
33
34
35
36 .tabs, .tabs2, .tabs3, .tablist {
37 background: #52add7 url(menu.jpg) no-repeat;
38 height: 30px;
39 line-height: 30px;
40 }
41
42 .tabs ul,.tabs2 ul,.tabs3 ul {
43 list-style-type: none;
44 margin: 0;
45 padding-left: 40px;
46 }
47
48 .tabs ul li,.tabs2 ul li,.tabs3 ul li {
49 display: block;
50 float: left;
51 }
52
53 .tabs ul li a,.tabs2 ul li a,.tabs3 ul li a {
54 display: block;
55 padding: 0 10px 0 10px;
56 text-decoration: none;
57 color: #fff;
58 font-size: 14px;
59 font-weight: 600;
60 }
61 .tabs ul li a:hover,.tabs2 ul li a:hover,.tabs3 ul li a:hover {
62 color: #fff;
63 background: url(menuover.png) repeat-x;
64 }
65
66 .tabs ul li div {
67 display: block;
68 margin-right: 150px;
69
70 color: #fff;
71 }
72
73
74 div.header
75 {
76 background-image:url('center.jpg');
77 background-color: #F9FAFC;
78 margin: 0px;
79 }
80
81 div.headertitle
82 {
83 padding: 5px 5px 5px 10px;
84 }
85
86 div.summary
87 {
88 float: right;
89 font-size: 8pt;
90 padding-right: 5px;
91 width: 50%;
92 text-align: right;
93 }
94
95 div.summary a
96 {
97 white-space: nowrap;
98 }
99
100 div.contents {
101 margin-top: 10px;
102 margin-left: 50px;
103 margin-right: 10px;
104 }
105
106 .mdescLeft, .mdescRight,
107 .memItemLeft, .memItemRight,
108 .memTemplItemLeft, .memTemplItemRight, .memTemplParams {
109 background-color: #F9FAFC;
110 border: none;
111 margin: 4px;
112 padding: 1px 0 0 8px;
113 }
114
115 .memItemLeft, .memItemRight, .memTemplParams {
116 border-top: 1px solid #C4CFE5;
117 }
118
119 td.indexkey {
120 background-color: #EBEFF6;
121 font-weight: bold;
122 border: 1px solid #C4CFE5;
123 margin: 2px 0px 2px 0;
124 padding: 2px 10px;
125 }
126
127 td.indexvalue {
128 background-color: #EBEFF6;
129 border: 1px solid #C4CFE5;
130 padding: 2px 10px;
131 margin: 2px 0px;
132 }
133
134 tr.memlist {
135 background-color: #EEF1F7;
136 }
137
138 div.qindex, div.navtab{
139 background-color: #EBEFF6;
140 border: 1px solid #A3B4D7;
141 text-align: center;
142 margin-right: 40px;
143 }
144
145 div.ah {
146 background-color: black;
147 font-weight: bold;
148 color: #ffffff;
149 margin-bottom: 3px;
150 margin-top: 3px;
151 padding: 0.2em;
152 border: solid thin #333;
153 border-radius: 0.5em;
154 -webkit-border-radius: .5em;
155 -moz-border-radius: .5em;
156 -webkit-box-shadow: 2px 2px 3px #999;
157 -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
158 background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
159 background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
160 }
161
162
163 a.el {
164 font-weight: bold;
165 }
166
167
168 .memItemLeft, .memTemplItemLeft {
169 white-space: nowrap;
170 }
171
172
173
174
175
176 .memtemplate {
177 font-size: 80%;
178 color: #4665A2;
179 font-weight: normal;
180 margin-left: 3px;
181 }
182
183 .memnav {
184 background-color: #EBEFF6;
185 border: 1px solid #A3B4D7;
186 text-align: center;
187 margin: 2px;
188 margin-right: 15px;
189 padding: 2px;
190 }
191
192 .memitem {
193 padding: 0;
194 margin-bottom: 10px;
195 }
196
197 .memname {
198 white-space: nowrap;
199 font-weight: bold;
200 margin-left: 6px;
201 }
202
203 .memproto {
204 border-top: 1px solid #A8B8D9;
205 border-left: 1px solid #A8B8D9;
206 border-right: 1px solid #A8B8D9;
207 padding: 6px 0px 6px 0px;
208 color: #253555;
209 font-weight: bold;
210 text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
211 /* firefox specific markup */
212 -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
213 -moz-border-radius-topright: 8px;
214 -moz-border-radius-topleft: 8px;
215 /* webkit specific markup */
216 -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
217 -webkit-border-top-right-radius: 8px;
218 -webkit-border-top-left-radius: 8px;
219 background-image:url('nav_f.png');
220 background-repeat:repeat-x;
221 background-color: #E2E8F2;
222
223 }
224
225 .memdoc {
226 border-bottom: 1px solid #A8B8D9;
227 border-left: 1px solid #A8B8D9;
228 border-right: 1px solid #A8B8D9;
229 padding: 2px 5px;
230 background-color: #FBFCFD;
231 border-top-width: 0;
232 /* firefox specific markup */
233 -moz-border-radius-bottomleft: 8px;
234 -moz-border-radius-bottomright: 8px;
235 -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
236 background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7);
237 /* webkit specific markup */
238 -webkit-border-bottom-left-radius: 8px;
239 -webkit-border-bottom-right-radius: 8px;
240 -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
241 background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7));
242 }
243
244
245 .paramkey {
246 text-align: right;
247 }
248
249 .paramtype {
250 white-space: nowrap;
251 }
252
253 .paramname {
254 color: #602020;
255 white-space: nowrap;
256 }
257 .paramname em {
258 font-style: normal;
259 }
260
261
262 .fragment {
263 font-family: monospace, fixed;
264 font-size: 105%;
265 }
266
267 pre.fragment {
268 border: 1px solid #C4CFE5;
269 background-color: #FBFCFD;
270 padding: 4px 6px;
271 margin: 4px 8px 4px 2px;
272 overflow: auto;
273 word-wrap: break-word;
274 font-size: 9pt;
275 line-height: 125%;
276 }
277
278
279 span.keyword {
280 color: #008000
281 }
282
283 span.keywordtype {
284 color: #604020
285 }
286
287 span.keywordflow {
288 color: #e08000
289 }
290
291 span.comment {
292 color: #800000
293 }
294
295 span.preprocessor {
296 color: #806020
297 }
298
299 span.stringliteral {
300 color: #002080
301 }
302
303 span.charliteral {
304 color: #008080
305 }
306
307 span.vhdldigit {
308 color: #ff00ff
309 }
310
311 span.vhdlchar {
312 color: #000000
313 }
314
315 span.vhdlkeyword {
316 color: #700070
317 }
318
319 span.vhdllogic {
320 color: #ff0000
321 }
322
323 .ftvtree {
324 font-family: sans-serif;
325 margin: 0px;
326 }
327
328 .tabsearch {
329 top: 0px;
330 left: 10px;
331 height: 36px;
332 background-image: url('tab_b.png');
333 z-index: 101;
334 overflow: hidden;
335 font-size: 13px;
336 }
337
338 .swap {
339 color: white;
340 }
341
342 .directory div p a.el {
343 color: #ffd;
344
345 }
346
347 /* these are for tree view when used as main index */
348
349 .directory {
350 font-size: 9pt;
351 font-weight: bold;
352 margin: 5px;
353 }
354
355 .directory h3 {
356 margin: 0px;
357 margin-top: 1em;
358 font-size: 11pt;
359 }
360
361 .directory > h3 {
362 margin-top: 0;
363 }
364
365 .directory p {
366 margin: 0px;
367 white-space: nowrap;
368 }
369
370 .directory div {
371 display: none;
372 margin: 0px;
373 }
374
375 .directory img {
376 vertical-align: -30%;
377 }
378
379 /* these are for tree view when not used as main index */
380
381 .directory-alt {
382 font-size: 100%;
383 font-weight: bold;
384 }
385
386 .directory-alt h3 {
387 margin: 0px;
388 margin-top: 1em;
389 font-size: 11pt;
390 }
391
392 .directory-alt > h3 {
393 margin-top: 0;
394 }
395
396 .directory-alt p {
397 margin: 0px;
398 white-space: nowrap;
399 }
400
401 .directory-alt div {
402 display: none;
403 margin: 0px;
404 }
405
406 .directory-alt img {
407 vertical-align: -30%;
408 }
409
410 #footer {
411 background: #333 url(footer.jpg)no-repeat;
412 text-align: center;
413 color: #fff;
414 height: 90px;
415 line-height: 90px;
416 }
417 #footer p { padding: 0; margin: 0; }
418 #footer a { color: #fff; }
419 #footer a:hover { text-decoration: underline; }
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -339,7 +339,7 EXTRACT_LOCAL_METHODS = YES
339 # name of the file that contains the anonymous namespace. By default
339 # name of the file that contains the anonymous namespace. By default
340 # anonymous namespace are hidden.
340 # anonymous namespace are hidden.
341
341
342 EXTRACT_ANON_NSPACES = NO
342 EXTRACT_ANON_NSPACES = YES
343
343
344 # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
344 # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
345 # undocumented members of documented classes, files or namespaces.
345 # undocumented members of documented classes, files or namespaces.
@@ -497,7 +497,7 SHOW_USED_FILES = YES
497 # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
497 # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
498 # in the documentation. The default is NO.
498 # in the documentation. The default is NO.
499
499
500 SHOW_DIRECTORIES = NO
500 SHOW_DIRECTORIES = YES
501
501
502 # Set the SHOW_FILES tag to NO to disable the generation of the Files page.
502 # Set the SHOW_FILES tag to NO to disable the generation of the Files page.
503 # This will remove the Files entry from the Quick Index and from the
503 # This will remove the Files entry from the Quick Index and from the
@@ -677,7 +677,7 EXCLUDE_SYMBOLS =
677 # directories that contain example code fragments that are included (see
677 # directories that contain example code fragments that are included (see
678 # the \include command).
678 # the \include command).
679
679
680 EXAMPLE_PATH =
680 EXAMPLE_PATH = Doc/ressources/examples
681
681
682 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
682 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
683 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
683 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
@@ -827,13 +827,13 HTML_FILE_EXTENSION = .html
827 # each generated HTML page. If it is left blank doxygen will generate a
827 # each generated HTML page. If it is left blank doxygen will generate a
828 # standard header.
828 # standard header.
829
829
830 HTML_HEADER =
830 HTML_HEADER = Doc/ressources/Header
831
831
832 # The HTML_FOOTER tag can be used to specify a personal HTML footer for
832 # The HTML_FOOTER tag can be used to specify a personal HTML footer for
833 # each generated HTML page. If it is left blank doxygen will generate a
833 # each generated HTML page. If it is left blank doxygen will generate a
834 # standard footer.
834 # standard footer.
835
835
836 HTML_FOOTER =
836 HTML_FOOTER = Doc/ressources/Footer
837
837
838 # The HTML_STYLESHEET tag can be used to specify a user-defined cascading
838 # The HTML_STYLESHEET tag can be used to specify a user-defined cascading
839 # style sheet that is used by each HTML page. It can be used to
839 # style sheet that is used by each HTML page. It can be used to
@@ -842,7 +842,7 HTML_FOOTER =
842 # the style sheet file to the HTML output directory, so don't put your own
842 # the style sheet file to the HTML output directory, so don't put your own
843 # stylesheet in the HTML output directory as well, or it will be erased!
843 # stylesheet in the HTML output directory as well, or it will be erased!
844
844
845 HTML_STYLESHEET =
845 HTML_STYLESHEET = Doc/ressources/doxygen.css
846
846
847 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
847 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
848 # Doxygen will adjust the colors in the stylesheet and background images
848 # Doxygen will adjust the colors in the stylesheet and background images
@@ -852,7 +852,7 HTML_STYLESHEET =
852 # 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
852 # 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
853 # The allowed range is 0 to 359.
853 # The allowed range is 0 to 359.
854
854
855 HTML_COLORSTYLE_HUE = 220
855 HTML_COLORSTYLE_HUE = 218
856
856
857 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
857 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
858 # the colors in the HTML output. For a value of 0 the output will use
858 # the colors in the HTML output. For a value of 0 the output will use
@@ -1059,7 +1059,7 ENUM_VALUES_PER_LINE = 4
1059 # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
1059 # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
1060 # Windows users are probably better off using the HTML help feature.
1060 # Windows users are probably better off using the HTML help feature.
1061
1061
1062 GENERATE_TREEVIEW = NO
1062 GENERATE_TREEVIEW = YES
1063
1063
1064 # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
1064 # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
1065 # and Class Hierarchy pages using a tree view instead of an ordered list.
1065 # and Class Hierarchy pages using a tree view instead of an ordered list.
@@ -1491,7 +1491,7 HIDE_UNDOC_RELATIONS = YES
1491 # toolkit from AT&T and Lucent Bell Labs. The other options in this section
1491 # toolkit from AT&T and Lucent Bell Labs. The other options in this section
1492 # have no effect if this option is set to NO (the default)
1492 # have no effect if this option is set to NO (the default)
1493
1493
1494 HAVE_DOT = NO
1494 HAVE_DOT = YES
1495
1495
1496 # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
1496 # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
1497 # allowed to run in parallel. When set to 0 (the default) doxygen will
1497 # allowed to run in parallel. When set to 0 (the default) doxygen will
@@ -1547,7 +1547,7 GROUP_GRAPHS = YES
1547 # collaboration diagrams in a style similar to the OMG's Unified Modeling
1547 # collaboration diagrams in a style similar to the OMG's Unified Modeling
1548 # Language.
1548 # Language.
1549
1549
1550 UML_LOOK = NO
1550 UML_LOOK = YES
1551
1551
1552 # If set to YES, the inheritance and collaboration graphs will show the
1552 # If set to YES, the inheritance and collaboration graphs will show the
1553 # relations between templates and their instances.
1553 # relations between templates and their instances.
@@ -17,7 +17,7
17 #-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 #-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 #------------------------------------------------------------------------------
18 #------------------------------------------------------------------------------
19
19
20
20 .PHONY:doc
21
21
22 all:
22 all:
23 mkdir -p lib/
23 mkdir -p lib/
@@ -36,6 +36,10 lib:
36 mkdir -p includes/
36 mkdir -p includes/
37 make all -C libsrc
37 make all -C libsrc
38
38
39 doc:
40 rm -R Doc/html/*
41 cp -R Doc/ressources/* Doc/html/
42 doxygen Doxyfile
39
43
40 clean:
44 clean:
41 rm lib/*
45 rm lib/*
@@ -36,8 +36,9
36 on the APB bus by providing scan functions, it extract information such as device Version, IRQ value, Address mask.
36 on the APB bus by providing scan functions, it extract information such as device Version, IRQ value, Address mask.
37 You can use it to print the APB devices list on your SOC.
37 You can use it to print the APB devices list on your SOC.
38
38
39 \author Alexis Jeandet
39 \author Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr
40 \todo implemente a descriptor structure for any APB device
40 \todo implemente a descriptor structure for any APB device
41
41 */
42 */
42
43
43
44
@@ -93,6 +94,7 int* apbgetdevice(int PID,int VID,int co
93 \param count The number of the device you whant to get. For example if you have 3 UARTS on your SOC you whant
94 \param count The number of the device you whant to get. For example if you have 3 UARTS on your SOC you whant
94 to use UART1 so count = 2.
95 to use UART1 so count = 2.
95 \param devinfo The device information structure to be populated.
96 \param devinfo The device information structure to be populated.
97 \example scanAPB.c
96 */
98 */
97 void apbgetdeviceinfofromid(int PID,int VID,int count,struct apbdevinfo* devinfo);
99 void apbgetdeviceinfofromid(int PID,int VID,int count,struct apbdevinfo* devinfo);
98
100
@@ -61,7 +61,10 Patched-dist: Patch-GRLIB
61
61
62
62
63 doc:
63 doc:
64 cp doc/ressources/*.jpg doc/html/
65 cp doc/ressources/doxygen.css doc/html/
64 make -C lib/lpp doc
66 make -C lib/lpp doc
67 make -C LPP_drivers doc
65
68
66
69
67 pdf: doc
70 pdf: doc
@@ -31,7 +31,7 PROJECT_NAME = lib-lpp
31 # This could be handy for archiving the generated documentation or
31 # This could be handy for archiving the generated documentation or
32 # if some version control system is used.
32 # if some version control system is used.
33
33
34 PROJECT_NUMBER = 1.0
34 PROJECT_NUMBER = 0.4
35
35
36 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
36 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
37 # base path where the generated documentation will be put.
37 # base path where the generated documentation will be put.
@@ -733,7 +733,7 FILTER_SOURCE_FILES = NO
733 # Note: To get rid of all source code in the generated output, make sure also
733 # Note: To get rid of all source code in the generated output, make sure also
734 # VERBATIM_HEADERS is set to NO.
734 # VERBATIM_HEADERS is set to NO.
735
735
736 SOURCE_BROWSER = NO
736 SOURCE_BROWSER = YES
737
737
738 # Setting the INLINE_SOURCES tag to YES will include the body
738 # Setting the INLINE_SOURCES tag to YES will include the body
739 # of functions and classes directly in the documentation.
739 # of functions and classes directly in the documentation.
@@ -827,13 +827,13 HTML_FILE_EXTENSION = .html
827 # each generated HTML page. If it is left blank doxygen will generate a
827 # each generated HTML page. If it is left blank doxygen will generate a
828 # standard header.
828 # standard header.
829
829
830 HTML_HEADER =
830 HTML_HEADER = ../../doc/ressources/Header
831
831
832 # The HTML_FOOTER tag can be used to specify a personal HTML footer for
832 # The HTML_FOOTER tag can be used to specify a personal HTML footer for
833 # each generated HTML page. If it is left blank doxygen will generate a
833 # each generated HTML page. If it is left blank doxygen will generate a
834 # standard footer.
834 # standard footer.
835
835
836 HTML_FOOTER =
836 HTML_FOOTER = ../../doc/ressources/Footer
837
837
838 # The HTML_STYLESHEET tag can be used to specify a user-defined cascading
838 # The HTML_STYLESHEET tag can be used to specify a user-defined cascading
839 # style sheet that is used by each HTML page. It can be used to
839 # style sheet that is used by each HTML page. It can be used to
@@ -842,7 +842,7 HTML_FOOTER =
842 # the style sheet file to the HTML output directory, so don't put your own
842 # the style sheet file to the HTML output directory, so don't put your own
843 # stylesheet in the HTML output directory as well, or it will be erased!
843 # stylesheet in the HTML output directory as well, or it will be erased!
844
844
845 HTML_STYLESHEET =
845 HTML_STYLESHEET = ../../doc/ressources/doxygen.css
846
846
847 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
847 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
848 # Doxygen will adjust the colors in the stylesheet and background images
848 # Doxygen will adjust the colors in the stylesheet and background images
@@ -1059,7 +1059,7 ENUM_VALUES_PER_LINE = 4
1059 # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
1059 # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
1060 # Windows users are probably better off using the HTML help feature.
1060 # Windows users are probably better off using the HTML help feature.
1061
1061
1062 GENERATE_TREEVIEW = NO
1062 GENERATE_TREEVIEW = YES
1063
1063
1064 # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
1064 # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
1065 # and Class Hierarchy pages using a tree view instead of an ordered list.
1065 # and Class Hierarchy pages using a tree view instead of an ordered list.
@@ -1146,13 +1146,13 MAKEINDEX_CMD_NAME = makeindex
1146 # LaTeX documents. This may be useful for small projects and may help to
1146 # LaTeX documents. This may be useful for small projects and may help to
1147 # save some trees in general.
1147 # save some trees in general.
1148
1148
1149 COMPACT_LATEX = NO
1149 COMPACT_LATEX = YES
1150
1150
1151 # The PAPER_TYPE tag can be used to set the paper type that is used
1151 # The PAPER_TYPE tag can be used to set the paper type that is used
1152 # by the printer. Possible values are: a4, a4wide, letter, legal and
1152 # by the printer. Possible values are: a4, a4wide, letter, legal and
1153 # executive. If left blank a4wide will be used.
1153 # executive. If left blank a4wide will be used.
1154
1154
1155 PAPER_TYPE = a4wide
1155 PAPER_TYPE = letter
1156
1156
1157 # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
1157 # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
1158 # packages that should be included in the LaTeX output.
1158 # packages that should be included in the LaTeX output.
@@ -1469,7 +1469,7 PERL_PATH = /usr/bin/perl
1469 # fallback. It is recommended to install and use dot, since it yields more
1469 # fallback. It is recommended to install and use dot, since it yields more
1470 # powerful graphs.
1470 # powerful graphs.
1471
1471
1472 CLASS_DIAGRAMS = YES
1472 CLASS_DIAGRAMS = NO
1473
1473
1474 # You can define message sequence charts within doxygen comments using the \msc
1474 # You can define message sequence charts within doxygen comments using the \msc
1475 # command. Doxygen will then run the mscgen tool (see
1475 # command. Doxygen will then run the mscgen tool (see
@@ -1547,7 +1547,7 GROUP_GRAPHS = YES
1547 # collaboration diagrams in a style similar to the OMG's Unified Modeling
1547 # collaboration diagrams in a style similar to the OMG's Unified Modeling
1548 # Language.
1548 # Language.
1549
1549
1550 UML_LOOK = NO
1550 UML_LOOK = YES
1551
1551
1552 # If set to YES, the inheritance and collaboration graphs will show the
1552 # If set to YES, the inheritance and collaboration graphs will show the
1553 # relations between templates and their instances.
1553 # relations between templates and their instances.
@@ -25,70 +25,79 library lpp;
25 use lpp.lpp_ad_conv.all;
25 use lpp.lpp_ad_conv.all;
26 use lpp.general_purpose.Clk_divider;
26 use lpp.general_purpose.Clk_divider;
27
27
28
29 --! \brief AD7688 driver, generates all needed signal to drive this ADC.
30 --!
31 --! \author Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr
32
28 entity AD7688_drvr is
33 entity AD7688_drvr is
29 generic(ChanelCount : integer;
34 generic(
30 clkkHz : integer);
35 ChanelCount :integer; --! Number of ADC you whant to drive
31 Port ( clk : in STD_LOGIC;
36 clkkHz :integer --! System clock frequency in kHz usefull to generate some pulses with good width.
32 reset : in STD_LOGIC;
37 );
33 smplClk: in STD_LOGIC;
38 Port(
34 DataReady : out std_logic;
39 clk : in STD_LOGIC; --! System clock
35 smpout : out Samples_out(ChanelCount-1 downto 0);
40 reset : in STD_LOGIC; --! System reset
36 AD_in : in AD7688_in(ChanelCount-1 downto 0);
41 smplClk : in STD_LOGIC; --! Sampling clock
37 AD_out : out AD7688_out);
42 DataReady : out std_logic; --! New sample available
43 smpout : out Samples_out(ChanelCount-1 downto 0); --! Samples
44 AD_in : in AD7688_in(ChanelCount-1 downto 0); --! Input signals for ADC see lpp.lpp_ad_conv
45 AD_out : out AD7688_out --! Output signals for ADC see lpp.lpp_ad_conv
46 );
38 end AD7688_drvr;
47 end AD7688_drvr;
39
48
40 architecture ar_AD7688_drvr of AD7688_drvr is
49 architecture ar_AD7688_drvr of AD7688_drvr is
41
50
42 constant convTrigger : integer:= clkkHz*16/10000; --tconv = 1.6µs
51 constant convTrigger : integer:= clkkHz*16/10000; --tconv = 1.6µs
43
52
44 signal i : integer range 0 to convTrigger :=0;
53 signal i : integer range 0 to convTrigger :=0;
45 signal clk_int : std_logic;
54 signal clk_int : std_logic;
46 signal smplClk_reg : std_logic;
55 signal smplClk_reg : std_logic;
47 signal cnv_int : std_logic;
56 signal cnv_int : std_logic;
48
57
49 begin
58 begin
50
59
51 clkdiv: if clkkHz>=66000 generate
60 clkdiv: if clkkHz>=66000 generate
52 clkdivider: Clk_divider
61 clkdivider: Clk_divider
53 generic map(clkkHz*1000,60000000)
62 generic map(clkkHz*1000,60000000)
54 Port map( clk ,reset,clk_int);
63 Port map( clk ,reset,clk_int);
55 end generate;
56
57 clknodiv: if clkkHz<66000 generate
58 nodiv: clk_int <= clk;
59 end generate;
64 end generate;
60
65
61 AD_out.CNV <= cnv_int;
66 clknodiv: if clkkHz<66000 generate
62 AD_out.SCK <= clk_int;
67 nodiv: clk_int <= clk;
68 end generate;
69
70 AD_out.CNV <= cnv_int;
71 AD_out.SCK <= clk_int;
63
72
64
73
65 sckgen: process(clk,reset)
74 sckgen: process(clk,reset)
66 begin
75 begin
67 if reset = '0' then
76 if reset = '0' then
68 i <= 0;
77 i <= 0;
69 cnv_int <= '0';
78 cnv_int <= '0';
70 smplClk_reg <= '0';
79 smplClk_reg <= '0';
71 elsif clk'event and clk = '1' then
80 elsif clk'event and clk = '1' then
72 if smplClk = '1' and smplClk_reg = '0' then
81 if smplClk = '1' and smplClk_reg = '0' then
73 if i = convTrigger then
82 if i = convTrigger then
74 smplClk_reg <= '1';
83 smplClk_reg <= '1';
75 i <= 0;
84 i <= 0;
76 cnv_int <= '0';
85 cnv_int <= '0';
77 else
86 else
78 i <= i+1;
87 i <= i+1;
79 cnv_int <= '1';
88 cnv_int <= '1';
80 end if;
89 end if;
81 elsif smplClk = '0' and smplClk_reg = '1' then
90 elsif smplClk = '0' and smplClk_reg = '1' then
82 smplClk_reg <= '0';
91 smplClk_reg <= '0';
83 end if;
92 end if;
84 end if;
93 end if;
85 end process;
94 end process;
86
95
87
96
88
97
89 spidrvr: AD7688_spi_if
98 spidrvr: AD7688_spi_if
90 generic map(ChanelCount)
99 generic map(ChanelCount)
91 Port map(clk_int,reset,cnv_int,DataReady,AD_in,smpout);
100 Port map(clk_int,reset,cnv_int,DataReady,AD_in,smpout);
92
101
93
102
94
103
@@ -30,7 +30,8 use lpp.lpp_amba.all;
30 use lpp.apb_devices_list.all;
30 use lpp.apb_devices_list.all;
31 use lpp.lpp_uart.all;
31 use lpp.lpp_uart.all;
32
32
33 --! Driver APB, va faire le lien entre l'IP VHDL de l'UART et le bus Amba
33 --! This is an APB UART you should use it with a processor as UART and drive it with its register over AMBA bus.
34 --! \author Martin Morlot martin.morlot@lpp.polytechnique.fr
34
35
35 entity APB_UART is
36 entity APB_UART is
36 generic (
37 generic (
@@ -41,12 +42,12 entity APB_UART is
41 abits : integer := 8;
42 abits : integer := 8;
42 Data_sz : integer := 8);
43 Data_sz : integer := 8);
43 port (
44 port (
44 clk : in std_logic; --! Horloge du composant
45 clk : in std_logic; --! System clock
45 rst : in std_logic; --! Reset general du composant
46 rst : in std_logic; --! System reset
46 apbi : in apb_slv_in_type; --! Registre de gestion des entr�es du bus
47 apbi : in apb_slv_in_type; --! APB input signals see grlib.amba package
47 apbo : out apb_slv_out_type; --! Registre de gestion des sorties du bus
48 apbo : out apb_slv_out_type; --! APB input signals see grlib.amba package
48 TXD : out std_logic; --! Transmission s�rie, c�t� composant
49 TXD : out std_logic; --! UART Transmission pin
49 RXD : in std_logic --! Reception s�rie, c�t� composant
50 RXD : in std_logic --! UART Reception pin
50 );
51 );
51 end APB_UART;
52 end APB_UART;
52
53
@@ -23,17 +23,19 library IEEE;
23 use IEEE.numeric_std.all;
23 use IEEE.numeric_std.all;
24 use IEEE.std_logic_1164.all;
24 use IEEE.std_logic_1164.all;
25
25
26 --! Generateur de Bauds
26 --! This is an automatic Baud generator. To synchronize baudrate, it measure the smalest time between two transitions of RXD. So to set baud rate, the device connected to this UART should send at least one data such as 0xA5 (0b10100101) witch gives a lot of transition of one bit length.
27
28 --! \author Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr
27
29
28 entity BaudGen is
30 entity BaudGen is
29
31
30 port(
32 port(
31 clk : in std_logic;
33 clk : in std_logic; --! System clock
32 reset : in std_logic;
34 reset : in std_logic; --! System reset
33 Capture : in std_logic;
35 Capture : in std_logic; --! baudrate reset so if you want to synchronize again the baudrate generator, usefull if you whant to decrease speed.
34 Bclk : out std_logic;
36 Bclk : out std_logic; --! Output baud clock
35 RXD : in std_logic;
37 RXD : in std_logic; --! UART Reception pin used to sample baudrate
36 BTrigger : out std_logic_vector(11 downto 0)
38 BTrigger : out std_logic_vector(11 downto 0) --! Current value of the frequency divider
37 );
39 );
38 end BaudGen;
40 end BaudGen;
39
41
@@ -23,20 +23,25 library IEEE;
23 use IEEE.numeric_std.all;
23 use IEEE.numeric_std.all;
24 use IEEE.std_logic_1164.all;
24 use IEEE.std_logic_1164.all;
25
25
26 --! Gestion Reception/Transmission
26 --! \brief Universal shift register can be used to serialize or deserialize data.
27 --!
28 --! \Author Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr
29 --! \todo move to general purpose library, explain more in detail the code and add some schematic in doc.
27
30
28 entity Shift_REG is
31 entity Shift_REG is
29 generic(Data_sz : integer := 10);
32 generic(
33 Data_sz : integer := 10 --! Width of the shift register
34 );
30 port(
35 port(
31 clk : in std_logic;
36 clk : in std_logic; --! System clock
32 Sclk : in std_logic;
37 Sclk : in std_logic; --! Serial clock
33 reset : in std_logic;
38 reset : in std_logic; --! System reset
34 SIN : in std_logic;
39 SIN : in std_logic; --! Serial data in
35 SOUT : out std_logic;
40 SOUT : out std_logic; --! Serial data out
36 Serialize : in std_logic;
41 Serialize : in std_logic; --! Launch serialization
37 Serialized : out std_logic;
42 Serialized : out std_logic; --! Serialization complete
38 D : in std_logic_vector(Data_sz-1 downto 0);
43 D : in std_logic_vector(Data_sz-1 downto 0); --! Parallel data to be shifted out
39 Q : out std_logic_vector(Data_sz-1 downto 0)
44 Q : out std_logic_vector(Data_sz-1 downto 0) --! Unserialized data
40 );
45 );
41 end entity;
46 end entity;
42
47
@@ -90,9 +95,6 begin
90 if (Serialized_int = '0' and Serialize_reg ='1') then
95 if (Serialized_int = '0' and Serialize_reg ='1') then
91 REG <= SIN & D(Data_sz-1 downto 1);
96 REG <= SIN & D(Data_sz-1 downto 1);
92 SOUT <= D(0);
97 SOUT <= D(0);
93 -- elsif CptBits_flag ='1' then
94 -- REG <= SIN & D(Data_sz-1 downto 1);
95 -- SOUT <= D(0);
96 elsif Serialized_int = '0' then
98 elsif Serialized_int = '0' then
97 REG <= SIN & REG(Data_sz-1 downto 1);
99 REG <= SIN & REG(Data_sz-1 downto 1);
98 SOUT <= REG(0);
100 SOUT <= REG(0);
@@ -25,29 +25,29 use IEEE.std_logic_1164.all;
25 library lpp;
25 library lpp;
26 use lpp.lpp_uart.all;
26 use lpp.lpp_uart.all;
27
27
28 --! Programme qui va gerer toute la communication entre le PC et le FPGA
28 --! \brief A general purpose UART with automatic baudrate
29 --!
30 --! \author Alexis Jeandet alexis.jeandet@lpp.polytechnique.fr
29
31
30 entity UART is
32 entity UART is
31 generic(Data_sz : integer := 8); --! Constante de taille pour un mot de donnee
33 generic(Data_sz : integer := 8); --! Data width
32 port(
34 port(
33 clk : in std_logic; --! Horloge a 25Mhz du systeme
35 clk : in std_logic; --! System clock
34 reset : in std_logic; --! Reset du systeme
36 reset : in std_logic; --! System reset
35 TXD : out std_logic; --! Transmission, cote PC
37 TXD : out std_logic; --! UART Transmission pin
36 RXD : in std_logic; --! Reception, cote PC
38 RXD : in std_logic; --! UART Reception pin
37 Capture : in std_logic; --! "Reset" cible pour le generateur de bauds, ici indissocie du reset global
39 Capture : in std_logic; --! Automatic baudrate module reset
38 NwDat : out std_logic; --! Flag, Nouvelle donnee presente
40 NwDat : out std_logic; --! New data flag, means that a new data have been received by the UART
39 ACK : in std_logic; --! Flag, Reponse au flag precedent
41 ACK : in std_logic; --! Acknowledge flag to clear NwDat flag
40 Send : in std_logic; --! Flag, Demande d'envoi sur le bus
42 Send : in std_logic; --! To send a data you have to set this flag
41 Sended : out std_logic; --! Flag, Envoi termine
43 Sended : out std_logic; --! When this flag is set you can sed a new data
42 BTrigger : out std_logic_vector(11 downto 0); --! Registre contenant la valeur du diviseur de frequence pour la transmission
44 BTrigger : out std_logic_vector(11 downto 0); --! Baudrate generator current value, could be usefull if you whant to know the current value of the baudrate or of the oscillator (it suppose that you know baudrate)
43 RDATA : out std_logic_vector(Data_sz-1 downto 0); --! Mot de donnee en provenance de l'utilisateur
45 RDATA : out std_logic_vector(Data_sz-1 downto 0); --! Current read word
44 WDATA : in std_logic_vector(Data_sz-1 downto 0) --! Mot de donnee a transmettre a l'utilisateur
46 WDATA : in std_logic_vector(Data_sz-1 downto 0) --! Put here the word you whant to send
45 );
47 );
46 end entity;
48 end entity;
47
49
48 --! @details Gestion de la Reception/Transmission donc de la Vectorisation/Serialisation
50
49 --! ainsi que la detection et le reglage de le frequence de transmission optimale sur le bus (Generateur de Bauds)
50
51 architecture ar_UART of UART is
51 architecture ar_UART of UART is
52 signal Bclk : std_logic;
52 signal Bclk : std_logic;
53
53
General Comments 0
You need to be logged in to leave comments. Login now