




版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
觸發(fā)器
Flip-Flops數(shù)字系統(tǒng)設(shè)計(jì)2Spring
2015
ZDMC
–
Lec.
#7復(fù)習(xí)
時(shí)序電路的基本概念觸發(fā)器本節(jié)內(nèi)容
組合電路和Verilog語(yǔ)言測(cè)試數(shù)字系統(tǒng)設(shè)計(jì)3Spring
2015
ZDMC
–
Lec.
#7測(cè)試(補(bǔ)充)
測(cè)試是一個(gè)專(zhuān)門(mén)用來(lái)給電路的HDL模型施加的一個(gè)激勵(lì)的HDL程序,目的是測(cè)試和觀察其在激勵(lì)下的響應(yīng)。典型的測(cè)試模塊沒(méi)有輸入和輸出,加到設(shè)計(jì)模塊用于模擬的輸入信號(hào)在激勵(lì)模塊中定義為局部reg型數(shù)據(jù)。顯示設(shè)計(jì)模塊的測(cè)試輸出在激勵(lì)模塊中定義為局部wire型數(shù)據(jù)。用局部的標(biāo)識(shí)來(lái)例化測(cè)試的模塊。測(cè)試模塊的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)設(shè)計(jì)4Spring
2015
ZDMC
–
Lec.
#7Sequential
Logic
時(shí)序邏輯
Sequential
Circuits
時(shí)序電路
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定時(shí)
Cascading級(jí)聯(lián)
flip-flops
for
proper
operation
Clock
skew時(shí)鐘偏移數(shù)字系統(tǒng)設(shè)計(jì)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)設(shè)計(jì)6Spring
2015
ZDMC
–
Lec.
#7X1X2
?
?
?Xnswitching
networkZ1Z2
?
?
?ZnCircuits
with
Feedback
How
to
control
feedback?
What
stops
values
from
cycling
around
endlessly數(shù)字系統(tǒng)設(shè)計(jì)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)設(shè)計(jì)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)設(shè)計(jì)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)設(shè)計(jì)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)設(shè)計(jì)100Timing
BehaviorRSQ
Q'數(shù)字系統(tǒng)設(shè)計(jì)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)設(shè)計(jì)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)設(shè)計(jì)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)設(shè)計(jì)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)設(shè)計(jì)100數(shù)字系統(tǒng)設(shè)計(jì)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)設(shè)計(jì)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)設(shè)計(jì)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)設(shè)計(jì)RSQ'
QRSQ'
QRSRRQ'21Set
1scatch
S
R
CLK
P
P'
Q
Q'數(shù)字系統(tǒng)設(shè)計(jì)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. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年行政復(fù)議法試題 及答案
- 2024年中華人民共和國(guó)民政部離婚協(xié)議書(shū)范本
- 應(yīng)用文寫(xiě)作-關(guān)于國(guó)畫(huà)俱樂(lè)部報(bào)名失敗及其他俱樂(lè)部推 薦 致+講義 高二上學(xué)期9月月考英語(yǔ)試卷
- 河南省駐馬店市2024-2025學(xué)年高三下學(xué)期2月質(zhì)量檢測(cè)歷史試題(原卷版+解析版)
- 2025-2030年中國(guó)茶葉解塊篩分機(jī)數(shù)據(jù)監(jiān)測(cè)研究報(bào)告
- 2025-2030年中國(guó)單軸干混砂漿攪拌機(jī)數(shù)據(jù)監(jiān)測(cè)研究報(bào)告
- Unit 11 Sad movies make me cry Section A (1a-2c)教學(xué)設(shè)計(jì)(表格式)2025年人教版英語(yǔ)九年級(jí)全冊(cè)
- 白城鐵皮風(fēng)管保溫施工方案
- 大廈物業(yè)管理服務(wù)合同
- 鄉(xiāng)村旅游規(guī)劃方案
- 一型糖尿病的護(hù)理查房
- 《工業(yè)管道在線檢驗(yàn)指南》
- 保育員與教師協(xié)作配合的技巧與案例
- 2024-2030年中國(guó)實(shí)驗(yàn)室家具行業(yè)發(fā)展規(guī)劃及投資前景預(yù)測(cè)報(bào)告版
- 綠色金融案例分析
- 年產(chǎn) 10 萬(wàn)噸石墨負(fù)極材料項(xiàng)目環(huán)境風(fēng)險(xiǎn)專(zhuān)項(xiàng)評(píng)價(jià)
- 【MOOC】運(yùn)動(dòng)安全與健康-浙江大學(xué) 中國(guó)大學(xué)慕課MOOC答案
- 《T CMADI 096-2022增材制造植入物設(shè)計(jì)輸入要求》
- 2025屆東北師大附屬中學(xué)高考數(shù)學(xué)倒計(jì)時(shí)模擬卷含解析
- 智能交通監(jiān)控系統(tǒng)運(yùn)維服務(wù)方案(純方案-)
- 【MOOC】中學(xué)教育見(jiàn)習(xí)與實(shí)習(xí)-河北師范大學(xué) 中國(guó)大學(xué)慕課MOOC答案
評(píng)論
0/150
提交評(píng)論