色偷偷偷久久伊人大杳蕉,色爽交视频免费观看,欧美扒开腿做爽爽爽a片,欧美孕交alscan巨交xxx,日日碰狠狠躁久久躁蜜桃

x
x
查看: 3131|回復(fù): 3
打印 上一主題 下一主題

[提問] 程序錯誤,求助

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
發(fā)表于 2011-10-12 15:52:37 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
六十進(jìn)制計數(shù)器
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity counter_60 is
        port(clk,bcd1wr,bcd10wr,cin:in std_logic;
                 co: out std_logic;
                 datain: in std_logic_vector(3 downto 0);
                 bcd1: out std_logic_vector(3 downto 0);
                 bcd10: out std_logic_vector(2 downto 0));
end counter_60;

architecture rtl of counter_60 is
signal bcd1n:std_logic_vector(3 downto 0);
signal bcd10n:std_logic_vector(2 downto 0);
begin
        bcd1<=bcd1n;
        bcd10<=bcd10n;
        process(clk,bcd1wr,datain) is
        begin
                if(bcd1wr='1') then
                        bcd1n<=datain;
                elsif(clk'event and clk='1') then
                        if(cin='1') then
                                if(bcd1n=9) then
                                        bcd1n<="0000";
                                else
                                        bcd1n<=bcd1n+'1';
                                end if;
                        end if;
                end if;
        end process;
        
        process(clk,bcd10wr,datain) is
        begin
                if(bcd10wr='1') then
                        bcd10n<=datain(2 downto 0);
                elsif(clk'event and clk='1') then
                        if(cin='1' and bcd1n=9) then
                                if(bcd10n=5) then
                                        bcd10n<="000";
                                else
                                        bcd10n<=bcd10n+'1';
                                end if;
                        end if;
                end if;
        end process;
        
        process(bcd10n,bcd1n,cin) is
        begin
                if((cin='1') and (bcd1n=9) and (bcd10n=5)) then
                        co<='1';
                else
                        co<='0';
                end if;
        end process;
end rtl;
可以編譯,但是仿真不合適,仿真不計數(shù),請各位老師同仁指正,萬分感謝
沙發(fā)
發(fā)表于 2011-10-13 20:13:25 | 只看該作者
可能你這個程序應(yīng)該是沒有初始化初始值吧,
板凳
發(fā)表于 2011-10-19 14:01:56 | 只看該作者
請檢查你的程序邏輯是否有誤?
地板
發(fā)表于 2011-11-2 13:54:50 | 只看該作者
仿真時,輸入信號定義時要給初始值
您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

關(guān)于我們  -  服務(wù)條款  -  使用指南  -  站點地圖  -  友情鏈接  -  聯(lián)系我們
電子工程網(wǎng) © 版權(quán)所有   京ICP備16069177號 | 京公網(wǎng)安備11010502021702
快速回復(fù) 返回頂部 返回列表