Upload
gourav
View
215
Download
0
Embed Size (px)
Citation preview
7/26/2019 xor or xnor
1/5
PROGRAM CODE
Main Program
module sxor(a,b,c);
output c;
input a,b;
assign c=a^b;
endmodule
Test Bench
module tb_sxor;
wire out;
reg a,b;
xor a1(out,a,b);
initial
begin
$monitor("time=%d,a=%b,b=%b,out=%b",$time,out,a,b);
end
initial
begin
# a=1!b;b=1!b;
# a=1!b;b=1!b1;
# a=1!b1;b=1!b;
# a=1!b1;b=1!b1;
end
endmodule
7/26/2019 xor or xnor
2/5
FINAL REPORT
GRAPH
RESULT
e &' ate designed in te erilog wor*s properl+ proed b+ wae ormdiagram- .t satisies te trut table o te &' ate-
7/26/2019 xor or xnor
3/5
PROGRAM CODE
Main Program
module sxnor(a,b,c);
output c;
input a,b;
assign c=/(a^b);
endmodule
Test Bench
module tb_sxnor;
wire out;
reg a,b;
xnor a1(out,a,b);
initial
begin
$monitor("time=%d,a=%b,b=%b,out=%b",$time,out,a,b);
end
initial
begin
# a=1!b;b=1!b;
# a=1!b;b=1!b1;
# a=1!b1;b=1!b;
# a=1!b1;b=1!b1;
end
endmodule
7/26/2019 xor or xnor
4/5
FINAL REPORT
GRAPH
RESULT
e 0&' ate designed in te erilog wor*s properl+ proed b+ wae orm
diagram- .t satisies te trut table o te 0&' ate-
7/26/2019 xor or xnor
5/5