音影先锋亚洲天堂网|电影世界尽头的爱完整版播放|国产 熟女 91|高清无码免费观看欧美日韩|韩国一区二区三区黄色录像|美女亚洲加勒比在线|亚洲综合网 开心五月|7x成人在线入口|成人网站免费日韩毛片区|国产黄片?一级?二级?三级

登錄 免費(fèi)注冊(cè) 首頁(yè) | 行業(yè)黑名單 | 幫助
維庫(kù)電子市場(chǎng)網(wǎng)
技術(shù)交流 | 電路欣賞 | 工控天地 | 數(shù)字廣電 | 通信技術(shù) | 電源技術(shù) | 測(cè)控之家 | EMC技術(shù) | ARM技術(shù) | EDA技術(shù) | PCB技術(shù) | 嵌入式系統(tǒng)
驅(qū)動(dòng)編程 | 集成電路 | 器件替換 | 模擬技術(shù) | 新手園地 | 單 片 機(jī) | DSP技術(shù) | MCU技術(shù) | IC 設(shè)計(jì) | IC 產(chǎn)業(yè) | CAN-bus/DeviceNe

請(qǐng)求高手看看下面程序有什么問(wèn)題?非常感謝

作者:liuzsfly 欄目:通信技術(shù)
請(qǐng)求高手看看下面程序有什么問(wèn)題?非常感謝
使用的CPLD是XC95216-10,功能仿真和時(shí)序仿真都沒(méi)有問(wèn)題,但是實(shí)際下載以后,電路出現(xiàn)不穩(wěn)定現(xiàn)象,VHDL高手能不能幫我優(yōu)化一下程序,謝謝了!



library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity GeneratePluse is
PORT
(
clkin: in std_logic; -- 10M clock
PULSE: in std_logic; -- PULSE in 1K;
reset: in std_logic;
PULSEout1: out std_logic;     -- 10us PULSE-width
PULSEout1r: out std_logic;
PULSEout2: out std_logic;     -- 20us PULSE-width
PULSEout2r: out std_logic;
PULSEout3: out std_logic;     -- 10.8us PULSE-width
PULSEout3r: out std_logic
);
end GeneratePluse;

architecture Behavioral of GeneratePluse is

signal cf:      std_logic;
signal counter_a: std_logic_vector(13 downto 0);
signal counter_b: std_logic_vector(13 downto 0);
signal counter_c: std_logic_vector(13 downto 0);

begin

PROCESS(reset,PULSE)
begin
    if reset = '0' then
        cf <= '0';
    elsif falling_edge(PULSE) then
        cf <= not cf;
    end if;
end PROCESS;

PROCESS(clkin,cf)
begin
    if rising_edge(clkin) then
        if cf='1' then
            counter_a <= counter_a + 1;
            counter_b <= (others => '0');
        else
            counter_b <= counter_b + 1;
            counter_a <= (others => '0');
        end if;
    end if;
end PROCESS;

PROCESS(PULSE)
begin
    if rising_edge(PULSE)  then
        if cf='1' then
            counter_c <= counter_a;
        else
            counter_c <= counter_b;
        end if;
    end if;
end PROCESS;

PROCESS(clkin)
begin
    if falling_edge(clkin) then
        PULSEout1 <= PULSE;
        PULSEout1r <= not PULSE;
    end if;
end PROCESS;

PROCESS(clkin,cf,counter_a,counter_b)
begin
if falling_edge(clkin) then
    if cf='1' then
        if counter_a > counter_c - 100 then
        
                 PULSEout2 <= '1';
                PULSEout2r<= '0';
            
         else
                PULSEout2 <= '0';
                PULSEout2r<= '1';    
        end if;
        else
        if counter_b > counter_c - 100 then
              
                PULSEout2 <= '1';
                PULSEout2r<= '0';
             
         else
                PULSEout2 <= '0';
                PULSEout2r<= '1';    
        end if;
    end if;                
  end if;
end PROCESS;

PROCESS(clkin,cf,counter_a,counter_b)
begin
    if falling_edge(clkin) then
        if cf='1' then
            if counter_a <5 or counter_a > counter_c - 3 then
                PULSEout3 <= '1';
                PULSEout3r<= '0';
            else
                PULSEout3 <= '0';
                PULSEout3r<= '1';    
            end if;
        else
            if counter_b < 5 or counter_b > counter_c - 3 then
                PULSEout3 <= '1';
                PULSEout3r<= '0';
            else
                PULSEout3 <= '0';
                PULSEout3r<= '1';    
            end if;                
        end if;
    end if;
end PROCESS;
end Behavioral;

參與討論
昵稱:
討論內(nèi)容:
 
 
相關(guān)帖子
『求助』小本畢業(yè)設(shè)計(jì)——無(wú)線語(yǔ)音多路系統(tǒng)
音頻壓縮
各位高手,請(qǐng)救命啊,在線等待,一定要幫忙啊
請(qǐng)教GR47模塊的AT指令
這個(gè)人485電路正確否,我要排版了.
免費(fèi)注冊(cè)為維庫(kù)電子開(kāi)發(fā)網(wǎng)會(huì)員,參與電子工程師社區(qū)討論,點(diǎn)此進(jìn)入


Copyright © 1998-2006 m.58mhw.cn 浙ICP證030469號(hào)