首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

各位大侠,帮我看看我错在哪里?

各位大侠,帮我看看我错在哪里?

帮忙看下这个记数器程序错在哪里了. 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; 谢谢各位了!
最后是否应该 end behavior;
我是天堂的使者,向我倾诉吧
少了个end if。不过有点看不懂hold干什么的?

[此贴子已经被fenglouto于2005-11-3 23:10:49编辑过]


大浪淘沙
留下的全是金子
找本语言书仔细看看吧
返回列表