打印

请教一个VHDL仿真的问题

[复制链接]
1229|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
醉小清风|  楼主 | 2012-11-21 10:34 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
LIBRARY IEEE;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
Entity js Is   
Port (Clk,Rst,En: in std_logic;  
      cong,cons,conb,conq: buffer std_logic_vector(3 downto 0) );
End js;
Architecture COUNT of js Is
Begin
process(Rst,Clk)
begin
     if Rst = '1' then               
            cong<="0000";
             cons<="0000";
            conb<="0000";
            conq<="0000";              
     elsif rising_edge(Clk) then
            if En='1' then
                      cong<=cong;
                       cons<=cons;
                      conb<=conb;
                      conq<=conq;                              
elsif(cong="1001" and cons="1001" and conb="1001" and conq="1001" )then
                 cong<="0000";
                 cons<="0000";
                 conb<="0000";
                 conq<="0000";
            elsif cong="1001" then
               if cons="1001" then
               if conb="1001" then
                   cong<="0000";
               cons<="0000";
                 conb<="0000";
                 conq<=conq+1;                        
               else cong<="0000";
               cons<="0000";
               conb<=conb+1;               
                 end if;
               else cong<="0000";
                    cons<=cons+1;
                    end if;                                
            else cong<=cong+1;                  
            end if;
        end if;
   end process;
End COUNT;
上面是我参考然后自己改的一个千位的计数代码,综合什么的都没问题,就是仿真的时候结果里面千位全是0    没反应求大神帮忙解决下~~~

相关帖子

沙发
GoldSunMonkey| | 2012-11-21 21:02 | 只看该作者
有时钟么??

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

20

主题

70

帖子

0

粉丝