Professional Documents
Culture Documents
4bit Alu
4bit Alu
2).Test bench:-
module jyoti2_v;
// Inputs
reg [3:0]a;
reg [3:0]b;
reg [4:0] s;
// Outputs
wire y;
// Instantiate the Unit Under Test (UUT)
mona1 uut (
.a(a),
.b(b),
.s(s),
.y(y)
);
initial begin
// Initialize Inputs
#5 a=4'b0110; b=4'b1010;
s=5'b0;
begin
#5 repeat(32)
#5 s=s+1;
end
#5 $stop;
// Wait 100 ns for global reset to finish
#100;
// Add stimulus here
end
endmodule