數(shù)字邏輯設計 - 觸發(fā)器 Flip-Flops_第1頁
數(shù)字邏輯設計 - 觸發(fā)器 Flip-Flops_第2頁
數(shù)字邏輯設計 - 觸發(fā)器 Flip-Flops_第3頁
數(shù)字邏輯設計 - 觸發(fā)器 Flip-Flops_第4頁
數(shù)字邏輯設計 - 觸發(fā)器 Flip-Flops_第5頁
已閱讀5頁,還剩18頁未讀 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

觸發(fā)器

Flip-Flops數(shù)字系統(tǒng)設計2Spring

2015

ZDMC

Lec.

#7復習

時序電路的基本概念觸發(fā)器本節(jié)內容

組合電路和Verilog語言測試數(shù)字系統(tǒng)設計3Spring

2015

ZDMC

Lec.

#7測試(補充)

測試是一個專門用來給電路的HDL模型施加的一個激勵的HDL程序,目的是測試和觀察其在激勵下的響應。典型的測試模塊沒有輸入和輸出,加到設計模塊用于模擬的輸入信號在激勵模塊中定義為局部reg型數(shù)據。顯示設計模塊的測試輸出在激勵模塊中定義為局部wire型數(shù)據。用局部的標識來例化測試的模塊。測試模塊的HDL格式:

module

test_module_name;

//Declare

local

reg

and

wire

identifiers.

//Instantiate

the

design

module

under

test.

//Specify

a

stopwatch,

using

$finish

to

terminate

the

simulation

//Generate

stimulus,

using

initial

and

always

statements.

//Display

the

output

response

(text

or

graphics

(or

both)).

endmodule數(shù)字系統(tǒng)設計4Spring

2015

ZDMC

Lec.

#7Sequential

Logic

時序邏輯

Sequential

Circuits

時序電路

Simple

circuits

with

feedback

Latches

(level

sensitive)

Storage

elements

that

operate

with

signal

levels

(rather

than

signal

transitions)

are

referred

to

as

latches.

Flip-flops

(edge

sensitive)

(abbreviated

FF)

A

flip-flop

is

a

binary

storage

device

capable

of

storing

one

bit

of

information.Timing

Methodologies定時

Cascading級聯(lián)

flip-flops

for

proper

operation

Clock

skew時鐘偏移數(shù)字系統(tǒng)設計5C3

value

C1comparatorequal

C2multiplexerreset

open/closedSpring

2015

ZDMC

Lec.

#7newmuxcontrolclock

equalcomb.

logic

stateSequential

Circuits

Circuits

with

Feedback

Outputs

=

f(inputs,

past

inputs,

past

outputs)

Basis

for

building

"memory"

into

logic

circuits

Door

combination

lock

is

an

example

of

a

sequential

circuit

State

is

memory

State

is

an

"output"

and

an

"input"

to

combinational

logic

Combination

storage

elements

are

also

memory數(shù)字系統(tǒng)設計6Spring

2015

ZDMC

Lec.

#7X1X2

?

?

?Xnswitching

networkZ1Z2

?

?

?ZnCircuits

with

Feedback

How

to

control

feedback?

What

stops

values

from

cycling

around

endlessly數(shù)字系統(tǒng)設計7Spring

2015

ZDMC

Lec.

#7"load""data""stored

value"

Simplest

Circuits

with

Feedback

Two

inverters

form

a

static

memory

cell

Will

hold

value

as

long

as

it

has

power

applied

"1"

"stored

value"

"0"

How

to

get

a

new

value

into

the

memory

cell?

Selectively

break

feedback

path

Load

new

value

into

cell

"remember"數(shù)字系統(tǒng)設計8Spring

2015

ZDMC

Lec.

#7RSQ

Q'RSQS'R'QQ

Q'S'R'

Memory

with

Cross-coupled

Gates

Cross-coupled

NOR

gates

Similar

to

inverter

pair,

with

capability

to

force

output

to

0

(reset=1)

or

1

(set=1)

Cross-coupled

NAND

gates

Similar

to

inverter

pair,

with

capability

to

force

output

to

0

(reset=0)

or

1

(set=0)數(shù)字系統(tǒng)設計Setting

the

Latch

(FF)

Pulsing

the

SET

input

to

the

0

state

when

(a)

Q

=

0

prior

to

SET

pulse;(b)

Q

=

1

prior

to

SET

pulse.

Note

that,

in

both

cases,

Q

ends

up

HIGH.9Spring

2015

ZDMC

Lec.

#7數(shù)字系統(tǒng)設計Resetting

the

Latch

(FF)

Pulsing

the

RESET

input

to

the

LOW

state

when

(a)

Q

=

0

prior

to

RESETpulse;

(b)

Q

=

1

prior

to

RESET

pulse.

In

each

case,

Q

ends

up

low.10Spring

2015

ZDMC

Lec.

