在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 2255|回复: 3

[求助] 大家帮我看看这个100进制计数器VHDL的设计有没有问题

[复制链接]
发表于 2013-11-15 20:17:04 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity cnt100 is
   port(clk:in std_logic;           q ut std_logic_vector(7 downto 0);
           c: out std_logic);
end cnt100;
architecture one of cnt100 is
signal qa:std_logic_vector(3 downto 0);
signal qb:std_logic_vector(3 downto 0);
signal cin:std_logic;
begin
   q(3 downto 0)<=qa;

q(7 downto 4)<=qb;
   process(clk)

begin

   if clk'event and clk='1' then

   if qa=9 then qa<="0000";cin<='1';

else qa<=qa+1;cin<='0';

end if;

end if;

end process;

process(clk,cin)

begin

     if clk'event and clk='1' then

     if (qb=9 and qa=9) then qb<="0000";c<='1';

  else c<='0';

  end if;

  if cin='1' then qb<=qb+1;

  end if;

end if;

end process;
end one;
发表于 2013-11-16 22:50:48 | 显示全部楼层
仿真一下就可以的
发表于 2014-3-31 10:51:28 | 显示全部楼层
路过,不懂
发表于 2014-4-4 23:05:06 | 显示全部楼层
通过波形仿真,分分钟就可以得出结果
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

X

小黑屋| 手机版| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-6-21 17:39 , Processed in 0.016835 second(s), 9 queries , Gzip On, MemCached On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表