/
1 Unit  9 Counters & RAM 1 Unit  9 Counters & RAM

1 Unit 9 Counters & RAM - PowerPoint Presentation

genderadidas
genderadidas . @genderadidas
Follow
348 views
Uploaded On 2020-06-29

1 Unit 9 Counters & RAM - PPT Presentation

College of Computer and Information Sciences Department of Computer Science CSC 220 Computer Organization Unit 9 Counters and RAM Overview Asynchronous Ripple Counters A complex Counter ID: 789436

counter counters ripple asynchronous counters counter asynchronous ripple clr mod clk bit mohamed memory berbar register clock binary data

Share:

Link:

Embed:

Download Presentation from below link

Download The PPT/PDF document "1 Unit 9 Counters & RAM" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

1

Unit 9Counters & RAM

College of Computer and Information Sciences

Department of Computer Science CSC 220: Computer Organization

Slide2

Unit

9:

Counters and RAM

OverviewAsynchronous (Ripple) CountersA complex CounterIntroduction to RAM

Size

Reading a RAMWriting to a RAM

Chapter-6, 7

M. Morris Mano, Charles R.

Kime

and Tom Martin,

Logic and Computer Design Fundamentals

, Global (5

th

) Edition, Pearson Education Limited, 2016. ISBN: 9781292096124

Slide3

Asynchronous (Ripple) Counters

3

Asynchronous (Ripple) Counters

Example: 2-bit ripple binary counter.Output of one flip-flop is connected to the clock input of the next more-significant flip-flop.Timing diagram00  01  10  11  00 ...

4

3

2

1

CLK

Q

0

Q

0

Q

1

1

1

1

1

0

0

0

0

0

0

Slide4

Asynchronous (Ripple) Counters

4

Asynchronous (Ripple) Counters

Example: 3-bit ripple binary counter.

4

3

2

1

CLK

Q

0

Q

1

1

1

1

1

0

0

0

0

0

0

8

7

6

5

1

1

0

0

1

1

0

0

Q

2

0

0

0

0

1

1

1

1

0

Recycles back to 0

Slide5

Asynchronous Counters with MOD number < 2^n

5

Asyn. Counters with MOD no. < 2

nDecade counters (or BCD counters) are counters with 10 states (modulus-10) in their sequence. They are commonly used in daily life (e.g.: utility meters, odometers, etc.).Design an asynchronous decade counter.

D

CLK

HIGH

K

J

C

CLR

Q

K

J

C

CLR

Q

C

K

J

C

CLR

Q

B

K

J

C

CLR

Q

A

(

A.C

)

'

Slide6

Asynchronous Down Counters

6

Asynchronous Down Counters

So far we are dealing with up counters. Down counters, on the other hand, count downward from a maximum value to zero, and repeat.Example: A 3-bit binary (MOD-23) down counter. K

J

K

J

Q

1

Q

0

C

C

K

J

C

Q

2

(MSB)

CLK

1

Q

Q'

Q

Q'

Q

Q'

Q

Q'

3-bit binary up counter

3-bit binary down counter

K

J

K

J

Q

1

Q

0

C

C

K

J

C

Q

2

(MSB)

CLK

1

Q

Q'

Q

Q'

Q

Q'

Q

Q'

Slide7

Asynchronous Counters with MOD number < 2^n

7

Asyn. Counters with MOD no. < 2

nExercise: How to construct an asynchronous MOD-5 counter? MOD-7 counter? MOD-12 counter?Question: The following is a MOD-? counter?

K

J

Q

Q

CLR

C

B

A

C

D

E

F

All

J

=

K =

1

.

K

J

Q

Q

CLR

K

J

Q

Q

CLR

K

J

Q

Q

CLR

K

J

Q

Q

CLR

K

J

Q

Q

CLR

D

E

F

Slide8

Asynchronous (Ripple) Counters

8

Asynchronous (Ripple) Counters

Propagation delays in an asynchronous (ripple-clocked) binary counter.If the accumulated delay is greater than the clock pulse, some counter states may be misrepresented!

4

3

2

1

CLK

Q

0

Q

1

Q

2

t

PLH

(CLK to

Q

0

)

t

PHL

(CLK to

Q

0

)

t

PLH

(

Q

0

to

Q

1

)

t

PHL

(CLK to

Q

0

)

t

PHL

(

Q

0

to

Q

1

)

t

PLH

(

Q

1

to

Q

2

)

Slide9

4-bit Ring Counter

9

So on each successive clock pulse, the counter circulates the same data bit between the four flip-flops over and over again around the “ring” every fourth clock cycle. But in order to cycle the data correctly around the counter we must first “load” the counter with a suitable data pattern as all logic “0’s” or all logic “1’s” outputted at each clock cycle would make the ring counter invalid.

A “CLEAR” signal is firstly applied to all the flip-flops together in order to “RESET” their outputs to a logic “0” level and then a “PRESET” pulse is applied to the input of the first flip-flop ( FFA ) before the clock pulses are applied. This then places a single logic “1” value into the circuit of the ring counter.

Slide10

10

Slide11

11

Slide12

12

Slide13

13

Slide14

Dr Mohamed A Berbar

14

Slide15

Dr Mohamed A Berbar

15

Slide16

Dr Mohamed A Berbar

16

Slide17

Dr Mohamed A Berbar

17

Slide18

Dr Mohamed A Berbar

18

Slide19

Dr Mohamed A Berbar

19

Slide20

Dr Mohamed A Berbar

20

Slide21

21

RTL and Memory

While memory transfers are similar to register transfers, we usually identify them differently. Specifically, memory to register transfers are called read operations, while register to memory transfers are called write operations. Both require specification of the memory location to be used (which can be done through a special register or a special bus) and a storage location which will hold the result of a read or which holds the data to be written.

Slide22

22

RTL expressions for a

Read

operation, assuming the use of an address registers: RTL expressions for a Write operation, assuming use of a data register:

Slide23

23

Register to Memory Transfers are denoted using square brackets surrounding the memory address.

e.g. DR

 M[AR] (Read operation)e.g. M[AR]  DR (Write operation)