Sie sind auf Seite 1von 31

1

DIGITAL LOGIC DESIGN


( CE_118 )

CHAPTER 2:
Storage Components
(part_1)
2

Storage components
Ø Storage components store data and perform some
simple operations.
Ø Storage components include:
o registers
o counters
o memories
o stacks
o queues
Ø Combinatorial and storage components are used for
construction of:
o datapaths
o controllers
Ø Main subsystems of modern processors and other
microchips.
3

Storage components
Ø Storage components store data and perform some
simple operations.
Ø Storage components include:
o registers
o counters
o memories
o stacks
o queues
Ø Combinatorial and storage components are used for
construction of:
o datapaths
o controllers
Ø Main subsystems of modern processors and other
microchips.
4

Registers
ØRegisters are bit wise extensions of flip-flops.
ØRegisters store one data word.

Qi= Ii when Clk=

Graphic symbol

Register schematic
5

Registers with asynchronous set and reset


Ø Asynchronous setting and resetting is independent of clock
signal.
ØSynchronous inputs are used to initialize the register.

Graphic symbol

Register schematic

Operation table
6

Register with parallel load


Ø Parallel load register can hold data indefinitely.
Ø It can also load new data when load signal is 1.

Graphic symbol Operation table

Register
schematic
7

Serial-in, parallel-out Shift register (shift-right)


Ø Serial-in, parallel-out register converts serial data stream
into parallel data stream.

Graphic symbol Operation table


Mux 2-to-1

Register
schematic
8

Shift register with parallel load (SRwPR)

Graphic symbol Operation table


Mux 4-to-1

D0=S1’S0’Q0+ S1’S0I0
+S1S0’IR +S1S0 Q1

Di=S1’S0’Qi+ S1’S0 Ii
+S1S0’Qi-1 +S1S0Qi+1
(1 <= i <= 2)

D3=S1’S0’Q3+ S1’S0I3
+S1S0’Q2 +S1S0 IL

Register schematic
9

4-bit synchronous binary counter


Ø Counters increment (decrement) their content when enabled

Operation table HA truth table


Graphic symbol

Up-counter or
Down-counter???

Di = Qi⊕Ci
Ci+1 = QiCi
counter schematic
10

4-bit synchronous binary counter

Graphic symbol Operation table


HAS truth table

Logic schematic
11

4-bit synchronous binary counter with parallel load


ØThis counter is sometimes called presettable counter

Graphic symbol

Operation table

Logic schematic
12

BCD counters
Ø Up sequence: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, ......
Ø Down sequence: 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, ......

BCD up-counter

BCD up/down-counter

Ø Up counter loads 0 when counter content is 9 (1001)


Ø Up/down counter loads 0 when counter content is 9 (1001) and direction bit D=0
Ø Up/down counter loads 9 when counter content is 0 (0000) and direction bit D=1
13

Synchronous vs. Asynchronous counters


Ø Each FF in synchronous counters changes its output at
the same time.

Ø FFs’ output in asynchronous counters change values


at different times.

Ø Advantage of asynchronous counters is simple and low


cost (less gates).

Ø Weakness of asynchronous counters is longer delays in


comparison with synchronous counters.
14

4-bit asynchronous up counter

Graphic symbol

Logic schematic
15

4-bit asynchronous up counter

Timing diagram
Propagation Delay in Ripple Counters
Ø Ripple counters are simple—requiring the fewest
components to produce a given operation
o Cumulative propagation delay can cause problems
at high frequencies

Ø The counter will perform accurately when the period of


clock cycle must be longer than the total propagation delay
of it.
o For proper operation: Tclock ³ N x tpd
Tclock: the period of clock cycle
N: the number of FFs
Tpd: the proparation delay of a FF ( )

o Maximum frequency: Fmax = 1 / (N x tpd)


Propagation Delay in Ripple Counters

The CBA = 100


does not occur
• T=1000ns • T=100ns
• tpd=50ns • tpd=50ns
à T ³ 3 x tpd à T < 3 x tpd
Counter operates properly Counter operates wrongly
18

8-bit mixed-mode up counter (cont.)


ØMixed-mode counter consists of:
o synchronous counters with asynchronous slides.

Synchronous counter with 4-bit asynchronous slices


19

8-bit mixed-mode up counter


Ø Mixed-mode counter consists of:
o asynchronous counters with synchronous slices.

Asynchronous counter with 4-bit synchronous slices


20

Register-file
ØRegister-file is used as fast temporary storage

Graphic symbol

Register-file cell

Logic schematic
21

Register-file with 1 write port and 2 read ports


ØThis register-file is used for reading two operands and
writing one result in each clock cycle.

Graphic symbol

Register-file cell

Logic schematic
22

Random Access Memory (RAM)

Memory address
and content

CS: Chip Select

RWS: Read/Write Select


0: Read, 1: Write

Graphic symbol Graphic symbol


23

RAM organization
ØRam memory cells can be static or dynamic.
ØStatic RAM do not lose data with time.
ØDynamic RAM must be refreshed.

Memory cell

Memory schematic
24

16K x 32 RAM design with 16K x 8 RAMs


(to obtain wider bit widths)
25

64K x 8 RAM design with 16K x 8 RAMs


(to obtain a larger memory)
26

Push-down stack principle


27

4-Word push-down stack

Operation table
Control table Output table

Push=Shift right,
count up

Pop=Shift left,
count down

Stack schematic SRwPL: Shift Register with Parallel Load


28

Push-down stack implemented with a 1K RAM

Symbolic design

Operation table

Push: Data à RAM (TOP); Increment Top, Top 1


Pop: RAM (Top-1) à Data; Decrement Top, Top-1
Stack is full when Top=1023
Stack is empty when Top=0
Control table Location with address 1023 is never loaded
29

FIFO queue principles

Queue content Queue content


before 45 is after 45 is stored
stored Queue content
after 23 is read
30

4-word FIFO queue

Shift right
Operation table Control table

Read=No shift, count down

Write=Shift right, count up

Queue schematic
31

FIFO queue implemented with a 1K RAM

Control table

Symbolic design

Operation table

Write: Data à RAM (Back); Increment Back


Read: RAM (Front) à Data; Increment Front
Queue is full/empty when Front=Back Schematic

Das könnte Ihnen auch gefallen