Mt2015-eq2

Mt2015-eq2

Taken from 2015 midterm question 1k

Create a circuit that has two 2-bit inputs A[1:0] and B[1:0], and produces an output z. The value of z should be 1 if A = B, otherwise z should be 0.

solution

1
2
3
4
5
6
module top_module ( input [1:0] A, input [1:0] B, output z ); 
always @(*) begin
if (A == B) z=1;
else z=0;
end
endmodule

Mt2015-eq2
http://456-xiao.github.io/2024/09/07/Mt2015-eq2/
作者
xyh
发布于
2024年9月7日
许可协议