结尾少了 一行
end rtl;
第二问
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity fp40 is
port(clk: in std_logic;
fpclk: out std_logic);
end fp40;
architecture arc of fp40 is
begin
process(clk)
variable count: integer range 0 to 1000000;
variable clk0: std_logic;
begin
if clk'event and clk='1' then
if count=”1000000“then
clk0:=not clk0;
count:=0;
else
count:=count+1;
end if;
end if;
fpclk<=clk0;
end process;
end arc;
end process没加分号,想把10Mhz变成10hz,先设一个变量,例如counter,
variable counter:integer range 0 to 999;