|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
--The IEEE standard 1164 package, declares std_logic, rising_edge(), etc.
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
entity delay300 is
generic(size : integer := 8);
port (
clk: in STD_LOGIC;
q: buffer STD_LOGIC_VECTOR((size - 1) DOWNTO 0);
ctrl300: out STD_LOGIC
);
end delay300;
architecture delay300_arch of delay300 is
begin
process(clk)
begin
if (clk'event and clk = '1') then
q <= q + 1;
else
q <= q;
end if;
end process;
ctrl300 <= '1' when q = "11111111"
else '0';--***
end delay300_arch;
这个程序就是为了延时,但是在综合时:***处有错,q depends on a non-edge |
|