library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity fenpinqi is port(clk :in std_logic; y :buffer std_logic); end fenpinqi; architecture behav of fenpinqi is begin process(clk) variable count: integer range 0 to 25000000; begin if (clk='1'and clk'event)then count:=count+1; if (count=12500000) then y<='1'; elsif (count=25000000) then y<='0'; count:=0; end if; end if; end process; end behav; |