Professional Documents
Culture Documents
1 PROCESADOR: ESPECIFICACIONES
Llus Ters
Instituto de Microelectrnica de Barcelona, IMB-CNM (CSIC)
Universitat Autnoma de Barcelona (UAB)
1.Especificacindedossistemasdigitales
P1.1
CONTROLDETEMPERATURA(leccin 1.1):
loop
if temp<pos half_degree thenonoff :=on;
elsif temp>pos +half_degree thenonoff :=off;
endif;
waitfor10s;
endloop;
P1.1
CRONMETRO(leccin 1.1)
loop
if reset=ONthentime:=0;
elsif start=ONthen
whilestop=OFFloop
if ref_positive_edge =TRUEthentime:=update(time);
endif;
endloop;
endif;
endloop;
P1.1
Acada uno deellos =>SISTEMADIGITAL(leccin 1.1):
Controlador detemperatura:
Cronmetro:
2.Estrategiasdediseo
P1.1
P1.1
loop
iftemp<pos half_degree thenonoff :=on;
elsif temp>pos +half_degree thenonoff :=off;
end if;
waitfor10s;
end loop;
loop
ifreset=ONthentime:=0;
elsif start=ONthen
whilestop=OFFloop
ifref_positive_edge =TRUEthen
time:=update(time);
endif;
endloop;
endif;
endloop;
P1.1
loop
iftemp<pos half_degree thenonoff :=on;
elsif temp>pos +half_degree thenonoff :=off;
end if;
waitfor10s;
end loop;
loop
ifreset=ONthentime:=0;
elsif start=ONthen
whilestop=OFFloop
ifref_positive_edge =TRUEthen
time:=update(time);
endif;
endloop;
endif;
endloop;
P1.1
loop
iftemp<pos half_degree thenonoff :=on;
elsif temp>pos +half_degree thenonoff :=off;
end if;
waitfor10s;
end loop;
loop
ifreset=ONthentime:=0;
elsif start=ONthen
whilestop=OFFloop
ifref_positive_edge =TRUEthen
time:=update(time);
endif;
endloop;
endif;
endloop;
onoff :=on(writeonoff);
whilestop=OFF(readstop);
time:=update(time)(writetime);
P1.1
loop
iftemp<pos half_degree thenonoff :=on;
elsif temp>pos +half_degree thenonoff :=off;
end if;
waitfor10s;
end loop;
loop
ifreset=ONthentime:=0;
elsif start=ONthen
whilestop=OFFloop
ifref_positive_edge =TRUEthen
time:=update(time);
endif;
endloop;
endif;
endloop;
9
P1.1
Puertos deentrada(IN0,IN1,IN2,),
Puertos desalida,OUT1,OUT2,),
Elementos dememoria capaces dealmacenar datos (X0,X1,X2,),
Recursos decmputo que permitan realizar clculos (+,,),
Xi :=A (A constante);
Xi :=INj;
OUTi :=Xj;
OUTi :=A (A constante);
Xi :=f(Xj,Xk)(f =>unrecurso decmputo);
goto n,donde n es unnmero deinstruccin;
if condicion goto n,donde n es unnmero deinstruccin.
10
RESUMEN
P1.1
Sistemagenrico:
Capaz deimplementar cualquier
algoritmo
11
P1.1
12
P1.2
1.Controladordetemperatura
P1.2
loop
iftemp<pos thenonoff :=on;
elsif temp>pos thenonoff :=off;
end if;
waitfor10s;
end loop;
14
Tipos deinstruccin:
P1.2
Xi :=A;
Xi :=INj;
OUTi :=Xj;
OUTi :=A;
Xi :=Xj +Xk;
Xi :=Xj Xk;
goto n;
if Xi <0goto n;
if Xi >0goto n;
15
P1.2
16
loop
iftemp<pos thenonoff :=on;
elsif temp>pos thenonoff :=off;
end if;
waitfor10s;
end loop;
P1.2
17
loop
iftemp<pos thenonoff :=on;
elsif temp>pos thenonoff :=off;
end if;
waitfor10s;
end loop;
P1.2
18
P1.2
0:X5:=10;
1:X0:=IN0;
2:X1:=IN1;
3:X4:=X0 X1;
4:ifX4<0thengoto7;
5:ifX4>0thengoto9;
6:goto10;
7:OUT0:=1;
8:goto10;
9:OUT0:=0;
10:X3:=IN2;
11:X2:=IN2;
12:X4:=X2 X3;
13:X4:=X4 X5;
14:ifX4<0thengoto11;
15:goto1;
19
2.Cronmetro
P1.2
loop
ifreset=ONthentime:=0;
elsif start=ONthen
whilestop=OFFloop
ifref_positive_edge =TRUEthen
time:=update(time);
endif;
endloop;
endif;
endloop;
20
P1.2
Cuatro elementos dememoria paraalmecenar losdatos:
X0:reset,start,stop, refo computationresult
(ledo por IN0,IN1,IN2,IN3ogenerado internamente)
X1:initialref (ledo por IN3)
X2:time(generado internamente)
X3:constant1 (generado internamente)
21
P1.2
loop
ifreset=ONthentime:=0;
elsif start=ONthen
whilestop=OFFloop
ifref_positive_edge =TRUEthen
time:=update(time);
endif;
endloop;
endif;
endloop;
Tiempo de
ejecucin de
cada
instruccin
<<Tref =0.1s
22
P1.2
loop
ifreset=ONthentime:=0;
elsif start=ONthen
whilestop=OFFloop
ifref_positive_edge =TRUEthen
time:=update(time);
endif;
endloop;
endif;
endloop;
Tiempo de
ejecucin de
cada
instruccin
<<Tref =0.1s
23
P1.2
(Ejercicio)
cc
i: instruccin;
i+1: instrucin siguiente;
i: if a_condition goto j;
i+1: an_instruction;
j: another_instruction;
Tipos deinstruccin
Xi :=A;
Xi :=INj;
OUTi :=Xj;
OUTi :=A;
Xi :=Xj +Xk;
Xi :=Xj Xk;
goto n;
if Xi <0goto n;
if Xi >0goto n;
i-1: an instruction
i: go to j;
j: another_instruction;
24
(Solucin)
0:X3:=1:
1:X0 :=IN0;
2:ifX0>0thengoto6;
3:X0 :=IN1;
4:ifX0>0thengoto9;
5:goto1;
6:X2 :=0;
7:OUT0:=X2;
8:goto1;
9:X0;=IN2;
10:ifX0>0thengoto1;
11:X1:=IN3;
12:X0:=IN3;
13:X0:=X0 X1;
14:ifX0>0thengoto16;
15:goto9;
16:X2:=X2+X3;
17:OUT0:=X2;
18:goto9;
P1.2
25
RESUMEN
P1.2
26