#711Spring

2015

ZDMC

Lec.

#7ResetHoldSetSetResetRace

R

S

Q

\Q數(shù)字系統(tǒng)設計100Timing

BehaviorRSQ

Q'數(shù)字系統(tǒng)設計12Spring

2015

ZDMC

Lec.

#7S00R01Qhold011011unstableState

Behavior

of

R-S

latch

Truth

table

of

R-S

latch

behaviorQ

Q'

0

1Q

Q'

1

0Q

Q'0

0Q

Q'1

1數(shù)字系統(tǒng)設計13Spring

2015

ZDMC

Lec.

#7Theoretical

R-S

Latch

Behavior

State

Diagram

States:

possible

values

Transitions:

changesbased

on

inputsQ

Q'

0

1Q

Q'

1

0Q

Q'

0

0Q

Q'

1

1SR=00SR=11SR=00SR=10SR=01SR=00SR=10SR=00SR=01SR=11SR=11SR=10SR=01SR=01SR=10SR=11possible

oscillationbetween

states

00

and

11數(shù)字系統(tǒng)設計14Observed

R-S

Latch

Behavior

SR=00SR=00Q

Q'

0

1Q

Q'

1

0Very

difficult

to

observe

R-S

latch

in

the

1-1

state

One

of

R

or

S

usually

changes

firstAmbiguously

returns

to

state

0-1

or

1-0

A

so-called

"race

condition"

Or

non-deterministic

transition

SR=10SR=01SR=00SR=10SR=00SR=01SR=01SR=10

SR=11

Q

Q'

0

0SR=11

SR=11

Spring

2015

ZDMC

Lec.

#700X110X1數(shù)字系統(tǒng)設計15Spring

2015

ZDMC

Lec.

#7RQQ'Q(t+?)RSQ(t)SSRQ(t)Q(t+?)000001010011110001010011111101XXholdresetsetnot

allowedcharacteristic

equation

Q(t+?)

=

S

+

R’

Q(t)R-S

Latch

Analysis

Break

feedback

pathQ(t)RS16Spring

2015

ZDMC

Lec.

#7

QQ'

R'enable'

S'R

SGated

R-S

Latch

Control

when

R

andS

inputs

matter

Otherwise,

the

slightest

glitch

on

R

or

S

while

enable

is

low

could

causechange

in

valuestoredSetReset

S'

R'

enable'

Q

Q'數(shù)字系統(tǒng)設計100數(shù)字系統(tǒng)設計17

periodSpring

2015

ZDMC

Lec.

#7Clocks

Used

to

keep

time

Wait

long

enough

for

inputs

(R'

and

S')

to

settle

Then

allow

to

have

effect

on

value

storedClocks

are

regular

periodic

signals

Period

(time

between

ticks)

Duty-cycle

(time

clock

is

high

between

ticks

-

expressed

as

%

of

period)

duty

cycle

(in

this

case,

50%)Q'數(shù)字系統(tǒng)設計18

clockSpring

2015

ZDMC

Lec.

#7R'

and

S'Clocks

(cont’d)

Controlling

an

R-S

latch

with

a

clock

Can't

let

R

and

S

change

while

clock

is

active

(allowing

R

and

S

to

pass)

Only

have

half

of

clock

period

for

signal

changes

to

propagate

Signals

must

be

stable

for

the

other

half

of

clock

period

Qstable

c

hanging

stable

c

hanging

stable

R'clock'

S'R

S19Spring

2015

ZDMC

Lec.

#7

clock數(shù)字系統(tǒng)設計RSQ'

QRSQ'

QRSCascading

Latches

Connect

output

of

one

latch

to

input

of

anotherHow

to

stop

changes

from

racing

through

chain?

Need

to

control

flow

of

data

from

one

latch

to

the

next

Advance

from

one

latch

per

clock

period

Worry

about

logic

between

latches

(arrows)

that

is

too

fast20Spring

2015

ZDMC

Lec.

#7Master-Slave

Structure

Break

flow

by

alternating

clocks

(like

an

air-lock)

Use

positive

clock

to

latch

inputs

into

one

R-S

latch

Use

negative

clock

to

change

outputs

with

another

R-S

latchView

pair

as

one

basic

unit

master-slave

flip-flop

twice

as

much

logic

output

changes

a

few

gate

delays

after

the

falling

edge

of

clock

but

does

not

affect

any

cascaded

flip-flopsmaster

stageslave

stageP'P

CLK數(shù)字系統(tǒng)設計RSQ'

QRSQ'

QRSRRQ'21Set

1scatch

S

R

CLK

P

P'

Q

Q'數(shù)字系統(tǒng)設計Reset

Master

Outputs

Slave

OutputsSpring

2015

ZDMC

Lec.

#7The

1s

Catching

Problem

In

first

R-S

stage

of

master-slave

FF

0-1-0

glitch

on

R

or

S

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論