第1个回答 2013-01-18
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity fenpin is
port(clk: in std_logic;
clkout: out std_logic);
end;
architecture one of fenpin is
signal m: std_logic;
begin
process(clk)
variable q: integer range 500000 downto 0;
begin
if clk'event and clk='1' then q:=q+1;
if q=499999 then q:=0;m<=not m;
end if;
end if;
end process;
clkout<=m;
end;本回答被提问者采纳