下面是四选一数据选择器的部分代码,补全代码正确的是( )。always@(*)begin if (s==2'b00) y=p0; else if (s==2'b01) y=p1; else if (s==2'b10) y=p2; else y=p3;end
选项:
A:module mux4_1 (p3,p2,p1,p0,s,y);input p3,p2,p1,p0;input[1:0] s;output y;... ...endmodule
B:module mux4_1 (p3,p2,p1,p0,s,y);input p3,p2,p1,p0;input[1:0] s;output y;reg y;... ...endmodule
C:module mux4_1 ( input p3,p2,p1,p0; input[1:0] s; output reg y;)... ...endmodule
D:module mux4_1 ( input p3,p2,p1,p0; input[1:0] s; output y )... ...endmodule
发布时间:2024-06-22 23:36:42