OpenCores
URL https://opencores.org/ocsvn/line_codes/line_codes/trunk

Subversion Repositories line_codes

[/] [line_codes/] [trunk/] [doc/] [src/] [documentation.tex] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 ribamar
\documentclass[11pt]{article}
2
\usepackage[utf8]{inputenc}
3
%\usepackage[brazil]{babel}
4
\usepackage{palatino}
5
\usepackage{fullpage}
6
\usepackage{hyperref}
7
 
8
\usepackage{multicol}
9
\usepackage{graphicx}
10
\usepackage{float}
11
\usepackage{moreverb}
12
\usepackage{verbatim}
13
 
14
\usepackage{multirow}
15
 
16
\title{\textbf{AMI and HDB1 Line Codes - VHDL Implementation.}}
17
\author{Ribamar Santarosa, ribamar@gmail.com}
18
\date{Outubro/Novembro 2006.}
19
 
20
\begin{document}
21
\maketitle
22
 
23
 
24
\begin{abstract}
25
Line codings are methods for coding digital data for making them
26
less susceptible to signal losses during transmission. This project
27
implements the AMI --- Alternate Mark Inverse --- and HDB1 --- High
28
Density Bipolar of order 1 codings. This file documents their
29
implementation.
30
\end{abstract}
31
 
32
\section{Specification.}
33
 
34
 
35
\paragraph{AMI.} This coding takes a binary sequency into a
36
ternary sequency having the signals 0, +1, -1 by the following way:
37
 
38
\begin{itemize}
39
\item Inputs of 1 are coded as +1 or -1 alternately.
40
\item Inputs of 0 are coded always as 0.
41
\end{itemize}
42
 
43
Example:
44
\begin{verbatim}
45
Input
46
 1 0  1 0  1  1 0 0 0  1 0  1  1 0 0  1 0  1 0 0 0  1  1  1
47
Output
48
+1 0 -1 0 +1 -1 0 0 0 +1 0 -1 +1 0 0 -1 0 +1 0 0 0 -1 +1 -1
49
\end{verbatim}
50
 
51
\paragraph{HDB1.} This coding takes a binary sequency into a
52
ternary sequency having the signals 0, +1, -1 by the following way:
53
 
54
\begin{itemize}
55
\item Inputs of 1 are coded as either +1 or -1.
56
\item Paired inputs of 0 are coded as either +1+1 or -1-1.
57
\item Isolated inputs of 0, ie, inputs of 0 not followed by 1 which
58
weren't paired to another 0 (thus forming +1+1 or -1-1) are coded
59
as 0.
60
\item Outputs have always alternate signals. If the last output was
61
-1 and the input is 00, the next output is coded as +1+1, if the
62
last output was -1-1 and the input is 1, the next output is +1.
63
\end{itemize}
64
 
65
Example:
66
\begin{verbatim}
67
Input
68
 1 0  1 0  1  1  0  0 0  1 0  1  1  0  0  1 0  1  0  0  0  0  1  1
69
Output
70
+1 0 -1 0 +1 -1 +1 +1 0 -1 0 +1 -1 +1 +1 -1 0 +1 -1 -1 +1 +1 -1 +1
71
\end{verbatim}
72
 
73
 
74
 
75
%\begin{multicols}{2}
76
 
77
\section{AMI Encoder. }
78
 
79
\begin{figure}[H]
80
\centering
81
\includegraphics[scale=0.35]{estados-ami_enc}
82
\caption[ ]{\label{estados-ami_enc} State Map.  }
83
\end{figure}
84
 
85
\begin{multicols}{2}
86
Truth Table: \\
87
 
88
\begin{tabular}{|c|c|cc|c|}
89
\hline
90
$q$ & $e$ & $S_0$ & $ S_1$ & $q^+$ \\
91
\hline
92
 
93
 
94
\hline
95
1 & 0 & 0 & 0 & 1 \\
96
1 & 1 & 0 & 1 & 0 \\
97
\hline
98
\end{tabular}
99
 
