<var id="fnfpo"><source id="fnfpo"></source></var>
<rp id="fnfpo"></rp>

<em id="fnfpo"><object id="fnfpo"><input id="fnfpo"></input></object></em>
<em id="fnfpo"><acronym id="fnfpo"></acronym></em>
  • <th id="fnfpo"><track id="fnfpo"></track></th>
  • <progress id="fnfpo"><track id="fnfpo"></track></progress>
  • <tbody id="fnfpo"><pre id="fnfpo"></pre></tbody>

  • x
    x
    查看: 4579|回復: 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
    快速回復 返回頂部 返回列表
    精品一区二区三区自拍图片区_国产成人亚洲精品_亚洲Va欧美va国产综合888_久久亚洲国产精品五月天婷