08 Multifunction 1161111

Embed Size (px)

Citation preview

  • 8/18/2019 08 Multifunction 1161111

    1/14

    COLLEGE

    COQUITLAMEstablished 1982

    Multifunction Digital Systems

    Arithmetic Circuits (continued)

    Multi-function Systems

    February 09, 0!" #eoffrey $ien !

  • 8/18/2019 08 Multifunction 1161111

    2/14

    %n&alid 'ut uts

    • $he sum or difference of t o n-bit integers may roduce aresult not ithin the range of &alues re resented by n bits*

    – Must be able to detect hether a result is &alid

    +nsigned addition – +nsigned addition of t o n-bit o erands may roduce an -bit sum* %f

    the carry-out of unsigned addition is 0 , the sum is &alid*

    Signed addition &alid if t o o erands ha&e different signs – '&erflo addition of t o ositi&e o erands roduces negati&e sum

    – +nderflo addition of t o negati&e o erands roduces ositi&e sum

    February 09, 0!" #eoffrey $ien

  • 8/18/2019 08 Multifunction 1161111

    3/14

    'ther Arithmetic Functions

    • %ncrementing – Adding a fi.ed &alue to an arithmetic &ariable – Most often the fi.ed &alue is !, called counting (up) – e*g* , – %m lemented in a functional bloc/ called incrementer

    • Decrementing – Subtracting a fi.ed &alue from an arithmetic &ariable – Fi.ed &alue is often !, called counting (down) – e*g* , – Functional bloc/ is called decrementer

    February 09, 0!" #eoffrey $ien

  • 8/18/2019 08 Multifunction 1161111

    4/14

    'ther Arithmetic Functions

    1ero fill – filling an m-bit o erand ith 0s to become an n-bit o erand ith – Filling is usually a lied to the MS2 (most significant bit) end of the

    o erand, but can also be done on the 3S2 (least significant bit) end

    • 4.am le !!!! 0!0! filled to !" bits – MS2 end 0000 0000 !!!! 0!0! – 3S2 end !!!! 0!0! 0000 0000

    February 09, 0!" #eoffrey $ien 5

  • 8/18/2019 08 Multifunction 1161111

    5/14

    4.tension

    4.tension of an m-bit signed o erand to n bits () hile reser&ing the o erand s numerical &alue

    – de ends on the encoding used

    4.am le sign magnitude, 6 bits to !" bits – 00!0 !!0! becomes 0000 0000 00!0 !!0! – !0!0 !!0! becomes !000 0000 00!0 !!0!

    • ! s com lement, 6 bits to !" bits – 00!0 !!0! becomes 0000 0000 00!0 !!0! – !0!0 !!0! becomes !!!! !!!! !0!0 !!0!

    • s com lement, 6 bits to !" bits – 00!0 !!0! becomes 0000 0000 00!0 !!0! – !0!0 !!0! becomes !!!! !!!! !0!0 !!0!

    February 09, 0!" #eoffrey $ien 7

  • 8/18/2019 08 Multifunction 1161111

    6/14

    2us 8orts

    As the number of in uts out uts of an entity increases, ado t amore com act ay of re resenting entities and functionals ecifications*

    – :hen a grou of bits are logically related (e*g* encoding integers ormulti le control signals), re lace the indi&idual signals ith a singlein ut or out ut ort called a bus ort

    – An arro indicates in ut or out ut, and a slash ith a number indicatesthe si;e of the binary se

  • 8/18/2019 08 Multifunction 1161111

    7/14

    2us 8orts

    Functional s ecifications associated ith entities that include bus orts can be e. ressed algebraically in terms of the bus ort labels

    – $his is more com act than defining the beha&iour as a set of 2ooleane. ressions (i*e* a 2oolean function for each bit of out ut)

    • e*g* a 5-bit full adder

    February 09, 0!" #eoffrey $ien =

    Functional s ecification

    > denotes binary concatenation

    c0 is filled to 5 bits

  • 8/18/2019 08 Multifunction 1161111

    8/14

    Multi-Function Digital Systems

    Many larger digital systems can erform one of se&eraldifferent ossible functions and send result to a single out ut

    ort – Function select in uts are s ecial control in uts hich s ecify hich

    function is to be erformed• A function select table enumerates the combinations of control

    in uts and s ecifies an algebraic descri tion of the beha&iourfor the selected control in ut assignment

    • Design a roach – design solution for each indi&idual function – incor orate necessary s itching logic (e*g* multi le.ers) to direct

    selected function s out ut to the de&ice out ut ort

    February 09, 0!" #eoffrey $ien 6

  • 8/18/2019 08 Multifunction 1161111

    9/14

    Multi-Function Digital Systems

    Multi-function systems are characterised by these features – one or more data in uts – t o or more distinct beha&iours – one data out ut – control in uts to choose hich function to a ly

    • e*g* a circuit that o tionally com lements a 5-bit in ut2eha&ioural descri tion

    February 09, 0!" #eoffrey $ien 9

    function

    0

    !

    function

    0

    !

  • 8/18/2019 08 Multifunction 1161111

    10/14

    Multi-Function Digital Systems

    $he system on the re&ious slide has 7 bits of in ut – the function table ill ha&e ro s – determine the solution to a sim ler &ersion of the roblems, i*e* ith

    only ! bit of in ut* – $his roblem-sol&ing a roach is called bit-slice design – !-bit com lementer function table

    – $his is sim ly an ?'@ gate* @e licate for the other bit ositions toobtain the 5-bit solution

    February 09, 0!" #eoffrey $ien !0

    4.am le !-bit com lementer

    0 0 0

    0 ! !

    ! 0 !

    ! ! 0

    0 0 0

    0 ! !

    ! 0 !

    ! ! 0

  • 8/18/2019 08 Multifunction 1161111

    11/14

    Multi-Function Digital Systems

    2eha&ioural descri tion

    – the functional s ecification consists of a function select table

    describing and , and a 2oolean e. ression defining• is defined the same ay regardless if or

    February 09, 0!" #eoffrey $ien !!

    4.am le Adder Subtractor

    function

    0

    !

    function

    0

    !

  • 8/18/2019 08 Multifunction 1161111

    12/14

    Multi-Function Digital Systems

    A 5-bit full adder can be used to im lement the addition – substiting FA5 s orts, e obtain

    • $o im lement subtraction as s com lement

    FA5 can be used to im lement subtraction if is first com lemented,and is set to !

    • use the 5-bit com lementer from earlier e.am le• control in uts on com lementer and on FA5 must be defined as functions

    of on the adder subtractor

    February 09, 0!" #eoffrey $ien !

    4.am le Adder Subtractor

    0 0 0

    ! ! !

    0 0 0

    ! ! !

    ill be connected directly to and 0

  • 8/18/2019 08 Multifunction 1161111

    13/14

    Multi-Function Digital Systems

    • A se arate circuit can im lement the &alidity out ut as a sumof roducts

    February 09, 0!" #eoffrey $ien !

    4.am le Adder Subtractor

  • 8/18/2019 08 Multifunction 1161111

    14/14

    4.ercise

    Design a multi le.er ith 5-bit data in uts, and use it todesign a system ith the follo ing beha&ioural descri tion

    February 09, 0!" #eoffrey $ien !5

    function

    0

    !

    function

    0

    !

    A

    2

    s e

    l

    D

    5

    5

    5