summaryrefslogtreecommitdiff
path: root/part_2/ex9/add3_ge5.v
blob: 282dcac426ebd65f26fee8bbf8c77a2203d235ab (plain)
1
2
3
4
5
6
7
8
9
10
11
module add3_ge5 (in,out);

	input [3:0] in;
	output reg [3:0] out;
	
	always @ (in)
		if (in >= 4'd5)
			out <= in + 4'd3;
		else
			out <= in;
endmodule