library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity deng is
port(niu:in std_logic_vector(1 to 5);
temp:out std_logic_vector(1 to 12);
w:out std_logic_vector(1 to 7);
cp:in std_logic);
end;
architecture one of deng is
signal z1:std_logic_vector(1 to 5);
signal z2:std_logic;
begin
process(niu)
begin
if niu(1)='1' then niu<="10000";
w<="0110000";
process(cp)
begin
if z1<13 then
temp(z1)<='1';
z1<=z1+1;
elsif z1>12 then
temp(z1-12)<='0';
z1<=z1+1;
elsif z1>24 then
z1<=0;
end if;
end process;
elsif niu(2)='1' then niu<="01000";
w<="1101101";
process(cp)
begin
if rising_edge(cp) then
z2<=not z2;
if z2='0' then
temp<="101010101010";
else
temp<="010101010101";
end if;
end if;
end process;
end if;
end process;
end;
VHDL语言求改错,功能是实现12个LED灯的2种闪烁方式
答案:2 悬赏:70
解决时间 2021-02-17 04:57
- 提问者网友:傀儡离开
- 2021-02-16 09:34
最佳答案
- 二级知识专家网友:丢不掉的轻狂
- 2021-02-16 10:57
你这里面要么是少了end if;要么是少了end process;,还有就是进程不能套进程,你这if语句里面还有进程!! 比如说process(cp)就在if和elsif之间,去掉
全部回答
- 1楼网友:闲懒诗人
- 2021-02-16 11:15
任务占坑
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