Escolar Documentos
Profissional Documentos
Cultura Documentos
Parcial 2
Parcial 2
A. Tabla de verdad
`timescale 1ns/100ps
module c_simple(
input a,
input b,
input c,
output m);
wire f;
wire g;
wire h;
wire i;
or (f,a,b);
nand(g,a,b);
and(i,f,g);
and(h,b,c);
or(m,i,h);
endmodule
Módulo de estimulo
// or browse Examples
`timescale 1ns/100ps
module test_c_simple();
reg a,b,c;
wire m;
c_simple simple1(a,b,c,m);
initial
begin
$dumpfile("out.vcd");
$dumpvars(1,test_c_simple);
#25;
end
endmodule
Primera línea
Segunda línea
Tercera línea
Cuarta línea
Quinta línea
Sexta línea
Séptima línea
Octava línea
Punto 2
1 línea
2 línea
3 línea
4 linea
5 linea
6 linea
7 linea
8 linea
9 linea
10 linea
11 linea
12 linea
13 linea
14 linea
15 linea
16 linea
Tabla de verdad y mapa k
Mapa k y circuito
Código modulo descriptivo
`timescale 1ns/10ps
module parcial_2(
input a,
input b,
input c,
input d,
output ns,
output eo);
wire e,f,g,h,i,j,k,l,m,n,o,p;
not n1(e,d);
not n2(f,c);
not n3(g,d);
not n4(h,c);
not n5(i,d);
not n6(j,d);
not n7(eo,ns);
and g1(k,e,a,b);
and g2(l,a,f,g);
and g3(m,b,h,i);
and g4(n,a,b,j);
or o1(o,k,l);
or o2(p,m,n);
or o3(ns,o,p);
endmodule
`timescale 1ns/10ps
module test_parcial_2();
reg a,b,c,d;
wire ns,eo;
parcial_2 prueba1(a,b,c,d,ns,eo);
initial
begin
$dumpfile("out.vcd");
$dumpvars(1,test_parcial_2);
#25;
end
endmodule