library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity testctl is
port ( clkk: in std_logic;
cnt_en,rst_cnt,load: out std_logic);
end testctl;
architecture Behavioral of testctl is
signal div2clk:std_logic;
begin
process(clkk)
begin
if clkk'event and clkk='1' then div2clk<=not div2clk;
end if;
end process;
process(clkk,div2clk)
begin
if clkk='0' and div2clk='0' then rst_cnt<='1';
else rst_cnt<='0';
end if;
end process;
load<= not div2clk; cnt_en<=div2clk;
end Behavioral;
编译没有错误,但是仿真没结果,
好象是 “div2clk”在里面没起作用。
本人新手。 大虾帮忙看下,谢谢