segout.v
资源名称:8253.rar [点击查看]
上传用户:xuqufe
上传日期:2022-08-10
资源大小:2378k
文件大小:1k
源码类别:
VHDL/FPGA/Verilog
开发平台:
VHDL
- module segout(in,out);
- input [3:0] in;
- output [6:0] out;
- reg [6:0] out;
- always
- begin
- case (in)
- 0:begin out = 7'b1000000; end
- 1:begin out = 7'b1111001; end
- 2:begin out = 7'b0100100; end
- 3:begin out = 7'b0110000; end
- 4:begin out = 7'b0011001; end
- 5:begin out = 7'b0010010; end
- 6:begin out = 7'b0000010; end
- 7:begin out = 7'b1111000; end
- 8:begin out = 7'b0000000; end
- 9:begin out = 7'b0010000; end
- 10:begin out = 7'b0001000; end
- 11:begin out = 7'b0000011; end
- 12:begin out = 7'b1000110; end 13:begin out = 7'b0100001; end 14:begin out = 7'b0000110; end 15:begin out = 7'b0001110; end
- endcase
- end
- endmodule