数字逻辑设计 - 触发器 Flip-Flops_第1页
数字逻辑设计 - 触发器 Flip-Flops_第2页
数字逻辑设计 - 触发器 Flip-Flops_第3页
数字逻辑设计 - 触发器 Flip-Flops_第4页
数字逻辑设计 - 触发器 Flip-Flops_第5页
已阅读5页,还剩18页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

触发器

Flip-Flops数字系统设计2Spring

2015

ZDMC

Lec.

#7复习

时序电路的基本概念触发器本节内容

组合电路和Verilog语言测试数字系统设计3Spring

2015

ZDMC

Lec.

#7测试(补充)

测试是一个专门用来给电路的HDL模型施加的一个激励的HDL程序,目的是测试和观察其在激励下的响应。典型的测试模块没有输入和输出,加到设计模块用于模拟的输入信号在激励模块中定义为局部reg型数据。显示设计模块的测试输出在激励模块中定义为局部wire型数据。用局部的标识来例化测试的模块。测试模块的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数字系统设计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级联

flip-flops

for

proper

operation

Clock

skew时钟偏移数字系统设计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数字系统设计6Spring

2015

ZDMC

Lec.

#7X1X2

•Xnswitching

networkZ1Z2

•ZnCircuits

with

Feedback

How

to

control

feedback?

What

stops

values

from

cycling

around

endlessly数字系统设计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"数字系统设计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)数字系统设计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数字系统设计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数字系统设计100Timing

BehaviorRSQ

Q'数字系统设计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数字系统设计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数字系统设计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数字系统设计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'数字系统设计100数字系统设计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'数字系统设计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数字系统设计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数字系统设计RSQ'

QRSQ'

QRSRRQ'21Set

1scatch

S

R

CLK

P

P'

Q

Q'数字系统设计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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论