yuyang911220 当前离线
论坛元老
module compare3 ( Y ,A ,B ); input [3:0] A ; input [3:0] B ; output [2:0] Y ; reg [2:0] Y ; always @ ( A or B ) begin if ( A > B ) Y <= 3'b001; else if ( A == B) Y <= 3'b010; else Y <= 3'b100; end endmodule
订阅 TOP