1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
|
% !TEX root = dt-slides-dt.tex
\section{Sequentielle Schaltungen}
\begin{frame}
\frametitle{Sequentielle Schaltungen}
\center
\Huge Sequentielle Schaltungen
\end{frame}
\begin{frame}
\frametitle{Kombinatorische Schleife (combinational loop)}
\begin{alertblock}{Nicht benutzen!}
Ein Ringoszillator wird in digitalen Schaltung nicht benutzt, weil die Frequenz zu stark von Fertigungstoleranzen, Spannung und Temperatur abhängt.
\end{alertblock}
\begin{block}{Kombinatorische Schleife kann schwingen}
Wenn der Ausgang einer kombinatorischen Schaltung wieder auf den Eingang zurückgeführt wird, dann wird das kombinatorische Schleife genannt. Eine solche kombinatorische Schleife kann schwingen. Das Verhalten einer kombinatorischen Schleife kann nicht mehr mit einer WHT beschrieben werden. Hier: Ringoszillator
\end{block}
\vspace{5mm}
\begin{circuitikz}
\ctikzset{tripoles/european not symbol=ieee circle}
\draw(0,0) node[muxdemux,
muxdemux def={Rh=1, Lh=2, NL=2, NB=1,w=1},
muxdemux label = {L1=0, L2=1}] (mux) {};
\draw (mux.rpin 1) -- node[above] {x0} ++(right:1) node[european not port,anchor = in 1] (inv0) {};
\draw (inv0.out) -- node[above] {x1} ++(right:1) node[european not port,anchor = in 1] (inv1) {};
\draw (inv1.out) -- node[above] {x2} ++(right:1) node[european not port,anchor = in 1] (inv2) {};
\draw (inv2.out) -- node[above] {x3} ++(right:1) -- ++(up:1) -| (mux.lpin 1);
\draw (mux.lpin 2) node[anchor=east] {1};
\draw (mux.bpin 1) node[anchor=north] {sel};
\end{circuitikz}
\vspace{3mm}
\begin{tikztimingtable}
sel & 10H50L\\
x0 & 12H8L8H8L8H8L8H \\
x1 & 14L8H8L8H8L8H6L \\
x2 & 16H8L8H8L8H8L4H \\
x3 & 18L8H8L8H8L8H2L \\
\extracode
\begin{pgfonlayer}{background}
\begin{scope}[semitransparent ,semithick]
\vertlines[black]{2,4,...,58}
\horlines{2,3,...,4}
\end{scope}
\end{pgfonlayer}
\end{tikztimingtable}
\end{frame}
\begin{frame}
\frametitle{RS Flipflop - nicht benötigt}
\begin{alertblock}{RS Flipflops werden nicht eingesetzt}
RS Flipflops werden in digitalen Schaltungen nicht mehr eingesetzt.
\end{alertblock}
\vspace{5mm}
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{circuitikz}
\ctikzset{tripoles/european not symbol=ieee circle}
\draw (0,3) node[european nor port] (nor2) {};
\draw (0,0) node[european nor port] (nor1) {};
\draw (nor2.in 2) -- ++(down:0.5) coordinate (c0) {};
\draw (nor1.out) -- ++(up:0.75) -- (c0);
\draw (nor1.in 1) -- ++(up:0.5) coordinate (c1) {};
\draw (nor2.out) -- ++(down:0.75) -- (c1);
\draw (nor1.out) node[circ] {} -- ++(right:1) node[anchor=west] {$\overline{\textrm{Q}}$};
\draw (nor2.out) node[circ] {} -- ++(right:1) node[anchor=west] {$\textrm{Q}$};
\draw (nor1.in 2) -- ++(left:1) node[anchor=east] {S};
\draw (nor2.in 1) -- ++(left:1) node[anchor=east] {R};
\end{circuitikz}
\end{column}
\begin{column}{0.5\textwidth}
\begin{tabular}{cc|cc}
R & S & $\textrm{Q}$ & $\overline{\textrm{Q}}$\\\hline
0 & 0 & * & *\\
0 & 1 & 1 & 0\\
1 & 0 & 0 & 1\\
1 & 1 & 0 & 0
\end{tabular}
\end{column}
\end{columns}
\vspace{5mm}
\begin{block}{RS Flipflop aus NOR Gattern}
Ein RS Flipflop kann aus NOR Gattern mit einer kombinatorischen Schleife gebaut werden. Mit dieser Konstruktion lassen sich Daten speichern.
\end{block}
\end{frame}
\begin{frame}
\frametitle{Latch - taktpegelgesteuertes Flipflop - nicht benötigt}
\begin{alertblock}{Latches werden nicht eingesetzt}
Latches werden in digitalen Schaltungen nicht mehr eingesetzt, weil die Timingverifikation kompliziert ist. Sie entstehen häufig unbeabsichtigt durch falschen VHDL Code für Kombinatorik.
\end{alertblock}
\begin{block}{Latch Funktion}
Wenn am Takteingang ein Highpegel anliegt, dann ist das Latch transparent und der Ausgang Q folgt dem Eingang D. Wenn das Signal am Takteingang von High nach Low wechselt, wird der Wert am D Eingang gespeichert. Der Ausgang zeigt den gespeicherten Wert.
\end{block}
\begin{circuitikz}
\ctikzset{flipflops/scale=0.6}
\draw (0,0) node[latch] (ff) {};
\draw (ff.pin 1) node[anchor=east] {d};
\draw (ff.pin 6) node[anchor=west] {q};
\draw (ff.pin 3) node[anchor=east] {clk};
\end{circuitikz}
\vspace{1cm}
\begin{tikztimingtable}
clk & 8L4H2L2H3L1H2L2H3L3H4L3H5L2H2L2H2L\\
d & 2L1H3L3H1L1H2L5H3L4H4L6H4L1H1L9H \\
q & 8U1H1L1H3L5H3L5H2L6H7L8H \\
\extracode
\begin{pgfonlayer}{background}
\begin{scope}[semitransparent ,semithick]
\vertlines[black]{2,4,...,48}
\horlines{2,3,...,3}
\end{scope}
\end{pgfonlayer}
\end{tikztimingtable}
\end{frame}
\begin{frame}
\frametitle{D-Flipflop - taktflankengesteuert}
\begin{block}{D-Flipflop - sonst nichts...}
Dieser Flipfloptyp wird in fast allen digitalen Schaltungen verwendet.
\end{block}
\begin{block}{D-Flipflop mit optionalem asynchronem Set/Reset}
Das D Flipflop kann einen zusätzlichen asynchronen Set- oder Reseteingang haben.
\end{block}
\begin{block}{D-Flipflop Funktion}
Wenn der asynchrone Set oder Reset nicht aktiv ist, dann wird der Wert am D Eingang bei einer steigenden Taktflanke im Flipflop gespeichert. Die gespeicherten Daten sind am Ausgang Q sichtbar. Wenn der asynchrone Set aktiv ist, dann wird der Speicherzustand auf 1 gesetzt. Wenn der asynchrone Reset aktiv ist, dann wird der Speicherzustand auf 0 gesetzt.
\end{block}
\begin{circuitikz}
\ctikzset{flipflops/scale=0.5}
\draw (0,0) node[flipflop D, flipflop def={td=R, nd=1}] (ff) {};
\draw (ff.pin 1) node[anchor=east] {d};
\draw (ff.pin 6) node[anchor=west] {q};
\draw (ff.pin 3) node[anchor=east] {clk};
\draw (ff.down) -- ++(down:0.2) node[anchor=north] {rst\_n};
\draw (3,0) node[flipflop D, flipflop def={tu=S, nu=1}] (ffset) {};
\draw (6,0) node[flipflop D] (ffset) {};
\draw (9,0) node[flipflop D, flipflop def={n3=1}] (ffset) {};
\end{circuitikz}
\vspace{2mm}
\begin{tikztimingtable}
clk & 8L4H2L2H3L1H2L2H3L3H4L3H5L2H2L2H2L\\
d & 2L1H3L3H1L1H2L5H3L4H4L6H4L1H1L9H \\
rst\_n & 38H5L7H \\
q & 8U11H3L5H7L4H8L4H \\
\extracode
\begin{pgfonlayer}{background}
\begin{scope}[semitransparent ,semithick]
\vertlines[black]{2,4,...,48}
\horlines{2,3,...,4}
\end{scope}
\end{pgfonlayer}
\end{tikztimingtable}
\end{frame}
\begin{frame}
\frametitle{Taktoszillator}
\begin{block}{Taktquelle - Oszillator}
Das Taktsignal für die Flipflops wird mit einem Oszillator erzeugt. Das Signal vom Oszillator ist ein Rechtecksignal mit einer Frequenz, die vom Oszillator abhängt. Auf dem Terasic DE1 FPGA Board sind drei Oszillatorschaltungen für Taktsignale mit 24, 27 und 50 MHz Taktfrequenz.
\end{block}
\begin{block}{Optional - Phased Locked Loop (PLL)}
Auf dem Altera FPGA IC befindet sich zusätzlich eine "Phased Locked Loop" mit der aus dem Taktsignal vom Oszillator ein Signal mit einer höheren Frequenz generiert werden kann. So kann beispielsweise ein Taktsignal mit einer Frequenz von 200 MHz auf dem FPGA erzeugt werden.
\end{block}
\begin{center}
\includegraphics[width=0.5\textwidth]{sequential/oszillator}
\captionof{figure}{Oszillatoren auf dem Terasic DE1 FPGA Board}
\end{center}
\end{frame}
\begin{frame}
\frametitle{Toggleschaltung}
\begin{block}{Toggleschaltung - die kleinste sequentielle Schaltung}
Ich nenne diese Schaltung Toggleschaltung, da der Zustand des Flipflops in jedem Takt invertiert wird.
\end{block}
\vspace{1cm}
\hspace{1cm}
\begin{circuitikz}
\ctikzset{flipflops/scale=0.5}
\ctikzset{tripoles/european not symbol=ieee circle}
\draw (0,0) node[flipflop D, flipflop def={td=R, nd=1}] (ff) {};
\draw (ff.pin 1) -- node[above] {d} ++(left:1) node[european not port] (inv0) {};
\draw (ff.pin 6) -- node[above] {q} ++(right:1) -- ++(up:1) -| (inv0.in 1);
\draw (ff.pin 3) node[anchor=east] {clk};
\draw (ff.down) -- ++(down:0.2) node[anchor=north] {rst\_n};
\end{circuitikz}
\vspace{1cm}
\begin{tikztimingtable}
clk & 12{2C2C} \\
d & 10.4H4L4H4L4H4L4H1L13H \\
rst\_n & 7L28H13L \\
q & 10.2L4H4L4H4L4H4L1H13L \\
\extracode
\begin{pgfonlayer}{background}
\begin{scope}[semitransparent ,semithick]
\vertlines[black]{2,4,...,48}
\horlines{2,3,...,4}
\end{scope}
\end{pgfonlayer}
\end{tikztimingtable}
\end{frame}
\begin{frame}
\frametitle{Toggleschaltung - Timing im Detail}
\begin{block}{Toggleschaltung - Wie ist der genaue Ablauf?}
\begin{itemize}
\item Bei einer steigenden Flanke am Takteingang des Flipflops wird der Wert am D Eingang im Flipflop gespeichert
\item Nach der Zeit $t_{CQ}$ \glqq Clock to Output Delay\grqq\, erscheint der neue Wert am Ausgang Q
\item Damit ändert sich der Eingang des Inverters
\item Nach der Zeit $t_{pHL}$ oder $t_{pLH}$ \glqq Propagationdelay\grqq\, ändert sich der Ausgang des Inverters
\item Der Ausgang des Inverters ist der neue Wert am D Eingang des Flipflops
\end{itemize}
\end{block}
\begin{columns}
\begin{column}{0.45\textwidth}
\hspace{1cm}
\begin{circuitikz}[scale=0.7, transform shape]
\ctikzset{flipflops/scale=0.5}
\ctikzset{tripoles/european not symbol=ieee circle}
\draw (0,0) node[flipflop D, flipflop def={td=R, nd=1}] (ff) {};
\draw (ff.pin 1) -- node[above] {d} ++(left:1) node[european not port] (inv0) {};
\draw (ff.pin 6) -- node[above] {q} ++(right:1) -- ++(up:1) -| (inv0.in 1);
\draw (ff.pin 3) node[anchor=east] {clk};
\draw (ff.down) -- ++(down:0.2) node[anchor=north] {rst\_n};
\end{circuitikz}
\end{column}
\begin{column}{0.45\textwidth}
\begin{tabular}{cc}
Parameter & Wert/ns\\\hline
$t_{CQ}$ & 1,0\\
$t_{pHL}$ & 2,0\\
$t_{pLH}$ & 3,0\\
\end{tabular}
\end{column}
\end{columns}
\begin{tikztimingtable}
clk & 3{8C8C} \\
rst\_n & 5L43H \\
d & 14H18L14H2L\\
q & 10L16H16L6H \\
\extracode
\begin{pgfonlayer}{background}
\begin{scope}[semitransparent ,semithick]
\vertlines[black]{2,4,...,48}
\horlines{2,3,...,4}
\draw[latex-latex, black, opacity=1.0] (8,1.4) -- node[above] {$t_{CQ}$}++(right:2);
\draw[latex-latex, black, opacity=1.0] (24,1.4) -- node[above] {$t_{CQ}$}++(right:2);
\draw[latex-latex, black, opacity=1.0] (10,1.4) -- node[above] {$t_{pHL}$}++(right:4);
\draw[latex-latex, black, opacity=1.0] (26,1.4) -- node[above] {$t_{pLH}$}++(right:6);
\draw[latex-latex, black, opacity=1.0] (4,1.2) -- node[above] {$1 ns$} ++(left:2);
\end{scope}
\end{pgfonlayer}
\end{tikztimingtable}
\end{frame}
\begin{frame}
\frametitle{Schieberegister}
\begin{circuitikz}
\ctikzset{flipflops/scale=0.5}
%\ctikzset{tripoles/european not symbol=ieee circle}
\draw (0,0) node[flipflop D, flipflop def={td=R, nd=1}] (ff0) {};
\draw (3,0) node[flipflop D, flipflop def={td=R, nd=1}] (ff1) {};
\draw (6,0) node[flipflop D, flipflop def={td=R, nd=1}] (ff2) {};
\draw (ff0.pin 6) -- node[above] {q0} (ff1.pin 1);
\draw (ff1.pin 6) -- node[above] {q1} (ff2.pin 1);
\draw (ff2.pin 6) -- node[above] {q2} ++(right:1) node[anchor=west] {ser\_o};
\draw (ff0.pin 1) -- ++(left:1) node[anchor=east] {ser\_i};
\draw (ff0.pin 3) -- ++(down:1) node[circ] (c0) {} -- ++(left:1) node[anchor=east] (clk) {clk};
\draw (ff2.pin 3) |- (c0);
\draw (ff1.pin 3) -- (ff1.pin 3 |- c0) node[circ] {};
\draw (clk.east) ++(down:0.5) node[anchor=east] (rst) {rst\_n};
\draw (ff2.down) |- (rst.east);
\draw (ff1.down) -- (ff1.down |- rst.east) node[circ] {};
\draw (ff0.down) -- (ff0.down |- rst.east) node[circ] {};
\end{circuitikz}
\vspace{2cm}
\begin{tikztimingtable}
clk & 12{2C2C} \\
ser\_i & 11L22H4L8H \\
rst\_n & 7L36H3L \\
q0 & 14L20H4L5H5L \\
q1 & 18L20H4L1H5L \\
q2 & 22L20H6L \\
\extracode
\begin{pgfonlayer}{background}
\begin{scope}[semitransparent ,semithick]
\vertlines[black]{2,4,...,48}
\horlines{2,3,...,4}
\end{scope}
\end{pgfonlayer}
\end{tikztimingtable}
\end{frame}
\begin{frame}
\frametitle{Ringzähler}
\begin{circuitikz}
\ctikzset{flipflops/scale=0.5}
%\ctikzset{tripoles/european not symbol=ieee circle}
\draw (0,0) node[flipflop D, flipflop def={tu=S, nu=1}] (ff0) {};
\draw (3,0) node[flipflop D, flipflop def={td=R, nd=1}] (ff1) {};
\draw (6,0) node[flipflop D, flipflop def={td=R, nd=1}] (ff2) {};
\draw (ff0.pin 6) -- node[above] {q0} (ff1.pin 1);
\draw (ff1.pin 6) -- node[above] {q1} (ff2.pin 1);
\draw (ff2.pin 6) -- node[above] {q2} ++(right:1) -- ++(up:1) -| (ff0.pin 1);
\draw (ff0.pin 3) -- ++(down:1) node[circ] (c0) {} -- ++(left:1) node[anchor=east] (clk) {clk};
\draw (ff2.pin 3) |- (c0);
\draw (ff1.pin 3) -- (ff1.pin 3 |- c0) node[circ] {};
\draw (clk.east) ++(down:0.5) node[anchor=east] (rst) {rst\_n};
\draw (ff2.down) |- (rst.east);
\draw (ff1.down) -- (ff1.down |- rst.east) node[circ] {};
\draw (ff0.up) -- ++(up:0.2) -- ++(right:0.7) coordinate (s0) {} -- (s0 |- rst.east) node[circ] {};
\end{circuitikz}
\vspace{2cm}
\begin{tikztimingtable}
clk & 12{2C2C} \\
rst\_n & 7L36H3L \\
q0 & 10H8L4H8L4H8L1H5L \\
q1 & 10L4H8L4H8L4H10L \\
q2 & 14L4H8L4H8L4H6L \\
\extracode
\begin{pgfonlayer}{background}
\begin{scope}[semitransparent ,semithick]
\vertlines[black]{2,4,...,48}
\horlines{2,3,...,4}
\end{scope}
\end{pgfonlayer}
\end{tikztimingtable}
\end{frame}
\begin{frame}
\frametitle{Sequentielle Schaltung}
\begin{tikzpicture}[circuit logic IEC, circuit ee IEC, scale = 1.3]
% Flipflop 0
\draw (0,2) node[shape=ff] (r0) {};
\draw (2,2) node[shape=ff] (r1) {};
% Gatter
\draw (r0.Q) -- node[above] {$q_0$} (r1.D) {};
\draw (r1.Q) -- node[above] {$q_1$} ++(right:15mm) node[xor gate, anchor=input 1] (xor0) {};
\draw (xor0.input 2) -- ++(left:5mm) node[anchor=east] {$q_0$};
\draw (xor0.output) -- ++(right:5mm) node[anchor=west] {$y$};
\draw (r0.D) -- node[above] {$x$} ++(left:10mm) node[xnor gate, anchor=output] (xnor0) {};
\draw (xnor0.input 1) -- ++(left:5mm) node[anchor=east] {$q_0$};
\draw (xnor0.input 2) -- ++(left:5mm) node[anchor=east] {$a$};
\draw (r0.CLK) -- ++(left:5mm) --++(down:5mm) node[contact] (c1) {} -- ++(down:5mm) node[anchor=north] {$clk$};
\draw (r1.CLK) -- ++(left:5mm) -- ++(down:5mm) |- (c1);
\draw (r1.R) -- ++(down:5mm) node[contact] (c2) {} -- ++(right:4mm) node[anchor=west] {$rst\_n$};
\draw (r0.R) -- ++(down:5mm) -| (c2);
\end{tikzpicture}
\vspace{2cm}
\begin{tikztimingtable}
clk & 12{2C2C} \\
a & 25L23H\\
x & 10H4L4H4L3H23L\\
rst\_n & 7L36H5L \\
q0 & 10L4H4L4H26L \\
q1 & 10L4L4H4L4H22L \\
y & 10L16H22L \\
\extracode
\begin{pgfonlayer}{background}
\begin{scope}[semitransparent ,semithick]
\vertlines[black]{2,4,...,48}
\horlines{2,3,...,4}
\end{scope}
\end{pgfonlayer}
\end{tikztimingtable}
\end{frame}
\begin{frame}
\frametitle{Asynchroner Reset/Set nicht funktional}
\begin{block}{Asynchroner Reset/Set für Startzustand}
Der asynchrone Set/Reset wird nur beim Einschalten der Schaltung oder zum Initialisieren der Schaltung verwendet. Dazu wird eine Schaltung für den synchronen Release ohne Glitches benötigt.
\end{block}
\begin{alertblock}{Asynchroner Reset/Set nicht aus Logik}
Man darf das asynchrone Set/Reset Signal nicht aus kombinatorischer Logik generieren, weil am Ausgang der Logik Glitches/Hazards entstehen können. Das führt dann unbeabsichtigt zum Rücksetzen von Flipflops.
\end{alertblock}
\begin{circuitikz}
\ctikzset{flipflops/scale=0.5}
%\ctikzset{tripoles/european not symbol=ieee circle}
\draw (0,0) node[flipflop D, flipflop def={td=R, nd=1}] (ff0) {};
\draw (3,0) node[flipflop D, flipflop def={td=R, nd=1}] (ff1) {};
\draw (ff0.pin 6) -- node[above] {q0} (ff1.pin 1);
\draw (ff1.pin 6) -- node[above] {int\_rst\_n} ++(right:1) -- ++(right:2) node[circ] (c0) {} -- ++(up:0.5)
node[flipflop D, flipflop def={td=R, nd=1},anchor=down] (ffi0) {};
\draw (c0) -- ++(right:1.5) node[circ] (c1) {} -- ++(up:0.5) node[flipflop D, flipflop def={td=R, nd=1},anchor=down] (ffi1) {};
\draw (c1) -- ++(right:1.5) -- ++(up:0.5) node[flipflop D, flipflop def={td=R, nd=1},anchor=down] (ffi2) {};
\draw (c1) -- ++(down:0.5) node[flipflop D, flipflop def={tu=S, nu=1},anchor=up] (ffi3) {};
\draw (ff0.pin 1) -- ++(left:1) node[anchor=east] {1};
\draw (ff0.pin 3) -- ++(down:1) node[circ] (c0) {} -- ++(left:1) node[anchor=east] (clk) {clk};
\draw (ff1.pin 3) |- (c0);
\draw (clk.east) ++(down:0.5) node[anchor=east] (rst) {extern\_rst\_n};
\draw (ff1.down) |- (rst.east);
\draw (ff0.down) -- (ff0.down |- rst.east) node[circ] {};
\end{circuitikz}
\end{frame}
\begin{frame}
\frametitle{Synchroner Reset - Beispiel Toggleschaltung}
\begin{block}{Synchroner Reset}
Mit dem synchronen Reset kann ich ein Flipflop in einen Startzustand bringen. Dazu wird vor dem D Eingang ein Multiplexer eingefügt. Dieser synchrone Reset wird funktional verwendet.
\end{block}
\hspace{1cm}
\begin{circuitikz}
\ctikzset{flipflops/scale=0.5}
\ctikzset{tripoles/european not symbol=ieee circle}
\draw (0,0) node[flipflop D, flipflop def={td=R, nd=1}] (ff) {};
\draw (ff.pin 1) -- node[above] {d} ++(left:1)
node[muxdemux,
muxdemux def={Rh=1, Lh=2, NL=2, NB=1,w=1},
muxdemux label = {L1=0, L2=1},
anchor=rpin 1] (mux) {};
\draw (mux.lpin 1) -- node[above] {d\_alt} ++(left:1) node[european not port] (inv0) {};
\draw (ff.pin 6) -- node[above] {q} ++(right:1) -- ++(up:1) -| (inv0.in 1);
\draw (ff.pin 3) node[anchor=east] {clk};
\draw (ff.down) -- ++(down:0.2) node[anchor=north] {rst\_n};
\draw (mux.lpin 2) node[anchor=east] {0};
\draw (mux.bpin 1) node[anchor=north] {sres};
\end{circuitikz}
\vspace{1cm}
\begin{tikztimingtable}
clk & 12{2C2C} \\
sres & 24L11H13L \\
d & 10H4L4H4L2H11L3H4L4H2L \\
rst\_n & 7L41H \\
q & 10L4H4L4H16L4H4L2H \\
\extracode
\begin{pgfonlayer}{background}
\begin{scope}[semitransparent ,semithick]
\vertlines[black]{2,4,...,48}
\horlines{2,3,...,4}
\end{scope}
\end{pgfonlayer}
\end{tikztimingtable}
\end{frame}
\begin{frame}
\frametitle{Synchrones Enable - Beispiel Toggleschaltung}
\begin{block}{Synchrones Enable}
Mit dem synchronen Enable kann ich den Zustand eines Flipflops halten. Dies ist eine Alternative zum "verbotenen" Taktabschalten.
\end{block}
\hspace{1cm}
\begin{circuitikz}
\ctikzset{flipflops/scale=0.5}
\ctikzset{tripoles/european not symbol=ieee circle}
\draw (0,0) node[flipflop D, flipflop def={td=R, nd=1}] (ff) {};
\draw (ff.pin 1) -- node[above] {d} ++(left:1)
node[muxdemux,
muxdemux def={Rh=1, Lh=2, NL=2, NB=1,w=1},
muxdemux label = {L1=0, L2=1},
anchor=rpin 1] (mux) {};
\draw (mux.lpin 2) -- node[above] {d\_alt} ++(left:1) node[european not port] (inv0) {};
\draw (mux.lpin 1) -- ++(up:1) node[circ] (c0) {};
\draw (ff.pin 6) -- node[above] {q} ++(right:1) |- (c0);
\draw (c0) -| (inv0.in 1);
\draw (ff.pin 3) node[anchor=east] {clk};
\draw (ff.down) -- ++(down:0.2) node[anchor=north] {rst\_n};
\draw (mux.bpin 1) node[anchor=north] {en};
\end{circuitikz}
\vspace{1cm}
\begin{tikztimingtable}
clk & 12{2C2C} \\
en & 19H9L20H \\
d & 10H4L4H1L9H2L4H4L4H4L2H \\
rst\_n & 7L41H \\
q & 10L4H4L12H4L4H4L4H2L \\
\extracode
\begin{pgfonlayer}{background}
\begin{scope}[semitransparent ,semithick]
\vertlines[black]{2,4,...,48}
\horlines{2,3,...,4}
\end{scope}
\end{pgfonlayer}
\end{tikztimingtable}
\end{frame}
\begin{frame}
\frametitle{D-Flipflop Timings}
\begin{block}{Setup- und Holdzeit}
Das D-Flipflop speichert die Daten am D-Eingang bei einer steigenden Flanke am Takteingang. Das Signal am D Eingang darf sich in einem Intervall um die Taktflanke nicht ändern. Das Intervall wird durch die Setupzeit $t_{\textrm{SU}}$ und Holdzeit $t_{\textrm{H}}$ festgelegt. Die Setupzeit ist die Zeit vor der Taktflanke während der sich das Signal am D Eingang nicht ändern darf. Die Holdzeit ist die Zeit nach der Taktflanke während der sich das Signal am D Eingang nicht ändern darf.
\end{block}
\begin{block}{Clock to Output Delay}
Wenn der Speicherzustand sich nach einer steigenden Taktflanke ändert, ist das Ergebnis nach dem Clock to Output Delay $t_{\textrm{CQ}}$ sichtbar.
\end{block}
\begin{columns}
\begin{column}{0.3\textwidth}
\begin{circuitikz}
\ctikzset{flipflops/scale=0.5}
\draw (0,0) node[flipflop D, flipflop def={td=R, nd=1}] (ff) {};
\draw (ff.pin 1) node[anchor=east] {d};
\draw (ff.pin 6) node[anchor=west] {q};
\draw (ff.pin 3) node[anchor=east] {clk};
\draw (ff.down) -- ++(down:0.2) node[anchor=north] {rst\_n};
\end{circuitikz}
\end{column}
\begin{column}{0.5\textwidth}
\begin{tabular}{llc}
Parameter & Abk. & Zeit / ns \\\hline
Setupzeit & $t_{\textrm{SU}}$ & 2 \\
Holdzeit & $t_{\textrm{H}}$ & 1 \\
Clock to Output Delay & $t_{\textrm{CQ}}$ & 1,5\\
\end{tabular}
\end{column}
\end{columns}
\vspace{2mm}
\begin{tikztimingtable}
clk & 6L3{8C8C}6C\\
D & 9L24H18L9H \\
Q & 25L16H13L6X \\
\extracode
\begin{pgfonlayer}{background}
\begin{scope}[semitransparent ,semithick]
\vertlines[black]{2,4,...,58}
\horlines{2,3}
\end{scope}
\foreach \p in {6,22,...,54}
{
\draw[latex-latex, black, opacity=1.0] (\p,1.4) -- node[above] {$t_{\textrm{SU}}$}++(left:4);
\draw[draw=none, fill=orange, fill opacity = 0.4] (\p,1) rectangle ++(-4,-6);
\draw[latex-latex, black, opacity=1.0] (\p,1.4) -- node[above] {$t_{\textrm{H}}$}++(right:2);
\draw[draw=none, fill=orange, fill opacity = 0.6] (\p,1) rectangle ++(2,-6);
}
\draw[latex-latex, black, opacity=1.0] (12,1.4) -- node[above] {1 ns} ++(left:2);
\end{pgfonlayer}
\end{tikztimingtable}
\end{frame}
\begin{frame}
\frametitle{D-Flipflop Timingviolation}
\begin{block}{Setup- / Holdverletzung}
Wenn sich das Signal am D Eingang innerhalb der Setupzeit vor der Taktflanke ändert, dann wird das eine Setupverletzung oder Setupviolation genannt. Wenn sich das Signal am D Eingang innerhalb der Holdzeit nach der Taktflanke ändert, dann ist dies eine Holdverletzung oder Holdviolation.
\end{block}
\begin{block}{\glqq Leichte\grqq\, Setupverletzung}
Wenn sich das Signal am D Eingang innerhalb der Setup- und Holdzeit ändert, dann stimmt zunächst das angegebene Clock to Outputdelay nicht mehr. Eine "leichte" Setupverletzung führt zu einem größeren Clock to Outputdelay.
\end{block}
\begin{block}{Metastabiler Zustand}
Wenn sich Signal am D Eingang in der Nähe der Flanke ändert, dann kann das Flipflop in einen \glqq metastabilen\grqq\, Zustand gehen. Der Spannungspegel am Ausgang des Flipflops ist dann zwischen Low- und Highpegel. Nach einer \glqq gewissen Zeit\grqq\, kippt das Flipflop dann nach High oder Low. Diese \glqq gewisse Zeit\grqq\, ist nicht immer konstant. Der Ausgang kippt sehr häufig nach einer kurzen Zeit und selten nach einer sehr langen Zeit in High oder Low.
\end{block}
\begin{alertblock}{Timingverletzungen vermeiden}
Eine digitale Schaltung muss so konstruiert werden, dass Timingverletzungen an den Flipflops über den gesamten Spannungs- und Temperaturbereich nicht eintreten können.
\end{alertblock}
\end{frame}
|