Estratto del documento

I

I : II

を 。

: 0 。

to & Tot )

1: : 0 ② I

I = 王

익 る I 。

よい

I SC t

I =

: " <

= ) よる

I

. =

Consider the

· diagram

Moore state :

Each (So Sa)

circle Sc

Se

represents state

a ,

, ,

Inside each because

the output

machine the

state value

output written Moore

in is

is asso

a

, ,

ciated state

the

With .

Each labeled condition

transition

represents input that

the

with

state it

arrow causes

a .

,

If has bits In

K logz(N) this

· the

states least status

FSM N it register

at in

requires =

an .

, the bit

to states

redundancy resistant

add code to

in

Way way

we .

can errors

more

a

such

One one-hot encoding

· rendundant encoding is :

Each state by binary word

represented one 's

exactly

with

is a

bits

other

All 0

.

are

For one-hot Higher robust

encoding

· The

N instead advantage

loga

states (N)

bits of

N is

requires

, . .

hardware

the higher

While disadvantage

bit-flips

and

against disturbances is consum

resource

ness ;

ption . table

the

In State Transition

Moore

· :

Inputs listed columns

are across .

listed

The by

state

current is .

rows

next

the

Each state

contains

cell .

In the table

Moore Output

· transition :

listed

the output state only

is per .

they

because do the

inputs output

not

not directly

affect

do appear .

,

Usually how

when deal with important to the At

set initial

problem state of

FSMs FSM

is

we one an

, .

,

power-on :

logic

the values device

inside the unpredictable

are

unless used

techniques

specific are . (PoR) The the

goal

Power-on

The reset digital

most to bring system

· Reset of

solution is

is

common .

Therefore reset signal the

state added

and be

into to

known logic must

reset FSM .

.

a a

, reset

initial =

state

: ∞ Output

Next State ③

SR s

> ∞

Logia Istatus Logic

register(

F

' G

clock

In this FSM with

· reset :

forces the state

reset

the register

signal into So

the state

initial .

this example active-high

synchronous reset

uses a .

よま

I : DII 。

: -

i

1: 50 % 0

B

: = . I

o σ

a

を こ

n

B I

= = 。

4

な SC

及 : t

I =

=

' <

이 による

,

In the state diagram

· reset

with :

treated

reset explicitly .

input

is as an regardless

to

When the transitions the current inputs

So of

FSM state

R 1

= or .

, ,

transition behavior

The table

state this

· reflects

with reset :

When R So

next always

state

the

1 is

= .

,

When transitions

normal state apply

R 0

= .

, [s/01 ·Sep 1100

& So

Io/0o 7 I2/02

어 Io/0s

IINOU s DINOz

<31 0

生 至 มื

In the Mealy State diagram

· :

not inside states

outputs written .

are (1/0

they .

condition

instead the together

transitions format)

with input

the

appear on

, ,

This the the

reflects fact longer

that output branch.

· but

associated state

the the

with with

is no ,

The to

table

transition

· state the

Mealy table

transition

similar However output

of Moore's

FSM is

is .

a ,

different because :

the both

depends

output inputs current

and state

on .

have timing

A that depend

the

Given

that Mealy outputs

problem issue

in is

serious we can on

.

asynchronously

change which

transitions

they and this

inputs produce spuriou unwom

can can are

,

tool glitches

output .

happen

glitches change clock

when lea

the

before current this

These the ispolates and

state

inputs changes

temporary

to

do unintended output .

, .

the be

solve

To the output

· registred

issue can

, output

/register

I Output

Next State ↓

SR 9

> X

X

Logia ∅

Istatus Logic OR

register(

F

' o loutput

register(

clock Clock

The effect

· is :

the becomes synchronous

output again .

but by

delayed clock .

it is cycle

one

In this the synchronous

· behavior between

output force and

register input current state

will

way ,

a

but the actual cycles

take clock

will

output a .

implementation

the

About Verilog

System

of FSM the inputs

in are :

,

bit)

11 enables the FSM .

-

en .

n)asynchronous reset)

low

active

rest -

.

Output : (2-bit)

out-code

States

· :

So Sa Sa S

, , ,

State

· register :

2-bit

.

∆ state implemented

The

· register is using :

alway Af

s. . to

sensitivity :

posedge clK

i .

. rst

negedge

ii. . n .

non-blocking assignments

.

before

signal declared

reg usage

a .

Where States

forced declara

encoded local

state parameters

· to

the and

ret-n So

is using

0 are

= .

,

tion before

done

be

must usage . state)

