3-8编码器 3-8编码器
发布时间
阅读量:
阅读量
//3-8线译码器
module cy4(input[2:0] E,//输入端口声明
input[2:0] A,//输入端口声明
output reg[7:0]Y//输出端口声明
);
always @(A,E)
if(E == 3'b111)
begin
case(A)
3'b000: Y <= 8'b1111_1110;
3'b001: Y <= 8'b1111_1101;
3'b010: Y <= 8'b1111_1011;
3'b011: Y <= 8'b1111_0111;
3'b100: Y <= 8'b1110_1111;
3'b101: Y <= 8'b1101_1111;
3'b110: Y <= 8'b1011_1111;
3'b111: Y <= 8'b0111_1111;
default: Y <= 8'b1111_1111;
endcase
end
else;
endmodule
全部评论 (0)
还没有任何评论哟~
