ECE 434 Advanced Digital System L13 - PowerPoint PPT Presentation

About This Presentation
Title:

ECE 434 Advanced Digital System L13

Description:

Review: Multiplication of. Signed Binary Numbers. How to multiply signed binary numbers? ... SM chart is constructed from SM blocks. State S1 is entered = Z1 ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 39
Provided by: Aleksandar72
Category:

less

Transcript and Presenter's Notes

Title: ECE 434 Advanced Digital System L13


1
ECE 434Advanced Digital SystemL13
  • Electrical and Computer EngineeringUniversity of
    Western Ontario

2
Review Block Diagram of a Binary Multiplier
Ad add signal // adder outputs are stored into
the ACC Sh shift signal // shift all 9 bits to
right Ld load signal // load multiplier into
the 4 lower bits of the ACC and clear the upper 5
bits
3
Review State Graph for Binary Multiplier
4
Review Multiplier Control with Counter (contd)
  • Increment counter each time a shift signal is
    generated
  • Generate K after n-1 shifts occured

5
Review Array Multiplier
  • What do we need to realize Array Multiplier?
  • AND gates ?
  • FA ?
  • HA ?

6
Review Array Multiplier (contd)
7
Review Multiplication of Signed Binary Numbers
  • How to multiply signed binary numbers?
  • Procedure
  • Complement the multiplier if negative
  • Complement the multiplicand if negative
  • Multiply two positive binary numbers
  • Complement the product if it should be negative
  • Simple but requires more hardware and timethan
    other available methods

8
Review Multiplication of Signed Binary Numbers
  • Four cases
  • Multiplicand is positive, multiplier is positive
  • Multiplicand is negative, multiplier is positive
  • Multiplicand is positive, multiplier is negative
  • Multiplier is negative, multiplicand is negative
  • Examples
  • 0111 x 0101 ?
  • 1101 x 0101 ?
  • 0101 x 1101 ?
  • 1011 x 1101 ?
  • Preserve the sign of the partial product at each
    step
  • If multiplier is negative, complement the
    multiplicand before adding it in at the last step

9
Review 2s Complement Multiplier
10
State Graph for 2s Complement Multiplier
11
Faster Multiplier
  • Move wires from the adder outputs one position to
    the right gtadd and shift can occur at the same
    clock cycle

12
State Graph for Faster Multiplier
13
Behavioral Model for Faster Multiplier
14
Behavioral Model for Faster Multiplier
15
Command File and Simulation
16
Test Bench for Signed Multiplier
17
Digital design with SM Charts
  • State graphs used to describe state machines
    controlling a digital system
  • Alternative use state machine flowchart

18
State Machine Charts
  • SM chart or ASM (Algorithmic State Machine) chart
  • Easier to understand the operation of digital
    system by examining of the SM chart instead of
    equivalent state graph
  • SM chart leads directly to hardware realization

19
Components of SM charts
20
SM Blocks
  • SM chart is constructed from SM blocks

State S1 is entered gt Z1 and Z2 become 1 if
X10 Z3 and Z4 become 1 if X11 and X30 Z5
become 1
21
Equivalent SM Blocks
22
Equivalent SM Charts for Comb Networks
23
Block with Feedback
24
Equivalent SM Blocks
25
Converting a State Graph to an SM Chart
26
Derivation of SM Charts
  • Binary Multiplier
  • Dice Game

27
SM Chart for Binary Multiplier
28
VHDL for Multiplier SM Chart (I)
29
VHDL for Multiplier SM Chart (II)
30
Electronic Dice Game
  • Block diagram

1. Two counters simulate the roll of dice (1-6)
sum of two counters is in range of 2-12 2. Reset
initiate new game 3. Rb roll button when the
roll button is pressed the counters count at high
speed when the button is released, the values of
counters are displayed and game can proceed.
31
Electronic Dice Game - Description
  • First roll
  • player wins if the sum is 7 or 11
  • player loses if the sum is 2, 3 or 12
  • otherwise, the sum obtained in the first roll is
    referred as a point, and player must roll the
    dice again
  • Second roll (or subsequent roll)
  • player wins if the sum equals the point
  • player loses if the sum is 7
  • otherwise, player rolls again until she/he
    finally wins or loses

32
Flowchart for Dice Game
33
Control Network for Dice Game
  • Input signals to the control network
  • D7 1 if the sum of the dice is 1
  • D711 (7 or 11)
  • D2312 (2, 3, 12)
  • Eq 1 if the sum equals the number stored in the
    point register
  • Rb 1 when the roll button is pressed
  • Reset 1 when the reset button is pressed
  • Output from the control network
  • Roll1 enables the dice counters
  • Sp1 sum is stored in the point register
  • Win1 turns on win light
  • Lose1 turns on lose light

34
SM Chart for Dice Game
35
State Graph for Dice Game
36
Behavioral Model for Dice Game (1)
37
Behavioral Model for Dice Game (2)
38
To Do
  • Read chapters 4.1, 4.2, 4.3
  • Do homework 4
Write a Comment
User Comments (0)
About PowerShow.com