entity cnt16 is
port(clk:in std_logic;
dout:out std_logic_vector(3 downto 0);
dclk1:out std_logic);
end cnt16;
architecture Behavioral of cnt16 is
signal clk1:std_logic :='1';
signal q:integer range 0 to 24000000:=0;
signal w:std_logic_vector(3 downto 0):="0000";
begin
dclk1<=clk1; dout<=not w;
t1:process(clk)
begin
if clk'event and clk='1' then
if q=23999999 then
q<=0;clk1<=not clk1;
else
q<=q+1;
end if;
end if;
end process;
t2:process(clk1)
begin
if clk1'event and clk1='1' then
if w=9 then
w<="0000";
else
w<=w+1;
end if;
end if;
end process;
end Behavioral;
错误提示在if w=9 then
w<="0000";
else
w<=w+1;
can not have such operands in this context. 请问这是什么意思?应该怎么修改?
此帖出自
小平头技术问答
一周热门 更多>