library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity cnt is
port(clk,sign:in std_logic;
q7:buffer std_logic;
q: buffer std_logic_vector(6 downto 0));
end cnt;
architecture behav of cnt is
begin
process
begin
q<="0000000";
q7<='0';
wait until sign'event and sign='0';
if clk'event and clk='0'then
if sign='0'then
q<=q+1;
q7<='0';
if sign='1'then
q<=q+1;
q7<='1';
end if;
end if;
end if;
end process;
end behav;
编译时错误Error: Can't synthesize current design -- Top partition does not contain any logic