顶层文件出警告信息的模块的程序如下: LIBRARY IEEE; USE ieee.std_logic_1164.all; USE ieee.std_logic_unsigned.all; ENTITY counter_32 is
PORT(
gate: in std_logic;
clr :in std_logic;
fx: IN
STD_LOGIC;
countqut std_logic_vector(31 downto 0)
);
ENTITY counter_32 is
PORT(
gate: in std_logic;
clr :in std_logic;
fx: IN
STD_LOGIC;
countqut std_logic_vector(31 downto 0)
); end counter_32; architecture a of
counter_32 is signal fxcou : std_logic_vector(31 downto 0); begin process(fx,clr) begin if (fx'event and fx='1') then
if clr='1' then
fxcou<="00000000000000000000000000000000";
else
if gate='1' then fxcou<=fxcou+1;
end if;
end if; end if; end process; countq<=fxcou; end a ;
[此贴子已经被作者于2008-7-16 19:43:49编辑过] |