This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
justhomework/Quartus/v2/jyh_4490_2_2.v

23 lines
359 B
Coq
Raw Normal View History

2022-03-29 15:03:53 +00:00
//译码器模块
module jyh_4490_2_2(out,in);
input[2:0] in;
2022-03-30 03:54:43 +00:00
output[6:0] out;
2022-03-29 15:03:53 +00:00
reg[7:0] out;
always @ (in)
begin
case (in)
2022-03-30 03:54:43 +00:00
3'd0: out<=7'b0000001;
3'd1: out<=7'b0000011;
3'd2: out<=7'b0000111;
3'd3: out<=7'b0001111;
3'd4: out<=7'b0011111;
3'd5: out<=7'b0111111;
2022-03-30 10:15:31 +00:00
3'd6: out<=7'b0000000;
2022-03-29 15:03:53 +00:00
default: out=7'bx;
endcase
end
endmodule