21ic电子技术开发论坛
标题:
2-4线译码器
[打印本页]
作者:
gaochy1126
时间:
2022-12-29 21:59
标题:
2-4线译码器
//2-4线译码器
module cy4(input[1:0] A,//输入端口声明
input E,//输入端口声明
output reg[3:0]Y//输出端口声明
);
always @(A,E)
if(E == 1) Y <= 4'b1111;
else
begin
case(A)
2'b00: Y <= 4'b1110;
2'b01: Y <= 4'b1101;
2'b10: Y <= 4'b1011;
2'b11: Y <= 4'b0111;
endcase
end
endmodule
欢迎光临 21ic电子技术开发论坛 (https://bbs.21ic.com/)
Powered by Discuz! X3.5