RT level combinational blocks - PowerPoint PPT Presentation

1 / 50
About This Presentation
Title:

RT level combinational blocks

Description:

RT level combinational blocks. Paolo PRINETTO. Politecnico di Torino ... DOUT(m-1 downto 0) 32. 5.1. Elementary functional blocks. Multiplexer. Adder-Subtracter ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 51
Provided by: PaoloPr7
Learn more at: http://www.uic.edu
Category:

less

Transcript and Presenter's Notes

Title: RT level combinational blocks


1
RT level combinational blocks
2
Goal
  • This lecture presents the set of functional
    blocks that are usually considered to be
    elementary or basic at the RT level.

3
Prerequisites
  • Lecture 3.3

4
Homework
  • No particular homework is foreseen

5
Further readings
  • Students interested in making a reference to a
    text book on the arguments covered in this
    lecture can refer, for instance, to
  • M. Morris Mano, C.R.Kime Logic and Computer
    Design Fundamentals, 2nd edition
    updatedPrentice Hall, Upple Saddle River, NJ
    (USA), 2001, (chapter 3, pp. 111-148 )

6
Elementary functional blocks
Multiplier
Multiplexer
Adder-Subtracter
Decoder
Encoder
ALU
Comparator
ROM
I/O interfaces
1s counter
7
Adders
  • We shall consider
  • half adder
  • full adder
  • adder-subtracter

8
Half-Adder
  • A half-adder has
  • 2 inputs Ai, Bi
  • 2 outputs Si and Ci1
  • and computes the binary sum of the 2 input bits,
    providing
  • the sum Si
  • the carry Ci1

9
Ai Bi
Ci1 Si
  • Si Ai ? Bi
  • Ci1 Ai ??Bi

10
Full-Adder
  • A full-adder has
  • 3 inputs Ai, Bi and Ci
  • 2 outputs Si and Ci1
  • and computes the binary sum of the 3 input bits,
    providing
  • the sum Si
  • the carry Ci1

11
Ai Bi Ci
?
Ci1 Si
  • Si Ai ?? Bi ?? Ci
  • Ci1 Ai Bi Ai Ci Bi Ci
  • Ai Bi ( Ai ?? Bi ) Ci

12
Adder-subtracter
  • An adder-subtracter is a combinational block
    capable of adding/subtracting two n-bits inputs
    operands, detecting overflow conditions. It has
  • 2 n-bits data inputs, both labeled from n-1 to 0
  • 1 control input to select one of the two
    operations
  • 1 n-bits data output
  • 1 control output asserted when an overflow
    condition is occurred.

13
Adder-subtracter (contd)
Symbol
ADD/SUB
A(n-1 downto 0)
FUNC(n-1 downto 0)
OVFL
B(n-1 downto 0)
14
Elementary functional blocks
Multiplier
Multiplexer
Adder-Subtracter
Decoder
Encoder
ALU
Comparator
ROM
I/O interfaces
1s counter
15
Multiplexer
  • A multiplexer is a combinational block capable of
    forcing its output to the current value of one
    of its inputs, according to the values of some
    control signals.
  • Each input can be either a single wire or a bus.

16
Multiplexer
  • A multiplexer has
  • 2k data inputs, labeled from 2k-1 to 0
  • k control inputs
  • 1 data output.


