|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
编译不过!!急!!
library ieee;
use ieee.std_logic.1164.all;
use ieee.std_logic_unsigned.all;
entity counter3mod is
port(en,reset,clk:in std_logic;
q ut integer range 0 to 2);
end counter3mod;
architecture a of counter3mod is
signal temp:integer range 0 to 2;
begin
process(en,reset,clk)
begin
if reset='1' then
temp<="00";
else
if (clk='1')and(clk'event) then
if en='1' then
if temp="10" then
temp<="00";
else
temp<=temp+1;
else
temp<=temp;
end if;
end if;
end if;
end if;
end process;
q<=temp;
end a;
|
|