1
CSSE132 ¡ Introduc0on ¡to ¡Computer ¡Systems ¡
10 ¡: ¡Sequen*al ¡Logic ¡ March ¡19, ¡2013 ¡
Adapted from Carnegie Mellon 15-213
CSSE132 Introduc0on to Computer Systems 10 : Sequen*al - - PowerPoint PPT Presentation
Adapted from Carnegie Mellon 15-213 CSSE132 Introduc0on to Computer Systems 10 : Sequen*al Logic March 19, 2013 1 Today: Sequen0al Logic Sequen0al logic
1
Adapted from Carnegie Mellon 15-213
2
¢ Sequen0al ¡logic ¡ ¢ Clocks ¡ ¢ Latches ¡ ¢ Flip-‑flops ¡ ¢ Build ¡a ¡register ¡file ¡ ¢ Memory ¡
3
¢ Combina0onal ¡logic ¡
¢ Sequen0al ¡logic ¡
Next-state function Current state Clock Output function Next state Outputs Inputs
4
¢ Produce ¡regular ¡changing ¡signal ¡
¢ Square ¡waveform ¡
§ Rising ¡edge ¡(power ¡up) ¡ § Falling ¡edge ¡(power ¡down) ¡
¢ Will ¡allow ¡us ¡to ¡transi0on ¡between ¡states ¡
5
¢ Two ¡invertor ¡loop ¡
¢ Circuit ¡is ¡hard ¡to ¡use ¡
¢ Idea ¡is ¡useful ¡
6
¢ Build ¡invertor ¡with ¡NAND ¡
7
¢ Build ¡loop ¡with ¡NAND ¡
8
¢ Build ¡loop ¡with ¡NAND ¡
9
¢ Toggle ¡top ¡input ¡
¢ What ¡new ¡output ¡if ¡originally ¡
10
¢ Change ¡top ¡input ¡
11
¢ Toggle ¡boOom ¡input ¡
¢ Ini0al ¡value ¡does ¡not ¡maOer! ¡
12
¢ Change ¡boOom ¡input ¡
13
¢ Two ¡inputs, ¡S,R ¡(set, ¡reset) ¡
¢ Two ¡outputs ¡Q, ¡Q’ ¡
14
¢ Many ¡different ¡kinds ¡
¢ Maintain ¡state/stored ¡value ¡
§ Many ¡conven*ons ¡ § Previous/ini*al ¡state: ¡Q0, ¡Qprev, ¡Qt-‑ ¡ § Next ¡state ¡: ¡Q, ¡Qnext, ¡Qt+ ¡
¢ Can ¡have ¡undefined ¡state ¡
15
¢ D ¡flip-‑flop ¡
§ We ¡will ¡use ¡rising ¡edge ¡
D Clk Q Q S R
16
¢ Stores ¡binary ¡values ¡
¢ Records ¡new ¡value ¡on ¡clock ¡edge ¡
¢ Allows ¡values ¡to ¡be ¡saved ¡in ¡CPU ¡
17
¢ 16 ¡D ¡Flip-‑flops ¡
18
¢ Useful ¡to ¡save ¡several ¡values ¡at ¡once ¡
¢ Give ¡each ¡register/container ¡an ¡ID ¡
¢ Useful ¡to ¡select ¡specific ¡register ¡
19
¢ Collec0on ¡of ¡registers ¡ ¢ Method ¡to ¡select ¡a ¡single ¡register ¡
¢ Read ¡or ¡write ¡values ¡
¢ Basic ¡storage ¡unit ¡for ¡CPU ¡
20
Decoder ¡to ¡select ¡write ¡target ¡ Mux ¡to ¡select ¡read ¡output ¡
21
¢ Similar ¡to ¡a ¡large ¡register ¡file ¡
¢ Address ¡selects ¡byte ¡to ¡manipulate ¡
¢ Modern ¡memory ¡