100
Karnaugh Map isn't necessary: \\
101
$ S_0 = e \cdot q'$ \\
102
$ S_1 = e \cdot q $ \\
103
$ q^+ = e \oplus q$ \\
104
 
105
\end{multicols}
106
 
107
%\hrule
108
 
109
\section{AMI Decoder. }
110
\begin{multicols}{2}
111
 
112
 
113
\begin{figure}[H]
114
\centering
115
\includegraphics[scale=0.35]{estados-ami_dec}
116
\caption[ ]{\label{estados-ami_dec} State Map. }
117
\end{figure}
118
 
119
 
120
Truth Table:
121
 
122
\begin{tabular}{|cc|c|}
123
\hline
124
$e_0$ & $e_1$ & $S$  \\
125
\hline
126
 
127
 
128
1 & 0 & 1 \\
129
1 & 1 & $X$ \\
130
\hline
131
\end{tabular}
132
 
133
\vspace{50pt}
134
Karnaugh Map isn't necessary: \\
135
$ S = e_0 + e_1 $ \\
136
 
137
\end{multicols}
138
%\hrule
139
 
140
 
141
\section{HDB1 Encoder. }
142
\begin{figure}[H]
143
\centering
144
\includegraphics[scale=0.35]{estados-hdb1_enc}
145
\caption[ ]{\label{estados-hdb1_enc} State Map. }
146
\end{figure}
147
 
148
 
149
\begin{multicols}{2}
150
 
151
 
152
Truth Table: \\
153
 ~\\
154
\begin{tabular}{|cccc|ccc|cc|}
155
\hline
156
$E$ & $q_0$ & $q_1$ & $q_2$ & $q_0^+$ & $q_1^+$ & $q_2^+$ & $S_0$ & $S_1$ \\
157
\hline
158
$0$ & $0$ & $0$ & $0$ &    $0$ & $0$ & $1$ &    $1$ & $0$  \\
159
$1$ & $0$ & $0$ & $0$ &    $1$ & $1$ & $0$ &    $1$ & $0$  \\
160
\hline
161
$0$ & $0$ & $0$ & $1$ &    $0$ & $1$ & $0$ &    $0$ & $1$  \\
162
$1$ & $0$ & $0$ & $1$ &    $1$ & $1$ & $0$ &    $0$ & $0$  \\
163
\hline
164
$0$ & $0$ & $1$ & $0$ &    $0$ & $1$ & $1$ &    $0$ & $1$  \\
165
$1$ & $0$ & $1$ & $0$ &    $0$ & $0$ & $0$ &    $0$ & $1$  \\
166
\hline
167
$0$ & $0$ & $1$ & $1$ &    $1$ & $0$ & $0$ &    $1$ & $0$  \\
168
$1$ & $0$ & $1$ & $1$ &    $0$ & $0$ & $0$ &    $0$ & $0$  \\
169
\hline
170
$0$ & $1$ & $0$ & $0$ &    $0$ & $0$ & $1$ &    $1$ & $0$  \\
171
$1$ & $1$ & $0$ & $0$ &    $1$ & $1$ & $0$ &    $1$ & $0$  \\
172
\hline
173
$$X$$ & $1$ & $0$ & $1$ &    $$X$$ & $$X$$ & $$X$$ &    $$X$$ & $$X$$  \\
174
\hline
175
$0$ & $1$ & $1$ & $0$ &    $1$ & $1$ & $1$ &    $0$ & $1$  \\
176
$1$ & $1$ & $1$ & $0$ &    $0$ & $0$ & $0$ &    $0$ & $1$  \\
177
\hline
178
$0$ & $1$ & $1$ & $1$ &    $0$ & $0$ & $0$ &    $1$ & $0$  \\
179
$1$ & $1$ & $1$ & $1$ &    $0$ & $0$ & $0$ &    $0$ & $1$  \\
180
\hline
181
\end{tabular}
182
 
