相关代码 |
|
LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; entity clock IS port(clear:in std_logic; clk:out STD_LOGIC); end clock; architecture behave of clock is signal temp:std_logic; begin clk process(clear) begin if(clear='1')then temp elsif(temp temp else temp END IF; end process; end behave;