Next-state logic (current

implemented and

comb

F and

with

· always

is case

uses a

then have blocking assignments

we .

Reset behavior here

handled

already the state

· register does not

it

in

is so appear .

, FSM)

(Moore

to

implemented similarly depends

Output-logic the state

and

· current

only

G F

is on

out-cod must be

and .

reg

a

It's to hardware

possible

· the

implementation

always

and the

F block

G single

into comb is sa

merge ;

a

preferable

but because clearer

usually

is

version is

previous

me .

°

6 Lecture

Simulations be performed and This

· direct farce

commands such

Model

in using

sim approac

can as run .

Ch familiar

become the

to star

Verilog However

because syntax

System

useful With

allows

it in

is . ,

flow

dad simulations

electronic described

design of out

carried by

not

HDL manual

circuits in are

, testbench

ly Instead

forcing performed

signals they using

are a

, .

.

testbench

The

· verification

the

the environment

role verification real world

plays design

in

same as :

a

designed the that

the electrical meets

the

to

by

circuit circuit its

tests verify

engineer engineer re

quirements

. tested

individuals separately

incremental first

The modules

usual workflow

verification is

· are

: ,

,

together

tested

then modules and the

testing

integration

multiple entire

finally

during circuit is

are ,

verified .

whole

as a

testbench It's

another module

Verilog

A ports

· with

but difference

crucial

System has

it

is a

.

no

:

a

,

exclusively designed

to

sed functionality by:

the

verify circuit

the of

the

to

providing stimuli inputs

circuit .

checking produced by

outputs the

the circuit .

Both the stimuli the

generation

· of outputs

verification of

and rely non-synthesizable comman

on

hardware

These describe executed

describe

but

ds instead

real

commands duri

procedures

do not

. ,

simulation

ng .

For they hardware

this be

· converted test

allowed

and inside

into

cannot the

circuit only

reason are

a

, modules

bench inside synthesizable design

never .

,

In this

· image we see

can :

, Test)

DUT(Device Which module

top-level

the the

Under instance of verify

want to

is we

,

have which

the stimuli values

drive

side input

into

On the ports

input DUT

,

we .

check

have and

the logic which

side the

On output observes

output outputs

validates DVT

we , .

If clock)

the reset) clock

DUT The

sequential required. and

and reset

generator also

is is sig.

a

, testbench

nals the connected

inside and DUT

to the

generated .

are

testbench

A clear

follows structure

· very

a :

testbench

module

A externally

module

the interaction

without does communicate

not

.

1 ports All

: .

happens testbench

between the

internally DVT

signals and

Declaration used

signals stimuli

.

2 and

of probes

as

Signals drive

that declared

inputs

DVT reg.

are as

Signals that declared

outputs

observe DUT wire

as

are .

Instantation testbench

the

module

.

3 (DVT)

to instantiated

tested inside

be the

the DUT

of is e

: ,

like .

module

xactly other

any m

Procedural blocks

4

. blocks

These used to :

are

drive ·

stimuli

i .

. and .

clock

generate

ii reset

. check

outputs

iii

. . m re

finished

when

the

stop simulation

iv .

.

The how testbench

module the

defines from

section signals

instantation connected

· ports

the of

to

are

the DUT

.

The module file

SystemVerilog

module's

exactly

match declaration

used

the the

must in

name name .

DVT)

The example

