Sei sulla pagina 1di 12

Progettare un circuito sequenziale con un ingresso e due uscite z1 e z0.

Si consideri la sequenza s costituita


dagli ultimi tre bit di x. L’uscita z1 deve essere uguale a 1 se s considerato come valore in Ca2
(complemento a 2), è un valore negativo dispari, mentre z0 deve essere 1 se s, considerato come valore in
base 2, è un multiplo di 3. Si considerino anche eventuali sovrapposizioni.
Esempio x 0101100111
z1 0001000001
z0 0000110010

Esempio b:

La parte in rosso è importante perche ci dice che


possiamo fare come vogliamo, possiamo fare
come l’esempio a senno c’è anche un metodo
piu semplice considerando i primi due bit come
don’t care (prossima pag)

Progettare un circuito sequenziale con un ingresso e due uscite z1 e z0. Si consideri la sequenza s costituita
dagli ultimi tre bit di x. L’uscita z1 deve essere uguale a 1 se s considerato come valore in Ca2
(complemento a 2), è un valore negativo dispari, mentre z0 deve essere 1 se s, considerato come valore in
base 2, è un multiplo di 3. Si considerino anche eventuali sovrapposizioni. Si trascurino gli stati
iniziali/si ignorino i primi 2 output.
Esempi x 0101100111
z1 --01000001
z0 --00110010
minuto 1:00:00

Esempio c:

Progettare
un circuito

sequenziale con un ingresso e due uscite z1 e z0. Si consideri la


sequenza s costituita dagli ultimi tre bit di x. L’uscita z1 deve essere uguale a 1 se s considerato come valore
in Ca2 (complemento a 2), è un valore negativo dispari, mentre z0 deve essere 1 se s, considerato come
valore in base 2, è un multiplo di 3. Non si considerino le eventuali sovrapposizioni.

Esempio x 0101100111 Non si considerano I bit gia usati, si aspettano i


numeri in input: Coccocco con sovrapposizione
z1 0001000000
z0 0000000010 c’è due volte, senza una volta sola

MOLTO
IMPORTANTE
SAPER FARE QUESTI ESEMPI, non questo
affianco, in generale l’esempio.

PROCEDURA PER LA PROGETTAZIONE DI UNA FSM:


1. Identificare input e output
2. Disegnare diagramma transizione degli stati
3. Scrivere tabella transizione
4. Selezionare la codifica degli stati
5. For Moore machine:
1. Rewrite state transition table with con lo state encoding
2. Write output table
5. For a Mealy machine:
Rewrite combined state transition and output table with state encodings
6. Write Boolean equations( e minimizzarle con k map) for next state and output logic
7. Sketch the circuit schematic

Deriving an FSM from a schematic:

Deriving the state transition diagram from a schematic follows nearly the reverse process of FSM design.

1. Examine circuit, stating inputs, outputs, and state bits.


2. Write next state and output equations.
3. Create next state and output tables.
4. Reduce the next state table to eliminate irragiungibili states.
5. Assign each valid state bit combination a name.
6. Rewrite next state and output tables with state names.
7. Draw state transition diagram.
8. State in words what the FSM does. (all’esame non viene chiesto)

Es:
Alyssa P. Hacker arrives home, but her keypad lock has been rewired and her old code no longer works. A
piece of paper is taped to it showing the circuit diagram in Figure 3.35.
Alyssa thinks the circuit could be a finite state machine and decidesto
derive the state transition diagram to see if it helps her get in the door.

Alyssa can see that the finite state machine unlocks the door only
after detecting an input value, A[1:0], of three followed by an input
value of one. The door is then locked again. Alyssa tries this code
on the door key pad and the door opens!
Esercizio di analisi FSM preso da esami passati:

1 ingresso (x) e una uscita (z) = macchina di mealy

PSD15

TIMING:

 Flip-flop samples D at clock edge (campiona sul fronte di clock)


 D must be stable when sampled (d fermo quando campiono)
 Similar to a photograph, D must be stable around clock edge
 If not, metastability can occur (quando d cambia mentre campiono si dice metastabilità)
INPUT TIMING CONSTRAINTS:
questi tempi servono per stabilire per quanto tempo questo ff deve essere stabile
 Setup time: tsetup = time before clock edge data must be stable (i.e. not changing)
 Hold time: thold = time after clock edge data must be stable
 Aperture time: ta = time around clock edge data must be stable (ta = tsetup + thold)

OUTPUT TIMING CONSTRAINTS( I tpd tcd dipendono solo dal clk, invece nella logica combinatoria dagli
ingressi):

 Propagation delay: tpcq = time after clock edge that the output Q is guaranteed to be stable (i.e., to
stop changing)
 Contamination delay: tccq = time after clock edge that Q might be unstable (i.e., start changing)

DISCIPLINA DINAMICA:

 Synchronous sequential circuit inputs must be stable during aperture (setup and hold) time around
clock edge (dobbiamo garantirci che gli input siano stabili per il tempo di apertura)
 Specifically, inputs must be stable
o at least tsetup before the clock edge
 at least until thold after the clock edge
SETUP TIME CONSTRAINT:

HOLD TIME CONSTRAINT:


TIME ANALYSIS:

CLOCK SKEW:
La

temporalizzazione puo essere applicata alla macchina a stati (FSM):

Per aumentare le capacita di calcolo del nostro sistema usiamo:


Dividendo il lavoro si ottiene il doppio dell’efficienza.
Concetto molto semplice
15+40*3+60 = 200 ps che sono :

formula della frequenza -> f = 1 / T, quindi f*T = 1 , quindi bisogna trovare quel valore per il
quale esca 1: 0,005 * 200 = 1 o 1000 o ecc , qundi -> 200 ps ovvero il periodo * f = 1

Unita di misura:

milli = 10^-3

micro = 10^-6

nano = 10^-9

pico = 10^-12

quindi è 200*10^-12 = 200 / 10^12 oppure 200 *5 fa 1000 mi devo levare 3 ordini di grandezza
quindi viene 1 GHz. Quindi la frequenza massima è 5 GHz.

La latenza è quella minima, qunid 1, il throughput è quante operazioni faccio in tempo: 5 miliardi di colpi di
clock al seconod, quindi fa 5 Gops/s

Si aggiungno dei flip flop:

per calcolare la frequenza bisogna calcolare il periodo critico massimo,


bisogna fare 15 + 40 *2+ 65 = 160 ps, ora bisogna calcolare la frequenza
di funzionamento che sarebbe 6,25 GHz. Il Throughput è 6,25 miliardi di
operazioni al secondo. La latenza è 2, perche si è aggiunto un pezzettino

1:14

Potrebbero piacerti anche