View
235
Download
0
Category
Preview:
Citation preview
LAB 2LAB 2Laboratorio de Sistemas DigitalesELO212Primer Semestre de 2012
Objetivos GeneralesObjetivos GeneralesUsar un osciloscopio de señal
mixta.Aplicar prueba estática y
dinámica.Medir tiempos de retardo.Diseñar un circuito digital usando
Verilog.
Agilent 54621DAgilent 54621D
Sincronización (1)Sincronización (1)
Sincronización (2)Sincronización (2)
FlipFlop JK (1)FlipFlop JK (1)
CLR’ J K Q(k+1) Q’(k+1)
0 x x 0 1
1 0 0 Q(k) Q’(k)
1 1 0 1 0
1 0 1 0 1
1 1 1 Q’(k) Q(k)
FlipFlop JK (2)FlipFlop JK (2)module flipflopJK(J, K, CLK, CLRn, Q, Qn);input J, K, CLK, CLRn; output Q, Qn;
reg Q, Qn;
always @(negedge CLRn or negedge CLK)begin if (!CLRn) begin Q <= 0; Qn <= 1; end else case ({J,K}) 1: begin Q <= 0; Qn <= 1; end
... default: begin Q <= Q; Qn <= Qn; end
endcase end
endmodule
Contador (1) Contador (1)
CLK
CLR
QA
QB
QC
QD
Contador (2)Contador (2)
Contador M bitContador M bitmodule counter(CLK, CLR, Q); parameter M = 3; input CLK, CLR; output reg [M-1:0] Q;
// fill in
endmodule
Circuito Detector de Cuentas Circuito Detector de Cuentas (1)(1)Diseñar un circuito combinacional
que, dado un contador de M bits, y parámetros X,Y con 0<X<Y<2M -1, ponga su salida en alto cada vez que se detecten las cuentas X o Y
Sintetizar para M = 4, X = 3 e Y = 12◦ Usar una CPLD XC9500 modelo xc95108
Circuito Detector de Cuentas Circuito Detector de Cuentas (2)(2)module CountDetector(q, s); parameter M = 4; parameter X = 3; parameter Y = 12;
input [M-1:0] q; output s;
// fill in!!
endmodule
Diagrama Funcional (1)Diagrama Funcional (1)Ecuaciones◦ S0 = (q3 & ~q2 & ~q1 & ~Ctrl) | (q1 & q2 & ~q3) ◦ s1 = q2 & q0 & ~Ctrl ◦ s2 = ~(q3 & ~q1)
Diagrama Funcional (2)Diagrama Funcional (2)
En el LaboratorioEn el Laboratorio Verificar (vía un simulador)
circuitos diseñados en la parte previa
Medir retardos de compuertas◦ FlipFlop JK◦ Inversor usando 7404
Implementar el circuito detector de cuentas
Usar ecuaciones REDUCIDAS!!!
Kit Disponible en Pañol Kit Disponible en Pañol ELOELO Elementos del kit◦ (2) 7400: quad-2-nand◦ (1) 7402: quad-2-nor◦ (2) 7404: six-inverter◦ (1) 7408: quad-2-and ◦ (1) 7432: quad-2-or◦ (1) 7473: 2 flip-flop JK◦ (2) 7486: quad-2-xor◦ (1) 74393: Dual 4-Stage Binary Counter.◦ (1) 7447 ó 7448: BCD-7seg decoder◦ (1) Protoboard
Recommended