(for and the module

instance arbitrary technic

itself

is even

name name can

,

ressed

be

cally .

There two ports

· to connect

valid

are ways :

Ordered signals

list declaration

connected order module

following the used the

in

same

are

: .

· This method compact but

is error-prone .

Port-name connection : namel(

Syntax (signal

port

.

i name

·

: _

_

does

The order not matter

ii

. . preferred

method

This strongly

is

iii. .

wm

signals Ports signals

Module TB

TB

left side

the

On while side to

the module

· testbench

to right refer

signals

refer

names names

on

; ,

,

ports

.

Signals have the

and

· module

the but

allowed not mandatory Con

port is

using

can same

name as

name

any .

,

be

nections Ports

separated by left

be unconnected

must also

can

. :

commas

left

Output be

ports .

unconnected

safely if unused

may

Input testbench

left value

ports the explicitly

unless

if unconnected unknown value

assigns

assume

s an a .

,

As

· rule

general

a :

signals ports

connect input

to

reg .

output ports

signals connect to

wire .

Stimuli testbench

that

· signals the actively drives with values

specific :

are declared

be

They must reg.

as

They typically inside

assigned block

initial

ar an .

They to

connected ports

input theDUT

of

ar .

Probes used to

· signals outputs

observe

only DUT

are :

declared wire

are as .

They connections

simply

ar .

They DUT

output

connected the

of

to ports .

ar

clock signal

The testbench value

declared

· inside the

clK with initialization

often

is .

as an

reg

a ,

Initialization inside modules

be

synthesizable used but

values must design

not , they

so never

are ,

testbenches

they acceptable in .

are

The clock defined by

· waveform is :

Inverting signal

the .

After fixed delay

a .

Inside always block

.

an picoseconds)

Time (usually be

depend explicitly

but

· nanoseconds

simulator

units the they can

or

on ,

like

specified delays etc

#10 #10ps

using ms .

,

,

At typically

· forced Power-

called

systems into state condition

reset

known using

power-up are a a ,

, sequential elements

and

(PoR) During

Reset reset assigned

registers value usually

known

On ze

are a

. ,

,

MO .

In this the reset active-low

· is meaning

case :

, ,

reset when

active est 0

.

is =

n

.

anactive when

reset est .

1

is n =

-

The signal initialized to

the

to

reset

· active the

declared and PoR Then

value inside

is impose

as reg

a . ,

the deasserted

certain

block after time reset .

initial is

a

an ,

,

The waveform shows

· :

to

est.n at 4

35

0 .

to

switching that

rest-n normal

after operation

allowing

1 , .

This

· from controlled

the starts state

simulation

circuit always known

ensures .

a ,

The to

initial

· block used

mainly

is :

drive stimuli

.

reset behavior

control .

checks

output

perform .

the

stop simulation .

It and

synthesizable starts

not

· executing at be

statement present

time When than

is 0 is

more one

. ,

end

and delimiters required

gin are .

Signals assigned (

· and

the

inside block assignment

block be

initial must use

reg .

diagram how

This signals change

illustrates

· time

over :

time asserted.

signal

the

After start

units is

10 ,

additional assigned

delays and

values

After in-b.

to in a

new are

,

change sequentially

Values

Anteprima
Vedrai una selezione di 10 pagine su 42
Appunti Electronics systems (parte 5) Pag. 1 Appunti Electronics systems (parte 5) Pag. 2
Anteprima di 10 pagg. su 42.
Scarica il documento per vederlo tutto.
Appunti Electronics systems (parte 5) Pag. 6
Anteprima di 10 pagg. su 42.
Scarica il documento per vederlo tutto.
Appunti Electronics systems (parte 5) Pag. 11
Anteprima di 10 pagg. su 42.
Scarica il documento per vederlo tutto.
Appunti Electronics systems (parte 5) Pag. 16
Anteprima di 10 pagg. su 42.
Scarica il documento per vederlo tutto.
Appunti Electronics systems (parte 5) Pag. 21
Anteprima di 10 pagg. su 42.
Scarica il documento per vederlo tutto.
Appunti Electronics systems (parte 5) Pag. 26
Anteprima di 10 pagg. su 42.
Scarica il documento per vederlo tutto.
Appunti Electronics systems (parte 5) Pag. 31
Anteprima di 10 pagg. su 42.
Scarica il documento per vederlo tutto.
Appunti Electronics systems (parte 5) Pag. 36
Anteprima di 10 pagg. su 42.
Scarica il documento per vederlo tutto.
Appunti Electronics systems (parte 5) Pag. 41
1 su 42
D/illustrazione/soddisfatti o rimborsati
Acquista con carta o PayPal
Scarica i documenti tutte le volte che vuoi
Dettagli
SSD
Ingegneria industriale e dell'informazione ING-INF/01 Elettronica

I contenuti di questa pagina costituiscono rielaborazioni personali del Publisher ingchiaretta98 di informazioni apprese con la frequenza delle lezioni di Electronics systems e studio autonomo di eventuali libri di riferimento in preparazione dell'esame finale o della tesi. Non devono intendersi come materiale ufficiale dell'università Università degli Studi di Pisa o del prof Nannipieri Pietro.
Appunti correlati Invia appunti e guadagna

Domande e risposte

Hai bisogno di aiuto?
Chiedi alla community