W11L8-9 Control and Datapath

download W11L8-9 Control and Datapath

of 14

Transcript of W11L8-9 Control and Datapath

  • 8/11/2019 W11L8-9 Control and Datapath

    1/14

    ECE 2222- Digital Design LabCourse Instructor: Ms. Saba Zia

    Week 8: Control and Datapath Design

    1

  • 8/11/2019 W11L8-9 Control and Datapath

    2/14

    Binary Information Binary information stored in a digital system can be categorized as

    Data

    Control

    Data information is manipulated by performing data-processing operationslike arithmetic, logic, shift etc.

    These operations are usually implemented using adders, decoders,

    multiplexers, counters, shift registers etc.

    Control Information provide command signals that coordinate and execute

    the various operations

    2

  • 8/11/2019 W11L8-9 Control and Datapath

    3/14

    Control & DATAPATH Logic Design of a digital circuit can be divided into two distinct parts

    One part that is concerned with the design of digital circuits that perform the data

    processing operations

    The other part is concerned with the design of control circuits that determine thesequence in which various operations are performed

    3

  • 8/11/2019 W11L8-9 Control and Datapath

    4/14

    Design Units

    4

  • 8/11/2019 W11L8-9 Control and Datapath

    5/14

    Control Control logic that generates signals for sequencing of operations in the

    datapath unit is an Algorithmic State Machine (ASM)

    In a given state the outputs of Control are inputs to the Datapath

    Depending on the status of Datapath and external inputs, Control decides to

    go into next state or initiate another operation

    5

  • 8/11/2019 W11L8-9 Control and Datapath

    6/14

    Binary Multiplication

    6

    23 10111

    19 10011

    10111

    10111

    00000

    00000

    10111

    437 110110101

    multiplicand

    multiplier

    Product

    Partial Products

  • 8/11/2019 W11L8-9 Control and Datapath

    7/14

    Algorithm (Dry Run)

    Multiplier in Q

    Q[0] = 1; add B

    First Partial Product

    Shift Right CAQ

    Q[0] = 1; add B Second Partial Product

    Shift Right CAQ

    Q[0] = 0; shift right CAQ

    Q[0] = 0; shift right CAQ

    Q[0] = 1; add B

    Fifth Partial Product

    Shift Right CAQ

    Final Product in AQ

    7

    Multiplicand B = 10111 C A Q P

    0 00000 10011 101

    10111

    0 10111 100

    0 01011 11001

    101111 00010 011

    0 10001 01100

    0 01000 10110 010

    0 00100 01011 001

    10111

    0 11011 000

    0 01101 10101

    01101 10101

  • 8/11/2019 W11L8-9 Control and Datapath

    8/14

    ASM Chart

    8

    S_idle

    S_add

    Decr_P

    S_shift

    Shift_regs

    start

    Q[0]

    Zero

    Add_regs

    1

    1

    1

    A

  • 8/11/2019 W11L8-9 Control and Datapath

    9/14

    Datapath of Multiplier

    9

  • 8/11/2019 W11L8-9 Control and Datapath

    10/14

    Block Diagram of Multiplier

    10

    Controller Datapath

    Load_regs

    Shift_regs

    Dec_P

    Start

    Multiplicand Multiplier

    Product

    Zero (P == 0)

  • 8/11/2019 W11L8-9 Control and Datapath

    11/14

    Verilog Coding

    11

  • 8/11/2019 W11L8-9 Control and Datapath

    12/14

    Verilog Coding

    12

  • 8/11/2019 W11L8-9 Control and Datapath

    13/1413

  • 8/11/2019 W11L8-9 Control and Datapath

    14/14

    Simulation

    14