xor_2.v
`timescale 1ns / 1ps
//
// Company:
// Engineer:
//
// Create Date: 17:06:13 05/05/2017
// Design Name:
// Module Name: xor_2
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//
module xor_2(y,a,b
);
output y;
input a;
input b;
assign y=a&b;
endmodule
//
// Company:
// Engineer:
//
// Create Date: 17:06:13 05/05/2017
// Design Name:
// Module Name: xor_2
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//
module xor_2(y,a,b
);
output y;
input a;
input b;
assign y=a&b;
endmodule
testxor.v
`timescale 1ns / 1ps
// Company:
// Engineer:
//
// Create Date: 17:12:34 05/05/2017
// Design Name: xor_2
// Module Name: D:/ise147/prj/xor_2/testxor.v
// Project Name: xor_2
// Target Device:
// Tool versions:
// Description:
//
// Verilog Test Fixture created by ISE for module: xor_2
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
module testxor;
// Inputs
reg a;
reg b;
// Outputs
wire y;
// Instantiate the Unit Under Test (UUT)
xor_2 uut (
.y(y),
.a(a),
.b(b)
);
initial begin
// Initialize Inputs
a = 0;
b = 0;
// Wait 100 ns for global reset to finish
#1;
{a,b} = 2'b00;
#10 {a,b}=2'b01;
#10 {a,b}=2'b10;
#10 {a,b}=2'b11;
#10 $stop;
// Add stimulus here
end
endmodule
// Company:
// Engineer:
//
// Create Date: 17:12:34 05/05/2017
// Design Name: xor_2
// Module Name: D:/ise147/prj/xor_2/testxor.v
// Project Name: xor_2
// Target Device:
// Tool versions:
// Description:
//
// Verilog Test Fixture created by ISE for module: xor_2
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
module testxor;
// Inputs
reg a;
reg b;
// Outputs
wire y;
// Instantiate the Unit Under Test (UUT)
xor_2 uut (
.y(y),
.a(a),
.b(b)
);
initial begin
// Initialize Inputs
a = 0;
b = 0;
// Wait 100 ns for global reset to finish
#1;
{a,b} = 2'b00;
#10 {a,b}=2'b01;
#10 {a,b}=2'b10;
#10 {a,b}=2'b11;
#10 $stop;
// Add stimulus here
end
endmodule