Digital Design Slides

  • View
    69

  • Download
    0

Embed Size (px)

DESCRIPTION

Slides for DD

Text of Digital Design Slides

  • !

    :

  • . . . Boole, , . , Karnaugh, . . , , , . , , . , flip-flop, ROM & RAM. (Verilog, VHDL).

    Mano Morris, Ciletti Michael, " ", 4 , (), , , 2010. J.F.Wakerly, " : & ", 3 ,

  • vs

    () .

    .

    () () .

    , .

  • ?

    : CDplayer CDplayer CDplayer 10.000.000 CDplayer 20

  • ...

  • ...

  • ?

    20 ,,,

    1947: transistor BellLabs JohnBardeenWalterBrattain(Nobel 1956 WilliamShockley)

  • 1,1 .

    Jack KilbyTexas Instruments(Nobel ,2000)

    transistor ( 1958)

  • (SSI):>10

    (MSI):>100

    (LSI):>1000

    (VLSI):>10000

    2003:

    IntelPentium4mprocessor (55 ) 512Mbit DRAM(>0.5 )

  • Intel4004MicroProcessor

    19711000transistors1MHzoperation

  • Intel Pentium (IV) microprocessor

  • 1. (Supercomputers)

    2. (Mainframes)

    3. (Workstations)

    4. (Microcomputers)

    5. (Microcontrollers)

    (Mainframes)

    (Supercomputers) Workstation: Sun Ultra450

    microcomputer

    Personal Digital Assistant

  • : () () ( ) () ()

  • Bottom-up

    Top-down

  • wafer

    die

  • " ",

  • : 2

    0 1. 0 1 . 2, .

    .

    :0,1,2,3,4,5,6,7,8,9 (BInary digiT BIT):0,1

  • A . :

    0>1>

    ( bit) .

    bits 2 ? bits 10 ?

    n 2n

    m log2m

  • ?

    1/1/0000 ?

    20bit ! ,, =>(5+4+12)=>21 ,,, =>(5+4+12 + 3)=>24

  • ()

    =0=> =1=>

    =0=> =1=>

    , =f()=A!

    ?

    A Z

    AZ

  • 2

    Z

    Z

    A B

    A

    B

    .

  • ZCA

    B

    , ,

    1.

    !

    Z

    A

    B

  • ?

    : & &

    {0,1,2,3,4,5,6,7,8,9}, = :+,,*,/ :{,[,(,/,*,,+ : 0 +, 1 *, +, * +,...

    :x+x =2x f(x,y)=3x+5y

  • A Boole

    To1854(!!!)o Georgele : .

    .. " " .

    " " .

    " , ".

    ?

  • Shannon

    (1938), ClaudeShannon """" " " "", le .

    Boole "switchingalgebra". . " " " " "1""0".

    ( ).

  • . {0,1} (')

    =0=>'=1, =1=>'=0 :

    (and/): ( )

    (or/):+ :

    0 0=0, 1+1=1 1 1=1, 0+0=0 0 1=1 0=0, 1+0=0+1=1

    , :{,[,(,',,+

  • +0=, 1= ( ) +1=1, 0=0 ( ) + =, = () (')'= () +'=1 '=0 ()

    ( )

  • + = +, = ()

    ( +)+ = +( +), ( ) = ( ) () : ,

    . w+x+y+z .

    + = ( +), ( +) ( +)= +( )() :

    1. + ( )+( ). .

    2. 2. x +.

    : (W+Y) (X +) (V+Y) (W +) (X+Y) (V +) =[W+(Y )] [X+(Y )]

    [V+(Y )]=(Y )+(V X W)

    (1/2)( )

  • + =, (X+) = ()

    + '= ( +) ( +')= () : Z' + ' Z'+ Z+ ' Z= Z'+ Z

    =X

    : , , 1 .

    +' + = +' , ( +) ('+) ( +)=( +) ('+)

    ()

    (2/2)( )

  • + +...+ =, ... = ()

    (1 +2 +...+n)'=1' 2' n' (1 2 n)'='1 +'2 +...+'n ( DeMorgan)

    [F(1, 2, ..., n, +, )]'=F('1, '2, ..., 'n, ,+)( DeMorgan)

    : F=(W' )+(X Y)+[W ('+Z')]. T F'=((W')'+X') ('+Y') [W'+( Z)]=

    =(W+X') (X Y)' [W'+(X Z)]

    F(1, 2, ..., n)=X1 F(1, 2, ..., n)+X1' F(0, 2, ..., n) F(1, 2, ..., n)=[X1 + F(0, 2, ..., n) [X1'+ F(1, 2, ..., n)](

    Shannon)

    : F(X,W,Z)=X+W Z. T F(0,W,Z)=W Z F(1,W,Z)=1. A F=X 1+X' W Z F=(X+W Z) (X'+1)

  • ?

    . ( ).

    . :

    .

    . , .

  • O .

    , .

    6, 7404.

  • D .

    4, 7408.

  • OR H .

    4, 7432.

  • .

    :

    :F4(x,y,z)=x' z +y' x

    G(X,W,Y,Z)=[' +] ( +W');

  • F(x,y,z)=x+y+z ? F(x,y,z)=x+y+z =(x+y)+z :

    ? ! . :

    .

    .

  • ?

    ' '

    ' '

    ' '

    '+' +' '

  • ? ?

    , 2 . . 0 1 22 .

    =2 ?

    0,1. unary/. .

  • :

    F14 D. D(not AND). F8 OR. OR(not OR). F6 1 1 1 ( , 1 ). OR(eXclusiveOR) XOR.

    F9 1 0 2 1 ( 1 ). (noteXclusiveOR) XNOR.

  • E :(1/2)

  • E :(2/2)

  • ? (2)

  • AB

    CY

    BA CBA

    A

    B

    C

    DY

    BACBA

    DCBA

  • AB

    CY

    A

    B

    C

    DY

  • CBAY =

    ABC

    Y

    B C Y

    X X 0 1

    X 0 X 1

    0 X X 1

    1 1 1 0

    DCBAY =C

    AB

    DY

    A B C D Y

    X X X 0 1

    X X 0 X 1

    X 0 X X 1

    0 X X X 1

    1 1 1 1 0

  • AB

    CY

    ABABCCAB

    A

    B

    CY

    BA +CBACBA ++++

  • A Y

    YAA

    BY

    YA

    B

    A

    BY

    A

    B

    Y

    A

    BY

    A

    B

    Y

  • BAY =AB

    Y

    A

    B

    Y

    ( ) ( )BABABA

    BABBAA

    ABBABAABBABAY

    =+==+++=

    =+==

  • YA

    A

    BY

    A

    BY

    A

    BY

    YA

    BA Y

    A

    B

    Y

    A

    B

    Y

  • BABA =+A

    BY

    B

    Y

    A A

    B

    A

    BY

  • ? . 6inverters 4OR,AND,

    To : . =>.

    : D,NOR . D,OR, ( transistor).

    XOR,XNOR =>

  • , , .

    1: .

    2: .

    3: .

    , , .

  • !

    F3 F4.

    , .

    4 3 F4.

    To ?

    :

  • F3 :F3(,,)= '+' +' '

    :

    ' +' ' =' F3 = '+' =F4.

    H ! , .

    .

  • F(X,Y,Z)=X Y' Z+X' Y Z+Y Z==X Y' Z+Y Z ()= ( Y'+) ()= ( +) (1o )

    F(X,Y,Z)=X Y'Z+X Y' Z+X Y Z'

    F(X,Y,Z)=X Y' Z+X Y' Z+X Y Z'==X Y' Z+X Y Z' (A)= (Y' Z+Y Z') ()= ( ) ( XOR)

  • &

    . .

    .

    , .

    .

  • , , .

    .

    .

    2 .

  • ,,

    :,',,'

    AND :, ', ', ' '

    OR :, +',+', +'+' (sumofproducts SOP)

    SOP : + ' + ' + ' ' (productofsums POS)

    . POS : ( +') (+') ( +'+') ,

    ( ) 1. .

    : ' ', +'+' : ' ' , +'+'+

  • , . 2 .

    F(X,Y) :' , , '

    , . 2 .

    F(X,Y) :'+, +, +' +

  • () . () () 1(0) .

    M ( 1 0 ) .

    .. 4=xy'z'.M 5=x'+y+z'

  • .

    .

    1 3 4 5

    F3(x,y,z)=m1 +m3 +m4 +m5 =x'y'z +x'yz +xy'z'+xy'z =(1,3,4,5)

    , . .

  • .

    .

    ( 0) 0 2 6 7

    F'3(x,y,z)='0 +'2 +'6 +'7=>F3(x,y,z)=0 2 6 7 =(x+y+z) (x+y'+z) (x'+y'+z) (x'+y'+z')=

    (0,2,6,7)

    , . .

  • 0 1 .

    .. F(A,B,C)= (1,4,6)=>F= (0,2,3,5,7)G(W,X,Y,Z)= (1,8,11,14,15)=>

    G= (0,2,3,4,5,6,7,9,10,12,13)

    F F' I m'i =Mi 'i =mi

    m'0=(x'y'z')'=x+y+z=M0 A F(x,y,z)= (1,3,4) =>F=m1 +m3 +m4 =>

    F'=(m1 +m3 +m4)'=M1 M3 M4 =(1,3,4)= (0,2,5,6,7)

  • } }

    .

  • Boole .

    : ( Karnaugh /kmap):

    5.

    QuineMcClauskey :

    Espresso:

    , ,D&OR.

  • .

    .

    , 1 . 0.

    ""( / 2 4 8 16 )

  • A B Y0 0 0 1 1 0 1 1

    Karnaugh 2-

  • A B Y0 0 0 1 1 0 1 1

    0 101

    Karnaugh 2-

  • A B Y0 0 0 1 1 0 1 1

    0 10 1

    Karnaugh 2-

  • 0 10 1

    B

  • 0 10 1

    B

    0 10 1

    B

  • 0 10 1

    B

    0 10 1

    B

    0 10 1

    A

  • 0 10 1

    B

    0 10 1

    B

    0 10 1

    A0 1

    0 1

    A

  • A B Y0 0 10 1 11 0 01 1 0

  • A B Y0 0 10 1 11 0 01 1 0

    0 10 1 11

  • A B Y0 0 10 1 11 0 01 1 0

    0 10 1 11

    AY =

  • A B Y0 0 00 1 11 0 11 1 1

  • A B Y0 0 00 1 11 0 11 1 1

    0 10 11 1 1

  • A B Y0 0 00 1 11 0 11 1 1

    0 10 11 1 1

  • A B Y0 0 00 1 11 0 11 1 1

    0 10 11 1 1

    BAY +=

  • 0 10 11 1

    BABABAY =+=

  • (2)

    4, .

    x 0 1.

    y 0 1.

    m0 m1m2 m3

    xy xy

    xy xy

    yx0

    1

    0 1

    1

    yx0

    1

    0 1

    1

    1 1

    yx0

    1

    0 1

    xy =(3)=m3 x+y =(1,2,3)=m1+m2 +m3

  • 00 01 11 10 Gray 1 bit

    00 01 11 1001

    C

    Karnaugh 3-

  • 00 01 11 100 1 11

    C

    CBACBAY +=000 001

  • 00 01 11 100 1 11

    C

    CBACBAY +=000 001

    BAY =

  • 00 01 11 100 1 1 1 11

    C

  • 00 01 11 100 1 1 1 11

    C

    AY =

  • 00 01 11 100 1 1 1 11

    C

    AY =

    00 01 11 100 1 11 1 1

    C

  • 00 01 11 100 1 1 1 11

    C

    AY = CY =

    00 01 11 100 1 11 1 1

    C

  • 00 01 11 100 1 1 1 11

    C

    AY = CY =

    00 01 11 100 1 11 1 1

    C

    00 01 11 100 1 1 1 11 1 1

    C

  • 00 01 11 100 1 1 1 11

    C

    AY = CY =

    00 01 11 100 1 11 1 1

    C

    00 01 11 100 1 1 1 11 1 1

    C

    BAY +=

  • 00 01 11 100 1 11 1 1

    C

    CABCBACBACBAY +++=000 100 010 110

  • 00 01 11 100 1 11 1 1

    C

    CABCBACBACBAY +++=000 100 010 110

  • 00 01 11 100 1 11 1 1

    C

    CABCBACBACBAY +++=

    0

    11 11 1

    01 1100 10

    000 100 010 110

  • 00 01 11 100 1 11 1 1

    C

    CABCBACBACBAY +++=

    CY =01

    1 11 1

    01 1100 10

    000 100 010 110

  • (3) 8, .

    Gray.

    Gray

    yz

    .

    .

  • (3)

    F(x,y,z)=(2,3,4,5) F(x,y,z)=xy+xy

    F(x,y,z)=(3,4,6,7) F(x,y,z)=yz+xz

  • (3)

    F(x,y,z)=(0,2,4,5,6) F(x,y,z)=z+xy

    F(A,B,C)=AC+AB+ABC+BC

    F(A,B,C)=(1,2,3,5,7)=C+AB

  • Karnaugh 4-

    00 01 11 1000011110

    BCD

  • 00 01 11 1000 101 111 1 1 1 110 1

    BCD

  • 00 01 11 1000 101 111 1 1 1 110 1

    BCD

    00 01 11 1000 101 111 1 1 1 110 1

    BCD

  • 00 01 11 1000 101 111 1 1 1 110 1

    BCD

    CDABY +=

    00 01 11 1000 101 111 1 1 1 110 1

    BCD

  • 00 01 11 1000 1 1011110 1 1

    BCD

    1 1

    1 1

  • 00 01 11 1000 1 1011110 1 1

    BCD

    1 1

    1 1DBY =

  • BY =

    00 01 11 1000 1 1 1 1011110 1 1 1 1

    BCD

    DBY +=

    00 01 11 1000 1 1 1 101 1 111 1 110 1 1 1 1

    BCD

  • 00 01 11 1000 1 101 1 111 1 1 110 1 1

    BCD

    CABCDDCY ++=

  • (4)

    2n n k n , k

    .

    ().

    16, . Gray.

  • (4)

    F(w,x,y,z)=(0,1,2,4,5,6,8,9,12,13,14)F(w,x,y,z)=y +wz +xz

    F(A,B,C,D)=ABC +BCD +ABCD +ABCF(A,B,C,D)=BD +BC +ACD

    11

  • .

    ..F(w,x,y,z)=(1,3,7,11,15) d(w,x,y,z)=(0,2,5)

    10

    wx0001

    000111101 1 0

    yz

    0 0

    0 0

    1 0

    1 0

    11

    10

    10

    wx0001

    000111101 1 0

    yz

    0 0

    0 0

    1 0

    1 0

    11

    10

    F = yz + wx = (0,1,2,3,7,11,15) F = yz + wz = (1,3,5,7,11,15)

    .

  • (5)

  • (5)

    F(,,C,D,E)=(0,2,4,6,9,13,21,23,25,29,31)

    F(A,B,C,D,E)=ABE +BDE+ACE

  • (Prime Implicants)

    ( prime .

    O ( implicant.

    implicant PI):

    ):

    prime

    1

    1

    AB00

    01

    00011110

    1 1

    1

    CD

    1

    1 1

    1

    1 1

    11

    10

    F(A,B,C,D)=(0,2,3,5,7,8,9,10,11,13,15)

    A

    D

    C

    B

    .PI:BD,BD

    1

    1

    AB00

    01

    00011110

    1 1

    1

    CD

    1

    1 1

    1

    1 1

    11

    10A

    C

    D

    B

    PI:CD,BC,AD,AB

    m3:CD,BCm9:AD,ABm11:CD,BC,AD,AB

    F=(BD+BD)+(CD+AD)or(CD+AB)or(BC+

    AD)or(BC+AB)

  • Karnaugh

    1: B

    1 " " .

    1.

    2: 1 "",

    3: 2 "" 1.

  • NAND & NOR

  • NAND: F=AB+CD+ED.

  • (1)

  • F=(CD+E)(A+B)

    (2)

  • NOR

    .

  • NOR

    F=( +E)(C +D)

  • XOR

    (XOR)x y=xy +xy OYTE(XNOR)(x y) =xy +xy

    ..

    :x 0=x x 1=xx x=0 x x =1x y =(x y) x y=(x y)

    XOR :A B=B A

    A (B C)=(A B) C=A B C XOR 2.

  • XOR XOR : 1

    1.

  • XOR XORn 2n/2

    .

  • .

    bit

    .

  • (Karnaugh ) ( ) ,D R.

    : NAND,NOR,XOR,XNOR.

    .

  • Karnaugh

    G(,,C,D)=(0,1,2,4,5,8,9,10)

    Karnaugh & :

    G=(A+C)'+B'(C'+D')=

    (A+C)'+B'(CD)'=

    (A+C)'+(B+CD)'=((A+C)(B+CD))'

    :

  • :Z(A,B,C,D)=D' Y(A,B,C,D)=CD+C'D'

    X(A,B,C,D)=B'C+B'D+BC'D' W(A,B,C,D)=A+BC+B D

    I : =(C D)' X=B'(C+D)+B(C+D)'=B (C+D) W=A+B(C+D)

    X (C+D)

  • .

    , : . , .

    , .

    , , .

    . 0>1 1>0.

  • ! arnaugh :

    F(x,y,z)=xy'+yz, F(1,y,1)=y'+y=1, y.

    y a y b .

    x=1,z=1 y1>0.

    A (static1 hazard).

    m5 m7. 1,

  • :

    m5 m7 1.

  • . :

    : . .

    : . . .

  • : /

    / / / /

  • -A (Half Adder)1. : .

    2. /:2 2.

    3. /: x,y ()C(),S () .

    4. :

    x y C S0 0 0 00 1 0 11 0 0 11 1 1 0

  • -x y C S0 0 0 00 1 0 11 0 0 11 1 1 0

    ()S=xy + xy

    C = xy

    ()S=x yC = xy

  • A (Full Adder)1. : .

    2. /:3 2.

    3. /: x,y (),z C(),S () .

    4. : x00001111

    y00110011

    z01010101

    S01101001

    C00010111

  • -

    S = xyz+xyz+xyz+xyz C=xy +yz +xz

  • -E S = (x y) z

    C=xy +yz +xz =xy +z(x+y)=xy +z(x'y +xy'+xy)=xy +zxy +z(x'y +xy')=xy +z(x y)

    M 2 OR.

  • (1/4)

  • (2/4)

  • (3/4)

    4 . 4 . MSI, LSI( ).

    S3

    S3

  • (4/4)

    , .

    : . , 1 .

    , .

    ( )

  • : 9 29=512.

    S3

  • = +()= + +1

    = 1

  • /

  • (): : .

    2 .

    2 n nbits.

    . . .

    : "". .

  • (Carry Look-Ahead)

    Pi=AiBiGi=AiBi

    Si=PiCiCi+1=Gi+PiCi

    C0 = C1= G0+ P0C0C2= G1+ P1C1=G1+ P1(G0+ P0C0) = G1+ P1G0+ P1P0C0C3= G2+ P2C2= = G2+ P2G1+ P2P1G0+ P2P1P0C0

    Ci+1=Gi +PiCi , :

    !

  • C1= G0+ P0C0C2= G1+ P1G0+ P1P0C0C3= G2+ P2G1+ P2P1G0+ P2P1P0C0

  • Pi=AiBiGi=AiBi

    Si=PiCi

  • (Comparator)

    :

    (,=).

    n bits 22n.

    .

    =3210 =3210 .

    = (Ai,Bi) , 3=3 2=2 1=1 0=0.

    (=) =x3x2x1x0 xi =iBi+Aii

  • .

    .

    Ai =1 Bi = 0 >, i = 0 i = 1 )= 33 + x3A2B2 +x3x2A1B1 +x3x2x1A0B0

    (

  • (=) =x3x2x1x0 xi =iBi+Aii(>)=33+x3A2B2+x3x2A1B1+x3x2x1A0B0

    (

  • / 2x2 bit

  • / 4x3 bit

  • (Decoder)

    : n 2n

    ( n ).

    : 38

    1 2n .

  • . .( ).

  • (Demultiplexer)

    2n

    n .

  • /

    2 3 8

    1 4 16

  • 2n .

    n m n2n m H.

    2n/2, F. F.

  • .S(x,y,z) =(1,2,4,7)C(x,y,z) =(3,5,6,7)

  • (Encoder)

    : 2n n

    .

    :

    1 . (:)

    0 0 D01. (: )

  • 3

  • .

    : 4

  • 4

    x =D2+D3y=D3+D1D2V=D0+D1+D2+D3

    1 .

  • (Multiplexer)

    .

    .

    2n1 n2n 2n . .

  • 41

  • () .

  • 2n 1 n+1 :

    1. n .

    2. .

  • F(x,y,z)=(1,2,6,7)

  • Boole

    n :

    1. 2n11 n1 .

    1. .

    2. n 1 ( ).

    3. , .

  • F(A,B,C,D)=(1,3,4,11,12,13,14,15)

  • . . ?

    !

    , !

    PC ? USB ?

    T , .

  • In En Out

    0 0 Z1 0 Z0 1 01 1 1

  • vs : . , .

    : . .

    . . .

    2 : . .

  • vs

    ()

    , .

    .

    . .

    (feedback) .

    .

  • / -

    :

    (2) : :

    .

    (latches)

  • / - 2

    flip-flops

  • !

    Vcc

    Gnd

    s Y Q Gnd0 1 0

    Vcc

    1 0 1 Gnd0 0 1

    ! "" 1. !!!

  • S-R latch

    s sr

    Q' Q

    R

    S

    Q

    Q'

    E Q=a Q'=~a.

    S=R=0.

  • S-R latch -2R

    S

    Q

    Q'

    O Q=1 Q'=0 ( ) Q=0 Q'=1 ( ) .

    R=0

    S=1

    Q=1

    Q'=0

    R=0

    S=0

    Q=1

    Q'=0

    M S=1 R=0 . S=R=0 !

  • S-R latch -3R=1

    S=0

    Q=0

    Q'=1

    R=0

    S=0

    Q=0

    Q'=1

    M S=0 R=1 ( / ) latch. S=R=0 !

    () => .

  • S-R latch -4R=1

    S=1

    Q=0

    Q'=0

    R=0

    S=0

    Q=X

    Q'=X

    M S=1 R=1, Q=Q'=0. "".

    o S=R=0 !!!

    S, R.

    S, R, .

  • S-R latch D~R

    ~S

    Q'

    Q

    H S-R latch NOR.

    ~S=~R=1.

    ~S=0 ~R=1. ~S=1 ~R=0. H ~S=~R=0 .

  • SQR

    Q'

    SQ

    RQ'

    S R Q Q0 0 Q Q ()

    0 1 0 1 Reset (Q=0)1 0 1 0 Set (Q=1)1 1 0 0

    S R Q Q

    0 0 1 1

    0 1 1 0 Set (Q=1)

    1 0 0 1 Reset (Q=0)

    1 1 Q Q ()

  • S-R latch

    NAND C. S R latch

    C S R Q (next state)

    0 X X Q (t-1)

    1 0 0 Q (t-1)

    1 0 1 0 ()

    1 1 0 1 ()

    1 1 1

  • D latch :

    Q'

    Q

    D

    C(clk)

    C D Q (next state)

    0 X Q (t-1)

    1 0 0 ()

    1 1 1 ()

    S, R 1. D, C 1.

  • D latch -2

    D latch (transparent).

    N : To D latch C

  • Q'

    Q0

    0

    1

    1

    1

    :

    Q'

    Q

    0->1

    0->1

    1

    1->0

    1->0

    :

    Q'

    Q

    1

    1

    0

    0

    1

    !!!

  • : D

    C. O .

    Setup time ( ). D C .

    Hold time ( ). D C .

  • Flip-flops A latches (level-triggered) flip-flops (edge triggered) !

    .

    ,

    .

  • Latches vs Flip-flops

  • flip-flops ?

    ()

    O flip-flops

    : latch latches .

  • D flip-flop ?

    QD

    C DC

    Q

    Q'Q'

    D

    C

    Q D

    C

    QD

    CLK

    Q' Q'MASTER SLAVE

    D latches(master and slave)

    M

  • DC

    Q D

    C

    QD

    CLK

    Q' Q'MASTER SLAVE

    CLK = LOW => Master , Slave . Master. Slave CLK = IGH => Master

    . Slave aster .

    Master 1, Slave 0 CLK .

    D flip-flop

  • D CLK Q Q'

    0 0 11 1 0X 0 Q(t-1) Q'(t-1)X 1 Q(t-1) Q'(t-1)

    D

    C

    Q D

    C

    QD

    CLK

    Q' Q'MASTER SLAVE

    QM

  • D flip-flop

    D

    C

    Q D

    C

    QD

    CLK

    Q' Q'MASTER SLAVE

    QM

    D CLK Q Q'

    0 0 11 1 0X 0 Q(t-1) Q'(t-1)X 1 Q(t-1) Q'(t-1)

  • D-FF

    3 S-R 4

    2 CLK D, .

    CLK = 0, S = R = 1 .

  • D-FF - 2

    D = 0 CLK R = 0, S = 1 Q=0 Q'=1.

    A D .

    D = 1 CLK S = 0, R = 1 Q=1 Q'=0.

    A D S 0 R 1 .

  • FF

    FF D CLK

    .

    : (Preset / Direct Set). H Q 1 (Q' 0).

    / (Reset / Clear). Q 0 (Q' 1).

  • 1 :

    , FF, .

  • D-FF Reset ( )

    Reset = 0, Q'=1. E S=1 Q=0. Reset = 1, D FF .

  • D-FF Clear Preset

    ~Clear=0 ~Preset=1 => ~Q=1, S=1 Q=0.

    ~Preset=0 ~Clear=1, => Q=1, R=1 ~Q=0.

    ~Clear = ~Preset =0, Q=~Q=1. A.

    ~Clear = ~Preset =1, D FF.

  • D-FF Reset Preset

    SN 74 (ALS) 74Dual Positive Edge D Flip Flops with Asynchronous Preset and Clear

  • 2 :

    , , FF, . FF .

  • D Flip Flop Reset Preset

    D Flip Flop D .

    ~Clear

    D

    ~Preset

    D~Preset

    D

    ~Clear

    ~Clear

  • DQ'

    Q

    D-FFCLK

    PRE'

    CLR'

    D

    Q'

    Q

    D-FFCLK

    PRE'

    CLR'

  • A flip - flop

    D flip flop .

    . flip flop : aster / Slave S-R Flip Flop To Master / Slave J-K Flip Flop To J-K Flip Flop To T Flip Flop To Scan Flip Flop

    , .

    .

  • aster / Slave S-R Flip Flop

    O Master / Slave D FF D latches, S-R latches Master / Slave S-R FF.

    C S R Q (next state)

    0 X X Q (t-1)1 0 0 Q (t-1)1 0 1 0 ()

    1 1 0 1 ()1 1 1

  • aster / Slave S-R Flip Flop - 2

    S

    RC

    Q

    Q

    S

    RC

    Q

    Q

    S

    R

    C

    Q

    Q'

    O 1, Slave . 0 Slave Master Slave.

    C.C S R Q (next state)0 X X Q (t-1)1 0 0 Q (t-1)1 0 1 0 ()

    1 1 0 1 ()1 1 1

  • . 2 S-R latches S=R=1 aster latch.

    aster / Slave J-K Flip Flop

    S

    RC

    Q

    Q

    S

    RC

    Q

    Q

    C

    Q

    Q'K

    J

    J 1, S 1, Q' 1, Q 0 !

    1, R 1, Q 1, Q' 0 !

  • aster / Slave J-K Flip Flop - 2

    S

    RC

    Q

    Q

    S

    RC

    Q

    Q

    C

    1

    0K

    J S

    RC

    Q

    Q

    S

    RC

    Q

    Q

    C

    1

    01

    1

    S

    RC

    Q

    Q

    S

    RC

    Q

    Q

    C

    1

    01

    1 0

    1

    S

    RC

    Q

    Q

    S

    RC

    Q

    Q

    C

    0

    11

    1 0

    1

    J = K = 1 .

    Q=0 ~Q=1.

  • aster / Slave J-K Flip Flop 3C J K Q (next state)0 X X Q (t-1)1 0 0 Q (t-1)1 0 1 0 ()

    1 1 0 1 ()1 1 1 ~Q(t-1)

  • J-K Flip Flop

    D FF

    Q

    CLK

    D

    Q

    JK

    C

    Q

    ~Q

  • J-K Flip Flop - 2

    SN 74 (ALS) 109Dual Positive Edge J-~K Flip Flops with Asynchronous Preset and Clear

  • T(oggle) Flip Flop

    To FF !!!

    : FF !!!

    FF D J-K FF.

    D

    CLK

    Q

    QT

    JCLKTK

    1 Q

    ~Q

  • T(oggle) Flip Flop

    => (enable) .

    FF D J-K FF.

    D

    CLK

    Q

    QT

    EN

    JCLKTK

    EN Q

    ~Q

  • Scan Flip Flop () FF.

    FF .

    ( ) / FF.

    scan FF / .

  • Scan D FF

    D

    CLK

    Q

    QCLKTI

    TED

    DFF ~ (est Enable).

    = 0 D FF. = 1, D, (Test Input). O FF (scan chain).

  • Scan Chain

    D

    CLK

    Q

    QCLKTI

    TED D

    CLK

    Q

    Q

    TE

    TI

    D

    CLK

    Q

    Q

    TE

    TI

    D

    CLK

    Q

    Q

    TE

    TI

    D

    CLK

    Q

    Q

    TE

    TI

    D

    CLK

    Q

    Q

    TE

    TI

    TO

    TECLK

    TI

    O . FF = 1, , . =0 . =1 .

  • Level vs edge triggered . Reset Preset. Setup Hold. To D FF .

    FFs J-K . FFs Scan.

    J K Q(t+1)0 0 Q(t)0 1 01 0 11 1 ~Q(t)

    D Q(t+1)0 01 1

    EN Q(t+1)0 Q(t)1 ~Q(t)

  • DQ'

    Q

    FFCLK

    K

    J

    Q'

    Q

    FFCLK

    CLK D Qn+1 1 1 Load 1 (Set) 0 0 Load 0 (Reset)

    D

    Q'

    Q

    FFCLKT

    CLK T Qn+1 0 Qn / 1 Qn (Toggle)

    CLK J K Qn+1 0 0 Qn () 1 0 1 Load 1 (Set) 0 1 0 Load 0 (Reset) 1 1 Qn Toggle

    FF

  • DQ'

    Q

    FFCLKK

    J

    Q'

    Q

    FFCLK

    Qn Qn+1 D0 0 00 1 11 0 01 1 1

    D

    Q'

    Q

    FFCLKT

    FF

    Qn Qn+1 T

    0 0 00 1 1

    1 0 11 1 0

    Qn Qn+1 J K0 0 0 X0 1 1 X1 0 X 11 1 X 0

    vs ? ... ... ? transistor ( 1958) Intel Pentium (IV) microprocessor : 2 A ? () 2 ?A BooleShannon Karnaugh 2-Karnaugh 2-Karnaugh 2- (2) Karnaugh 3- (3) (3) (3) Karnaugh 4- (4) (4) (5) (5) (Prime Implicants) Karnaugh NAND & NOR NAND (1) NOR NOR XOR XOR XOR ! : -A (Half Adder)- A (Full Adder)-- (1/4) (2/4) (3/4) (4/4) / (Carry Look-Ahead) (Comparator) (Decoder) (Demultiplexer)/ (Encoder) 3 4 (Multiplexer) Boole