查看: 4196|回复: 2

[提问] 求助:程序出错!

[复制链接]
发表于 2012-9-14 11:17:40 | 显示全部楼层 |阅读模式
关键词: multiply , driven
各位大侠,我编了个程序,按键按一下,输入信号放大一倍,再按,再放大,一直到64倍。按另外一个按键,输出信号变零。
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
Entity bp is
   port(xh:in bit;
        s1:in std_logic;
        s2:in std_logic;
        
scut bit_vector(6 downto 0));
End bp;
Architecture bianping of bp is
  Signal cnt:integer range 0 to 5;
  Signal data: integer range 0 to 5;
  begin
    yi:process(xh,s1)
      begin
        if(s1'event and s1='0') then
          if(cnt=5) then cnt<=0;
          else cnt<=cnt+1;
          end if;
         end if;
      end process;
     er:process(cnt)
        begin
        case cnt is
        when 1=>sc(1 downto 0)<=xh&'0';data<=1;
        when 2=>sc(2 downto 0)<=xh&'0'&'0';data<=2;
        when 3=>sc(3 downto 0)<=xh&'0'&'0'&'0';data<=3;
        when 4=>sc(4 downto 0)<=xh&'0'&'0'&'0'&'0';data<=4;
        when 0=>sc(6 downto 0)<=xh&'0'&'0'&'0'&'0'&'0'&'0';data<=0;
        when others=>NULL;
        end case;
       end process;
      san:process(s2,data)
         begin
          if(s2'event and s2='0') then
            case data is
            when 1=>sc(1 downto 0)<="00";
            when 2=>sc(2 downto 0)<="000";
            when 3=>sc(3 downto 0)<="0000";
            when 4=>sc(4 downto 0)<="00000";
            when 0=>sc(6 downto 0)<="0000000";
            when others=>NULL;
            end case;
          end if;   
     end process;
end bianping;

编译,出错。
Errorine 9:File f:\bb\bp.vhd:Unsupported feature error:unresolved signal is multiply driven(第九行为红色的)
请各位大侠指点,谢谢!
发表于 2012-9-14 16:18:13 | 显示全部楼层
看看语法嘛,你一个输出连了多少个Process啊!你要用中间变量替换,再做选择,或是在一个Process里做选择!
发表于 2012-9-29 21:07:03 | 显示全部楼层
= =
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关于我们  -  服务条款  -  使用指南  -  站点地图  -  友情链接  -  联系我们
电子工程网 © 版权所有   京ICP备16069177号 | 京公网安备11010502021702
快速回复 返回顶部 返回列表