国产精品免费无遮挡无码永久视频-国产高潮视频在线观看-精品久久国产字幕高潮-国产精品99精品无码视亚

電子工程網(wǎng)

標(biāo)題: 求助:程序出錯! [打印本頁]

作者: zhangjin1986    時間: 2012-9-14 11:17
標(biāo)題: 求助:程序出錯!
各位大俠,我編了個程序,按鍵按一下,輸入信號放大一倍,再按,再放大,一直到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(第九行為紅色的)
請各位大俠指點,謝謝!

作者: asyou    時間: 2012-9-14 16:18
看看語法嘛,你一個輸出連了多少個Process啊!你要用中間變量替換,再做選擇,或是在一個Process里做選擇!
作者: ty1932    時間: 2012-9-29 21:07
= =




歡迎光臨 電子工程網(wǎng) (http://www.4huy16.com/) Powered by Discuz! X3.4