在下面横线上填上合适的语句,完成BCD-7段LED显示译码器的设计。 LIBRARY IEEE ; USE IEEE.STD_LOGIC_1164.ALL; ENTITY BCD_7SEG IS PORT( BCD_LED : IN STD_LOGIC_VECTOR(3 DOWNTO 0); LEDSEG : OUT STD_LOGIC_VECTOR(6 DOWNTO 0)); END BCD_7SEG; ARCHITECTURE BEHAVIOR OF BCD_7SEG IS BEGIN PROCESS(BCD_LED) 1 IF BCD_LED="0000" THEN LEDSEG<="0111111"; ELSIF BCD_LED="0001" THEN LEDSEG<="0000110"; ELSIF BCD_LED="0010" THEN LEDSEG<=“1011011”; ELSIF BCD_LED="0011" THEN LEDSEG<="1001111"; ELSIF BCD_LED="0100" THEN LEDSEG<="1100110"; ELSIF BCD_LED="0101" THEN LEDSEG<="1101101"; ELSIF BCD_LED="0110" THEN LEDSEG<="1111101"; ELSIF BCD_LED="0111" THEN LEDSEG<="0000111"; ELSIF BCD_LED="1000" THEN LEDSEG<="1111111"; ELSIF BCD_LED="1001" THEN LEDSEG<="1101111"; ELSE LEDSEG<= 2 ; END IF; END PROCESS; END BEHAVIOR;
时间: 2024-02-14 09:12:32 浏览: 115
实验五 7段数码显示译码器设计.docx
填空部分应该是:
1. BEGIN
2. ELSE LEDSEG<="1111110";
3. END IF;
完整代码如下:
```
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY BCD_7SEG IS
PORT(
BCD_LED : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
LEDSEG : OUT STD_LOGIC_VECTOR(6 DOWNTO 0)
);
END BCD_7SEG;
ARCHITECTURE BEHAVIOR OF BCD_7SEG IS
BEGIN
PROCESS (BCD_LED)
BEGIN
IF BCD_LED = "0000" THEN
LEDSEG <= "0111111";
ELSIF BCD_LED = "0001" THEN
LEDSEG <= "0000110";
ELSIF BCD_LED = "0010" THEN
LEDSEG <= "1011011";
ELSIF BCD_LED = "0011" THEN
LEDSEG <= "1001111";
ELSIF BCD_LED = "0100" THEN
LEDSEG <= "1100110";
ELSIF BCD_LED = "0101" THEN
LEDSEG <= "1101101";
ELSIF BCD_LED = "0110" THEN
LEDSEG <= "1111101";
ELSIF BCD_LED = "0111" THEN
LEDSEG <= "0000111";
ELSIF BCD_LED = "1000" THEN
LEDSEG <= "1111111";
ELSIF BCD_LED = "1001" THEN
LEDSEG <= "1101111";
ELSE
LEDSEG <= "1111110";
END IF;
END PROCESS;
END BEHAVIOR;
```
阅读全文