It gets the value present on the input labeled 2
i, where i (0 ? i ? k-1) is the binary number
present on the control inputs.
k
2k-1 2k-2 2 1 0
MUX
17
Multiplexer (cont'd)
Symbol
OUT
IN(2k-1 downto 0)
SEL(k-1 downto 0)
18
Multiplexer (contd)
Symbol
M0(n-1 downto 0)
M1(n-1 downto 0)
M2(n-1 downto 0)
OUT(n-1 downto 0)
M2k-1(n-1 downto 0)
SEL(k-1 downto 0)
19
Elementary functional blocks
Multiplier
Multiplexer
Adder-Subtracter
Decoder
Encoder
ALU
Comparator
ROM
I/O interfaces
1s counter
20
Decoder
  • A decoder k ? 2k has
  • 1 n-bit data input
  • 2 n outputs, labeled from 0 to 2 n-1
  • 1 enable.
  • When enabled, just the output labeled 2 j is
    active, where j is the value present on the data
    input.
  • When disabled, no output is active.

21
Decoder (contd)
Symbol
DOUT(0)
DOUT(1)
DOUT(2)
DIN(n-1 downto 0)
DOUT(2n-1)
ENABLE
22
Elementary functional blocks
Multiplier
Multiplexer
Adder-Subtracter
Decoder
Encoder
ALU
Comparator
ROM
I/O interfaces
1s counter
23
Priority Encoder
  • A priority encoder has
  • 2k inputs, labeled from 0 to 2k-1 (each input is
    assigned a fixed priority)
  • k outputs
  • 1 data valid output
  • 1 enable.

24
Priority Encoder (contd)
  • When enabled
  • the outputs get the value j , where j is the
    label of the highest priority asserted input
  • the data valid output is asserted.
  • When disabled or when no input is asserted
  • the data valid output is not asserted.

25
Priority Encoder (contd)
Symbol
M0
VALID
M1
M2
CODE(n-1 downto 0)
M2n-1
ENABLE
26
Elementary functional blocks
Multiplier
Multiplexer
Adder-Subtracter
Decoder
Encoder
ALU
Comparator
ROM
I/O interfaces
1s counter
27
Comparator
  • A comparator gets 2 n-bit binary numbers
  • A(n-1 downto 0)
  • B(n-1 downto 0)
  • and provides in output the result of the
    comparison between A and B.
  • A control input UM/2C specifies whether the
    input operands are unsigned or signed,
    respectively.

28
Comparator (contd)
Symbol
AeqB AneB AltB AgtB AleB AgeB
A
A(n-1 downto 0)
B
B(n-1 downto 0)
UM/2C
Sel
29
Elementary functional blocks
Multiplier
Multiplexer
Adder-Subtracter
Decoder
Encoder
ALU
Comparator
ROM
I/O interfaces
1s counter
30
Counter of 1s occurrences
  • A counter of 1s occurrences has
  • 1 n-bit data input
  • 1 m-bit data output, being m ? log2 n ?.
  • The device counts the number of occurrences of a
    1 on its inputs and provides it on its outputs.

31
Counter of 1s occurrences(contd)
Symbol
1s C
DIN(n-1 downto 0)
DOUT(m-1 downto 0)
32
Elementary functional blocks
Multiplier
Multiplexer
Adder-Subtracter
Decoder
Encoder
ALU
Comparator
ROM
I/O interfaces
1s counter
33
ROM
  • A 2k ? n ROM (Read-Only Memory) has
  • k address inputs
  • n data outputs
  • 2k n-bit internal cells, storing permanent
    values.
  • The outputs gets the value stored in the j cell,
    j being the current value present on address
    inputs.

34
ROM (contd)
Symbol
D_OUT
DATA(n-1 downto 0)
ADDR
ADDR(2k-1 downto 0)
35
Elementary functional blocks
Multiplier
Multiplexer
Adder-Subtracter
Decoder
Encoder
ALU
Comparator
ROM
I/O interfaces
1s counter
36
ALU
  • An n-bit ALU (Arithmetic Logic Unit) performs
    logic and/or arithmetic operations on 2 n-bit
    operands, under the control of ad-hoc control
    signals.

37
ALU (contd)
Symbol
CONTROL
C_IN
A(n-1 downto 0)
FUNC(n-1 downto 0)
B(n-1 downto 0)
STATUS
C_OUT
38
Functions implemented by the ALU 181
Input
Functions
S3
S2
S1
S0
arithmetic (M0)
logic (M1)
0
0
0
0
FA minus 1 plus CIN
FA'
0
0
0
1
FAB minus 1 plus CIN
FA' B'
0
0
1
0
FAB' minus 1 plus CIN
FA' B
0
0
1
1
F1111 plus CIN
F 1111
0
1
0
0
FA plus (AB') plus CIN
FA'B'
0
1
0
1
FAB plus (AB') plus CIN
FB'
FA ? B'
0
1
1
0
FA minus B minus 1 plus CIN
0
1
1
1
FAB' plus CIN
FAB'
1
0
0
0
FA plus (AB) plus CIN
FA'B
FA ? B
1
0
0
1
FA plus B plus CIN
1
0
1
0
FAB' plus (AB) plus CIN
FB
1
0
1
1
FAB plus CIN
FAB
1
1
0
0
FA plus A plus CIN
F0000
1
1
0
1
FAB plus A plus CIN
FAB'
1
1
1
0
FAB' plus A plus CIN
FAB
1
1
1
1
FA plus CIN
FA
39
Elementary functional blocks
Multiplier
Multiplexer
Adder-Subtracter
Decoder
Encoder
ALU
Comparator
ROM
I/O interfaces
1s counter
40
Multiplier
  • A multiplier has
  • 1 n-bits data inputs, labeled from n-1 to 0
  • 1 m-bits data inputs, labeled from m-1 to 0
  • no control signals
  • k-bits data outputs, labeled from k-1 to 0
  • and provides in output the results of the product
    between the two input operands.

41
Multiplier (contd)
Symbol

A(m-1 downto 0)
MUL_OUT(k-1 downto 0)
B(n-1 downto 0)
42
Multiplier (contd)
Symbol
  • Signed operands kmn-1
  • Unsigned operands kmn


A(m-1 downto 0)
MUL_OUT(k-1 downto 0)
B(n-1 downto 0)
43
Elementary functional blocks
Multiplier
Multiplexer
Adder-Subtracter
Decoder
Encoder
ALU
Comparator
ROM
I/O interfaces
1s counter
44
I/O interfaces
  • The combinational interfaces for the following
    I/O devices will be presented
  • led bar driver
  • 7-segments display
  • dip-switch
  • keypad.

45
Led bar interface
LED_BAR interface
DATA(n-1 downto 0)
n
46
7-segments display interface
DATA
DISPLAYinterface
4, 7
DOT
ENABLE
47
7-segments display interface
a
a
a
b
BI
f
b
b
g
A
c
c
d
d
B
e
e
C
f
f
c
e
D
g
g
DOT
d
ENABLE
48
Dip-switch interface
DIP_SWinterface
DATA
n
n
49
Keypad interface
KEYPADinterface
DATA
4, 7
DATA_VALID
50
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com