集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
查看: 2340|回复: 2

process clocking is too complex

[复制链接]
peak.lu 发表于 2011-12-27 16:39:22 | 显示全部楼层 |阅读模式
我是新手,那位大侠能帮我解决一下,下边的程序为什么总是出现“process clocking is too complex”?

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity SWITCH_STATE is
port(       
                clk_1khz :                                        in std_logic;
                clk_8hz :                                        in std_logic;
                Reset :                                                in std_logic;
                start_sw :                                        in std_logic;
                cut_sw :                                                in std_logic;
                arm_sw:                                                in std_logic;
                capture_sw :                                in std_logic;
                start_o :                                        inout std_logic;
                cut_o :                                                inout std_logic;
                arm_o :                                                inout std_logic;
                capture_o :                                        inout std_logic);


end SWITCH_STATE;

architecture logic of SWITCH_STATE is

                signal count :                                integer range 0 to 31;
                signal sw_hit :                        std_logic;
                signal start_valid :                std_logic;
                signal cut_valid :                std_logic;
                signal capture_valid :                std_logic;
                signal arm_valid :                std_logic;


BEGIN

Key_lockout: process (reset)
begin
-- reset all outputs to initial values
        if Reset = '0' then
                start_valid <= '0';
                cut_valid <= '0';
                arm_valid <= '0';
                capture_valid <= '0';
-- end reset
        elsif rising_edge(clk_1khz) then
                count <= count + 1;
                if (cut_valid = '0') and
                        (cut_sw = '1') and
                        (start_sw = '0') and
                        (arm_sw = '0') and
                        (capture_sw = '0')
                        then
                        cut_valid <= '1';
                end if;
                if cut_sw = '0' then
                        cut_valid <= '0';
                end if;

                if (start_valid = '0') and
                        (start_sw = '1') and
                        (cut_sw = '0') and
                        (arm_sw = '0') and
                        (capture_sw = '0')
                        then
                        start_valid <= '1';
                end if;
                if start_sw = '0' then
                        start_valid <= '0';
                end if;

                if (arm_valid = '0') and
                        (arm_sw = '1') and
                        (start_sw = '0') and
                        (cut_sw = '0') and
                        (capture_sw = '0')
                        then
                        arm_valid <= '1';
                end if;
                if arm_sw <= '0' then
                        arm_valid <= '0';
                end if;

                if (capture_valid = '0') and
                        (start_sw = '0') and
                        (cut_sw = '0') and
                        (arm_sw = '0') and
                        (capture_sw = '1')
                         then
                        capture_valid <= '1';
                end if;
                if capture_sw = '0' then
                        capture_valid <= '0';
                end if;
        end if;

end process key_lockout;


key_debounce: process (clk_1khz)
begin
        if reset = '0' then
                start_o <= '0';
                cut_o <= '0';
                arm_o <= '0';
                capture_o <= '0';
        elsif rising_edge(clk_1khz) then
                if count = 0 then
                        start_o <= start_valid;
                        cut_o <= cut_valid;
                        arm_o <= arm_valid;
                        capture_o <= capture_valid;
                end if;
        end if;
end process key_debounce;
End logic;
fpgaw 发表于 2011-12-27 19:00:59 | 显示全部楼层
这么长 ……
白开水的噩梦 发表于 2011-12-29 19:54:45 | 显示全部楼层
表示讨厌VHDL
您需要登录后才可以回帖 登录 | 我要注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

QQ|小黑屋|手机版|Archiver|fpga论坛|fpga设计论坛 ( 京ICP备20003123号-1 )

GMT+8, 2025-7-16 17:12 , Processed in 0.070649 second(s), 24 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表