183
$q_0^+$:
184
\begin{tabular}{|cc|c|c|c|c|}
185
\hline
186
\multicolumn{6}{|c|}{$E q_0$ } \\
187
           & & \tiny{$00$} & \tiny{$01$}  & \tiny{$11$}  & \tiny{$10$}  \\
188
           & \tiny{$00$} &   &   & 1 & 1 \\
189
$q_1 q_2$  & \tiny{$01$} &   & $X$ & $X$ & 1 \\
190
           & \tiny{$11$} & 1 &   &   &   \\
191
           & \tiny{$10$} &   & 1 &   &   \\
192
\hline
193
\end{tabular}
194
 
195
$q_0^+ = E . q_1' + E'.q_0'.q_1.q_2 + E'.q_0.q_1 . q_2' $
196
 
197
$q_1^+$:
198
\begin{tabular}{|cc|c|c|c|c|}
199
\hline
200
\multicolumn{6}{|c|}{$E q_0$ } \\
201
           & & \tiny{$00$} & \tiny{$01$}  & \tiny{$11$}  & \tiny{$10$}  \\
202
           & \tiny{$00$} &   &   & 1 & 1 \\
203
$q_1 q_2$  & \tiny{$01$} & 1 & $X$ & $X$ & 1 \\
204
           & \tiny{$11$} &   &   &   &   \\
205
           & \tiny{$10$} & 1 & 1 &   &   \\
206
\hline
207
\end{tabular}
208
 
209
$q_1^+ = E . q_1' + q_1'.q_2 + E'.q_1.q_2' $
210
 
211
$q_2^+$:
212
\begin{tabular}{|cc|c|c|c|c|}
213
\hline
214
\multicolumn{6}{|c|}{$E q_0$ } \\
215
           & & \tiny{$00$} & \tiny{$01$}  & \tiny{$11$}  & \tiny{$10$}  \\
216
           & \tiny{$00$} & 1 & 1 &   &   \\
217
$q_1 q_2$  & \tiny{$01$} &   & $X$ & $X$ &   \\
218
           & \tiny{$11$} &   &   &   &   \\
219
           & \tiny{$10$} & 1 & 1 &   &   \\
220
\hline
221
\end{tabular}
222
 
223
$q_2^+ = E'. q_2'$
224
 
225
$S_0$:
226
\begin{tabular}{|cc|c|c|c|c|}
227
\hline
228
\multicolumn{6}{|c|}{$E q_0$ } \\
229
           & & \tiny{$00$} & \tiny{$01$}  & \tiny{$11$}  & \tiny{$10$}  \\
230
           & \tiny{$00$} & 1 & 1 & 1 & 1 \\
231
$q_1 q_2$  & \tiny{$01$} &   & $X$ & $X$ &   \\
232
           & \tiny{$11$} & 1 & 1 &   &   \\
233
           & \tiny{$10$} &   &   &   &   \\
234
\hline
235
\end{tabular}
236
 
237
$S_0 = q_1'. q_2' + E'.q_1. q_2 $
238
 
239
$S_1$:
240
\begin{tabular}{|cc|c|c|c|c|}
241
\hline
242
\multicolumn{6}{|c|}{$E q_0$ } \\
243
           & & \tiny{$00$} & \tiny{$01$}  & \tiny{$11$}  & \tiny{$10$}  \\
244
           & \tiny{$00$} &   &   &   &   \\
245
$q_1 q_2$  & \tiny{$01$} & 1 & $X$ & $X$ &   \\
246
           & \tiny{$11$} &   &   &   &   \\
247
           & \tiny{$10$} & 1 & 1 & 1 & 1 \\
248
\hline
249
\end{tabular}
250
 
251
$S_1 = q_1. q_2' + E'.q_1'. q_2 $
252
 
253
 
254
\end{multicols}
255
 
