summaryrefslogtreecommitdiff
path: root/dt-sequentiell.tex
diff options
context:
space:
mode:
Diffstat (limited to 'dt-sequentiell.tex')
-rw-r--r--dt-sequentiell.tex636
1 files changed, 636 insertions, 0 deletions
diff --git a/dt-sequentiell.tex b/dt-sequentiell.tex
new file mode 100644
index 0000000..93ac94b
--- /dev/null
+++ b/dt-sequentiell.tex
@@ -0,0 +1,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}
+
+
+