拜托各位大侠告诉我下面这段程序该怎么改,一共有7个错误,用maxplus2编译,拜托了
libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;entitycnt10ispo...
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity cnt10 is
port(clk_in:in std_logic;k_or,k1,k2:out std_logic);
entity cnt10 is
process(clk,c1)
begin
signal m1,m2:std_logic;
signal c1,c2:std_logic_vector(2 downto 0);
if (c1="001") then m1<=not m1; elsif (c1="011") then m1<=not m1;
if (c1="100") then c1<="000"; else c1<=c1+1; end if;
if rising_enge(clk) then
begin
process(clk,c2)
end process;
end if;
end if;
if (c2="001") then m2<=not m2; elsif (c2="011") then m2<=not m2;
if (c2="100") then c2<="000"; else c2<=c2+1; end if;
if falling_enge(clk) then
begin
k1<=m1; k2<=m2,;k_or<=m1 or m2;
end process;
end if end if;
clk_out<='1';
end bhv; 展开
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity cnt10 is
port(clk_in:in std_logic;k_or,k1,k2:out std_logic);
entity cnt10 is
process(clk,c1)
begin
signal m1,m2:std_logic;
signal c1,c2:std_logic_vector(2 downto 0);
if (c1="001") then m1<=not m1; elsif (c1="011") then m1<=not m1;
if (c1="100") then c1<="000"; else c1<=c1+1; end if;
if rising_enge(clk) then
begin
process(clk,c2)
end process;
end if;
end if;
if (c2="001") then m2<=not m2; elsif (c2="011") then m2<=not m2;
if (c2="100") then c2<="000"; else c2<=c2+1; end if;
if falling_enge(clk) then
begin
k1<=m1; k2<=m2,;k_or<=m1 or m2;
end process;
end if end if;
clk_out<='1';
end bhv; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询