256
\vspace{10pt}
257
%\hrule
258 6 ribamar
 
259 3 ribamar
\section{HDB1 Decoder. }
260
 
261
\begin{figure}[H]
262
\centering
263
\includegraphics[scale=0.2665]{estados-hdb1_dec}
264
\caption[ ]{\label{estados-hdb1_dec} State Map. }
265
\end{figure}
266
 
267
 
268
\begin{multicols}{2}
269
 
270
Truth Table:
271
\begin{tabular}{|cc|cc|cc|c|}
272
\hline
273
$e_1$ & $e_0$ & $q_1$ & $q_0$ & $q^+_0$ & $q^+_1$ & $S$ \\
274
\hline
275
 
276
 
277
 
278
 
279
\hline
280
 
281
 
282
 
283
 
284
\hline
285
1 & 0 & 0 & 0   & 0 & 1 & 0 \\
286
1 & 0 & 0 & 1   & 1 & 0 & 1 \\
287
1 & 0 & 1 & 0   & 0 & 0 & 0 \\
288
1 & 0 & 1 & 1   & $X$ & $X$ & $X$ \\
289
\hline
290
1 & 1 & 0 & 0   & $X$ & $X$ & $X$ \\
291
1 & 1 & 0 & 1   & $X$ & $X$ & $X$ \\
292
1 & 1 & 1 & 0   & $X$ & $X$ & $X$ \\
293
1 & 1 & 1 & 1   & $X$ & $X$ & $X$ \\
294
\hline
295
\end{tabular}
296
 
297
$q0$:
298
\begin{tabular}{|cc|c|c|c|c|}
299
\hline
300
\multicolumn{6}{|c|}{$q_1 q_0$ } \\
301
           & & \tiny{$00$} & \tiny{$01$}  & \tiny{$11$}  & \tiny{$10$}  \\
302
           & \tiny{$00$} &   &   & $X$ &   \\
303
$e_0 e_1$  & \tiny{$01$} &   &   & $X$ &   \\
304
           & \tiny{$11$} & $X$ & $X$ & $X$ & $X$ \\
305
           & \tiny{$10$} &   & 1 & $X$ &   \\
306
\hline
307
\end{tabular}
308
 
309
$q_0^+ = q_0'. e_0$
310
 
311
$q1$:
312
\begin{tabular}{|cc|c|c|c|c|}
313
\hline
314
\multicolumn{6}{|c|}{$q_1 q_0$ } \\
315
           & & \tiny{$00$} & \tiny{$01$}  & \tiny{$11$}  & \tiny{$10$}  \\
316
           & \tiny{$00$} &   &   & $X$ &   \\
317
$e_0 e_1$  & \tiny{$01$} & 1 &   & $X$ & 1 \\
318
           & \tiny{$11$} & $X$ & $X$ & $X$ & $X$ \\
319
           & \tiny{$10$} & 1 &   & $X$ &   \\
320
\hline
321
\end{tabular}
322
 
323
 
324
$q_1^+ = q_1'. e_1$
325
 
326
$S$:
327
\begin{tabular}{|cc|c|c|c|c|}
328
\hline
329
\multicolumn{6}{|c|}{$q_1 q_0 $ } \\
330
           & & \tiny{$00$} & \tiny{$01$}  & \tiny{$11$}  & \tiny{$10$}  \\
331
           & \tiny{$00$} &   & 1 & $X$ & 1 \\
332
$e_1 e_2$  & \tiny{$01$} &   &   & $X$ & 1 \\
333
           & \tiny{$11$} & $X$ & $X$ & $X$ & $X$ \\
334
           & \tiny{$10$} &   & 1 & $X$ &   \\
335
\hline
336
\end{tabular}
337
 
338
$ S = q_0. e_0' + q_1. e_1' $
339
 
340
 
341
\vspace{10pt}
342
 
343
\end{multicols}
344
 
345
%\hrule
346
 
347
 
348
\end{document}
349
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.