| 
 | 
 
我是新手,那位大侠能帮我解决一下,下边的程序为什么总是出现“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; |   
 
 
 
 |