14
Sequential Circuits Storage Elements Based partly on Patt and Patel Edited for CS470 by Y.K. Malaiya

Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

Sequential Circuits

Storage Elements

Based partly on Patt and Patel

Edited for CS470 by Y.K. Malaiya

Page 2: Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

Combinational vs. Sequential

Combinational Circuit does not store information, always gives the same

output for a given set of inputs

example: adder always generates sum and carry,

regardless of previous inputs

Sequential Circuit stores information, output depends on stored info

(state) plus input

so a given input might produce different outputs,

depending on the stored information

useful for building “memory” elements and “state

machines”

example: ticket counterCS470 - Colorado State University 2

Page 3: Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

Storage elements

1-bit: latch, gated latch or flip-flop

Flipflop: Clocked for proper timing

Row of storage elements: register

2-D array: memory chip or system

Technology:

Static: flip-flops using feedback (SRAMs)

Dynamic: charge for storage (DRAMs)

CS470 - Colorado State University 3

Page 4: Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

R-S Latch: Common flipflop element

R = S = 1

hold current value in latch

S = 0, R=1

set value to 1

R = 0, S = 1

set value to 0

R = S = 0

both outputs equal one

Don’t do it!

CS470 - Colorado State University 4

Page 5: Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

Flip-flops

CS470 - Colorado State University 5

Rising edge triggered flipflop

Page 6: Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

Rising edge triggered

CS470 - Colorado State University 6

Page 7: Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

Register

A register stores a multi-bit value.

a collection of flipflops, all controlled by a common

clock

CS470 - Colorado State University 7

Page 8: Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

Other storage cell designs

Several storage cell designs possible

Static: flip-flop using feedback

Cross coupled gates or transmission gates

May use a dual phase clock

Used in SRAMS

Dynamic: charge across a capacitor

Needs periodic refreshing

Higher density, slower

Used in DRAMS

CS470 - Colorado State University 8

Page 9: Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

Demonstration

CS470 - Colorado State University 9

Page 10: Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

Representing Multi-bit Values

Number bits from right (0) to left (n-1)

just a convention -- could be left to right, but must be

consistent

Use brackets to denote range:

D[l:r] denotes bit l to bit r, from left to right

May also see A<14:9>,

especially in hardware block diagrams.CS470 - Colorado State University 10

A = 0101001101010101

A[2:0] = 101A[14:9] = 101001

015

Page 11: Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

Memory

Now that we know how to store bits,

we can build a memory – a logical k × m array

of

stored bits.

CS470 - Colorado State University 11

•••

k = 2n

locations

m bits

Address Space:

number of locations(usually a power of 2)

Addressability:

number of bits per location(e.g., byte-addressable)

Page 12: Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

22 x 3 Memory

CS470 - Colorado State University 12

address

decoder

word select word WEaddress

write

enable

input bits

output bits

Page 13: Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

More Memory Details

Not the way actual memory is implemented! fewer transistors, denser, relies on electrical

properties

But the logical structure is very similar. address decoder, word select line, word write enable

Random Access Memory: 2 different types Static RAM (SRAM)

fast, used for caches, maintains data when

powered

Dynamic RAM (DRAM)

slower but denser, storage decays, must be

refreshed

Non-Volatile Memory: ROM, PROM, FlashCS470 - Colorado State University 13

Page 14: Transistors and Logic Gatescs470/s17/1bseqskts1.pdf · fewer transistors, denser, relies on electrical properties But the logical structure is very similar. address decoder, word

Memory Bandwidth/Capacity

Bandwidth is the rate at which memory can be

read or written by the processor.

Approximately equal to the memory bus size

times the speed at which the memory is clocked.

Examples of bandwidth : Memory chips, SDRAM, up to 24GB/s

Chip capacity: up to 8 Gbits. Often sold as memory

modules.

CS470 - Colorado State University 14