338 lines
11 KiB
TeX
338 lines
11 KiB
TeX
\section{Latches und Flipflops}
|
|
|
|
Sequentielle Schaltungen welche Rückkopplungen enthalten.
|
|
|
|
|
|
\subsection{Zustandgesteurte Latches}
|
|
|
|
\emph{Zustandsgesteuert}: Das Verhalten eines Latches hängt nicht nur von den aktuellen Eingangsvariablen ab, sondern auch von den intern gespeicherten Zuständen.
|
|
|
|
|
|
\subsubsection{SR-Latch}
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.25\textwidth]{images/SR-Latch.jpg} \medskip
|
|
|
|
\eqbox{$Q_{n+1} = S \lor (Q_n \land \not{R}) \quad \text{Bedingung: } R \land S = 0$}
|
|
\end{center}
|
|
|
|
\begin{tabular}{c c|c l}
|
|
S & R & $Q_{n + 1}$ & \\ \cline{1-3}
|
|
$0$ & $0$ & $Q_n$ & speichern \\
|
|
$0$ & $1$ & $0$ & reset \\
|
|
$1$ & $0$ & $1$ & set \\
|
|
$1$ & $1$ & - & unzulässig \\
|
|
\end{tabular}
|
|
|
|
|
|
\subsubsection{$\overline{SR}$-Latch}
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.25\textwidth]{images/SR-Latch_AND.jpg}
|
|
\end{center}
|
|
|
|
\begin{tabular}{c c|c l}
|
|
$\not{S}$ & $\not{R}$ & $Q_{n + 1}$ & \\ \cline{1-3}
|
|
$0$ & $0$ & - & unzulässig \\
|
|
$0$ & $1$ & $1$ & set \\
|
|
$1$ & $0$ & $0$ & reset \\
|
|
$1$ & $1$ & $Q_n$ & speichern \\
|
|
\end{tabular}
|
|
|
|
|
|
\subsection{Taktzustandgesteuerte Latches}
|
|
|
|
\emph{Taktzustandgesteuert}: Änderungen am Eingang werden nur wahrgenommen, wenn das Taktsignal $T = 1$ ist. \medskip
|
|
|
|
Taktzustandgesteuerte Latches sind gegenüber Störimpulsen empfindlich, da bei $T=1$ jede Änderung am Eingang übernommen wird.
|
|
|
|
|
|
\subsubsection{SRT-Latch}
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.25\textwidth]{images/SRT-Latch.jpg}
|
|
\end{center}
|
|
|
|
\begin{tabular}{c c c c c l}
|
|
T & & $\text{S}_{\text{int}}$ & $\text{R}_{\text{int}}$ & & \\ \cline{1-4}
|
|
$0$ & $\rightarrow$ & $0$ & $0$ & $\rightarrow$ & Datenspeicherung \\
|
|
$1$ & $\rightarrow$ & S & R & $\rightarrow$ & Normales SR-Latch \\
|
|
\end{tabular}
|
|
|
|
\vfill
|
|
\subsubsection{D-Latch}
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.2\textwidth]{images/D-Latch.jpg} \medskip
|
|
|
|
\eqbox{$Q_{n+1} = (Q_n \land \not{T}) \lor (D \land T)$}
|
|
\end{center}
|
|
|
|
\begin{tabular}{c c c l}
|
|
T & $Q_{n + 1}$ & & \\ \cline{1-2}
|
|
$0$ & $Q_n$ & $\rightarrow$ & alter Ausgang gespeichert \\
|
|
$1$ & D & $\rightarrow$ & Input übernommen \\
|
|
\end{tabular}
|
|
|
|
\subsubsection{JK-Latch}
|
|
|
|
\begin{center}
|
|
\begin{circuitikz}[european]
|
|
\ctikzset{tripoles/european not symbol=circle}
|
|
\tikzset{flipflop srlatch/.style={flipflop,
|
|
flipflop def={t1=S, t3=R, t6=Q, t4=$\bar{\text{Q}}$, n4=1}
|
|
}}
|
|
\path[draw] node[flipflop srlatch](srlatch){}
|
|
(srlatch.pin 1)--++(left:5mm)
|
|
node[nand port, number inputs=3](nand1){}
|
|
(nand1.out)
|
|
(srlatch.pin 3)--++(left:5mm)
|
|
node[nand port, number inputs=3](nand2){}
|
|
(nand2.out);
|
|
\path[draw] (nand1.in 2) --++(left:10mm) node[point, label=180:J] {};
|
|
\path[draw] (nand2.in 2) --++(left:10mm) node[point, label=180:K] {};
|
|
\path[draw] (nand2.in 1) --++(up:6mm)--++(left:10mm) node[point, label=180:T] {};
|
|
\path[draw] (nand1.in 3) --++(down:6mm);
|
|
\path[draw] (srlatch.pin 4) --++(right:10mm);
|
|
\path[draw] (srlatch.pin 4) --++(right:6mm) --++(up:23mm) --++(left:53mm) --++(down:3.2mm) --++(right:2mm);
|
|
\path[draw] (srlatch.pin 6) --++(right:10mm);
|
|
\path[draw] (srlatch.pin 6) --++(right:3mm) --++(down:23mm) --++(left:50mm) --++(up:3.2mm) --++(right:2mm);
|
|
\end{circuitikz}
|
|
\end{center}
|
|
|
|
\begin{center}
|
|
\begin{circuitikz}[european]
|
|
\ctikzset{tripoles/european not symbol=circle}
|
|
\tikzset{flipflop jklatch/.style={flipflop,
|
|
flipflop def={t1=J, t2=T, t3=K, t6=Q, t4=$\bar{\text{Q}}$, n4=1}
|
|
}}
|
|
\path[draw] node[flipflop jklatch](jklatch){};
|
|
\end{circuitikz}
|
|
\end{center}
|
|
|
|
\begin{tabular}{c c c|c l}
|
|
T & J & K & $Q_{n + 1}$ & \\ \cline{1-4}
|
|
$0$ & $X$ & $X$ & $Q_n$ & speichern \\
|
|
$1$ & $0$ & $0$ & $Q_n$ & speichern \\
|
|
$1$ & $0$ & $1$ & $0$ & reset \\
|
|
$1$ & $1$ & $0$ & $1$ & set \\
|
|
$1$ & $1$ & $1$ & $\bar{Q_n}$ & kippen \\
|
|
\end{tabular}
|
|
|
|
\subsection{Flipflops}
|
|
|
|
\emph{Taktflankensteuerung}: Serieschaltung von zwei mit gegenphasigem Takt gesteuerten Latches(Master-Slave Aufbau).
|
|
|
|
\begin{center}
|
|
\begin{minipage}{0.45\linewidth}
|
|
\begin{center}
|
|
\begin{tikzpicture}
|
|
\draw[thick] (-0.75, 0) -- (0,0)
|
|
(0,0.4) -- (0,-0.4)
|
|
(0,0.25) -- (0.5,0) -- (0,-0.25);
|
|
\node[] at (1, 0) {CLK};
|
|
\end{tikzpicture}
|
|
\end{center}
|
|
Input beim Übergang von $0 \to 1$ von CLK wirksam.
|
|
\begin{center}
|
|
\begin{tikzpicture}
|
|
\draw (0,0) -- (0.5, 0) -- (0.5, 0.3) -- (1, 0.3) -- (1, 0) -- (1.5, 0) -- (1.5, 0.3) -- (2, 0.3) -- (2, 0) -- (2.5, 0);
|
|
\draw[very thick, red] (0.5, 0) -- (0.5, 0.3) (1.5, 0) -- (1.5, 0.3);
|
|
\node[text width = 30mm] at (1.25, -0.5) {\small Positive/steigende Taktflanke};
|
|
\end{tikzpicture}
|
|
\end{center}
|
|
\end{minipage}
|
|
\hfill
|
|
\begin{minipage}{0.45\linewidth}
|
|
\begin{center}
|
|
\begin{tikzpicture}
|
|
\draw[thick] (-0.75, 0) -- (0,0)
|
|
(0,0.4) -- (0,-0.4)
|
|
(0,0.25) -- (0.5,0) -- (0,-0.25);
|
|
\draw[thick, fill = white] (-0.1,0) circle [radius = 0.75mm];
|
|
\node[] at (1, 0) {CLK};
|
|
\end{tikzpicture}
|
|
\end{center}
|
|
Input beim Übergang von $1 \to 0$ von CLK wirksam.
|
|
\begin{center}
|
|
\begin{tikzpicture}
|
|
\draw (0,0) -- (0.5, 0) -- (0.5, 0.3) -- (1, 0.3) -- (1, 0) -- (1.5, 0) -- (1.5, 0.3) -- (2, 0.3) -- (2, 0) -- (2.5, 0);
|
|
\draw[very thick, blue] (1, 0.3) -- (1, 0) (2, 0.3) -- (2, 0);
|
|
\node[text width = 30mm] at (1.25, -0.5) {\small Negative/fallende Taktflanke};
|
|
\end{tikzpicture}
|
|
\end{center}
|
|
\end{minipage}
|
|
\end{center}
|
|
|
|
Vorteil: Sehr robust gegenüber Störimpulsen
|
|
|
|
\subsubsection{D-Flipflop}
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.25\textwidth]{images/D-FF.jpg} \medskip
|
|
|
|
\eqbox{$Q_{n+1} = D_n \quad \text{Wenn CLK }0 \to 1$}
|
|
\end{center}
|
|
|
|
|
|
\subsubsection{SR-Flipflop}
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.25\textwidth]{images/SR-FF.jpg} \medskip
|
|
|
|
\eqbox{$Q_{n+1} = [S \lor (Q_1 \land \not{R})]_n \quad \text{Reqs: } R \land S = 0, \text{CLK }0 \to 1$}
|
|
\end{center}
|
|
|
|
|
|
\subsubsection{JK-Flipflop}
|
|
|
|
Beim JK-Flipflop gibt es keinen unzulässigen Zustand mehr, dieser wurde durch eine Toggle Funktionalität ersetzt.
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.25\textwidth]{images/JK-FF.jpg} \medskip
|
|
|
|
\eqbox{$Q_{n + 1} = \left(J \land \overline{Q_n}\right) \lor \left(\overline{K} \land Q_n\right) \quad \text{Wenn CLK }0 \to 1$}
|
|
\end{center}
|
|
|
|
\begin{tabular}{c c | c c l}
|
|
J & K & $Q_{n + 1}$ & $\not{Q}_{n + 1}$ & \\
|
|
\cline{1-4}
|
|
$0$ & $0$ & $Q_{n}$ & $\not{Q}_{n}$ & speichern \\
|
|
$0$ & $1$ & $0$ & $1$ & reset \\
|
|
$1$ & $0$ & $1$ & $0$ & set \\
|
|
$1$ & $1$ & $\not{Q}_n$ & $Q_n$ & toggle \\
|
|
\end{tabular} \medskip
|
|
|
|
Es gibt natürlich auch (takt)zustandsgesteuerte JK-Latches!
|
|
|
|
\vfill
|
|
|
|
\subsubsection{Toggle-Flipflop}
|
|
|
|
Schaltung welche bei jeder aktiven Taktflanke kippt.
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.25\textwidth]{images/T-FF.jpg}
|
|
|
|
\eqbox{$Q_{n + 1} = \overline{Q_n} \quad \text{Wenn CLK } 0 \to 1$}
|
|
\end{center}
|
|
|
|
Folgende Schaltung kippt nur bei Taktflanken wenn T=1:
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.25\textwidth]{images/T-FF2.jpg}
|
|
\end{center}
|
|
|
|
\subsection{Asynchroner Set/Reset Input}
|
|
|
|
Können gespeicherte Zustände asynchron zu CLK überschreiben, d.h. jederzeit auch ohne ein Taktflankensignal.
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.075\textwidth]{images/Asynchron.JPG}
|
|
\end{center}
|
|
|
|
\pagebreak
|
|
\subsection{D-Flipflop in CMOS-Technik}
|
|
|
|
In den meisten Anwendungen werden D-Flipflops verwendet, da sie mit CMOS Technik effizient realisierbar sind.
|
|
|
|
\subsubsection{Transmission Gates (TG)}
|
|
|
|
TGs bestehen aus 2 Transistoren, einem NMOS und einem PMOS.
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.32\textwidth]{images/Transmissiongates.jpg}
|
|
\end{center}
|
|
|
|
Pro D-Latch sind 2 TG und 2 Inverter notwendig.
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.32\textwidth]{images/d_ff_cmos.jpeg}
|
|
\end{center}
|
|
|
|
Insgesamt sind also 8NMOS und 8PMOS notwendig.
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.32\textwidth]{images/d_ff_cmos_2.jpeg}
|
|
\end{center}
|
|
\vfill
|
|
|
|
|
|
\subsubsection{D-Flipflop $\Rightarrow$ JK-Flipflop}
|
|
|
|
Ein JK-FF kann \emph{nur} mit einem D-FF realisiert werden, wenn:
|
|
|
|
\begin{center}
|
|
\eqbox{$D_n = (J_n \land \not{Q}_n) \lor (\not{K}_n \land Q_n)$}
|
|
\end{center}
|
|
|
|
|
|
\subsection{Verzögerungszeiten}
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.32\textwidth]{images/Dynamik-FF.jpg}
|
|
\end{center}
|
|
|
|
\begin{flushleft}
|
|
\begin{tabular}{r p{50mm}}
|
|
Setup-Zeit ($t_s$) & Solange muss Signal an FF \underline{vor} aktiver Taktflanke stabil anliegen. \\
|
|
Hold-Zeit ($t_h$) & Solange muss Signal an FF \underline{nach} aktiver Taktflanke stabil anliegen. \\
|
|
Verzögerungszeit ($t_{pd}$) & Durchlaufzeit
|
|
\end{tabular}
|
|
\end{flushleft}
|
|
|
|
Bei Verletzung der Zusatzbedingungen $t_s, t_h$ kann der Zustand des FF unbestimmt oder metastabil werden.
|
|
|
|
|
|
\subsubsection{Maximale Taktfrequenz bei seriellen FFs}
|
|
|
|
In einem Schaltnetz mit mindestens zwei Flipflops in Serie (kann auch der gleiche FF sein), ist die maximale Taktfrequenz des Clocks begrenzt.
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.32\textwidth]{images/FF_Delay.jpg} \medskip
|
|
|
|
\eqbox{$T_{\text{min}} \geq t_{pd,ff1} + t_{pd,ks} + t_{s,ff2} \qquad f_{max} = \frac{1}{T_{min}}$}
|
|
|
|
wobei $t_{pd,ks}$ Verzögerungszeit kombinatorische Schaltung
|
|
\end{center}
|
|
|
|
Bei komplizierten kombinatorischen Schaltungen begrenzt der Pfad mit der \emph{längsten} Zeitverzögerung die Taktfrequenz.
|
|
\vfill
|
|
|
|
|
|
\subsection{Master-Slave Flipflops (Zwischenspeicher FFs)}
|
|
|
|
\begin{center}
|
|
\begin{tabular}{r p{235pt}}
|
|
- & Übernehmen Eingangssignal mit der steigenden (bzw. fallenden) Taktflanke. \\
|
|
- & Geben das Ausgangssignal mit der nächsten fallenden (bzw. steigenden) Taktflanke aus. \\
|
|
\end{tabular}
|
|
\end{center}
|
|
|
|
JK-Master-Slave FF (mit SR-,D-,T-FF auch möglich):
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.25\textwidth]{images/JK-MS-FF.JPG}
|
|
|
|
\includegraphics[width = 0.3\textwidth]{images/JK-MS-FF2.JPG}
|
|
\end{center}
|
|
|
|
|
|
\subsection{Frequenzteiler und Zähler}
|
|
|
|
T-FF können gut verwendet werden, um die Periode T eines periodischen Signals zu verlängern. Mit $n$-T-FFs kann die Frequenz durch den Faktor $2^n$ geteilt werden.
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.32\textwidth]{images/Frequenzteiler.JPG}
|
|
\end{center}
|
|
|
|
Eine andere wichtige Anwendung von FFs ist als digitale Dualzähler. Dafür müssen T-FFs mit Rückflankensteuerung ($1 \to 0$) verwendet werden. Mit $n$-T-FFs kann man von 0 bis $2^{n-1}$ zählen.
|
|
|
|
\begin{center}
|
|
\includegraphics[width = 0.32\textwidth]{images/Zahler.JPG}
|
|
\end{center}
|
|
\vfill
|
|
|
|
\pagebreak
|
|
|