Verilog Module: Roll No.: (Full) : A05 Registration: 11109867 Name: PRINCE SHARMA
Verilog Module: Roll No.: (Full) : A05 Registration: 11109867 Name: PRINCE SHARMA
:( Full): a05
Registration: 11109867
verilog module
module allgates(a,b,and1,or1,not1,not2,nand1,nor1,xor1,xnor1); input a,b; output and1,or1,not1,not2,nand1,nor1,xor1,xnor1; assign and1=a&b; assign or1=a|b; assign not1=~(a); assign not2=~(b); assign nand1=~(a&b); assign nor1=~(a|b); assign xor1=(a^b); assign xnor1=~(a^b); endmodule
reg a; reg b; // Outputs wire and1; wire or1; wire not1; wire not2; wire nand1; wire nor1; wire xor1; wire xnor1; // Instantiate the Unit Under Test (UUT) allgates uut ( .a(a), .b(b), .and1(and1), .or1(or1), .not1(not1), .not2(not2), .nand1(nand1), .nor1(nor1),
.xor1(xor1), .xnor1(xnor1) ); initial begin // Initialize Inputs a=0;b=0; #5 a=0;b=1; #5 a=1;b=0; #5 a=1;b=1; // Wait 100 ns for global reset to finish #5 $stop;
output