帮忙看下这个记数器程序错在哪里了.
library ieee;
use ieee.std_logic_1164.all;
entity counter is
port
(clock:in std_logic;
reset:in std_logic;
hold:in std_logic;
countnum:buffer integer range 0 to 59
);
end;
architecture behavior of counter is
begin
process(reset,clock)
begin
if reset='1' then
countnum<=0;
else
if rising_edge(clock)then
if hold='1' then
countnum<=countnum;
else
if countnum=59 then
countnum<=0;
else
countnum<=countnum+1;
end if;
end if;
end if;
end process;
end;
谢谢各位了!作者: boyfly 时间: 2005-11-3 18:11
最后是否应该 end behavior;作者: fenglouto 时间: 2005-11-3 23:10