集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
查看: 1076|回复: 0

急急急 求高手解答

[复制链接]
liwc1991 发表于 2011-4-28 09:30:28 | 显示全部楼层 |阅读模式
我将process(a) 改成process(a,b) 在波形图里设置了b恒为0,为什么波形图会发生如此大的变化。b不变不是没影响吗?求解答啊 这个困扰了我2天的问题 以下为源程序,没改之前波形相当正常

Library IEEE;
Use IEEE.STD_LOGIC_1164.ALL;

entity shouhj is
port
(
  -- Input ports
  a,b         : in  std_logic;

  -- Output ports
  x,y,z       : out std_logic

);
end shouhj;


architecture arch of shouhj is
    TYPE all_state IS(s0,s1,s2,s3,s4);
    SIGNAL state:all_state;
-- Declarations (optional)

begin
    p1ROCESS(a)
    BEGIN
       IF (  a='1' ) THEN
           CASE state IS
              WHEN s0=> state<=s1;
              WHEN s1=> state<=s2;
              WHEN s2=> state<=s3;
              WHEN s3=> state<=s4;
              WHEN s4=> state<=s0;
              WHEN OTHERS=> NULL;
           end case;
         
       end if;

       end process p1;
     
     p2ROCESS(state)
    begin
      
           CASE state IS
              WHEN s0=> x<='0';y<='0';z<='0';
              WHEN s1=> x<='1';y<='1';z<='0';
              WHEN s2=> x<='1';y<='0';z<='0';
              WHEN s3=> x<='1';y<='1';z<='0';
              WHEN s4=> x<='1';y<='1';z<='1';
              WHEN OTHERS=> NULL;
           end case;               
    end process p2;
   
end arch;
您需要登录后才可以回帖 登录 | 我要注册

本版积分规则

关闭

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

QQ|小黑屋|手机版|Archiver|fpga论坛|fpga设计论坛 ( 京ICP备20003123号-1 )

GMT+8, 2025-6-23 02:11 , Processed in 0.105061 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表