Altera_Forum
Honored Contributor
15 years agoI failed to realize double times frequency by using code!
I want to use code to realize double frequency by using code, However I failed.
------------------------------------------ the following is the code. LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; ENTITY DOUBLE_FREQ IS PORT(CLK: IN STD_LOGIC; CLK_OUT: OUT STD_LOGIC ); END ENTITY DOUBLE_FREQ; ARCHITECTURE ART OF DOUBLE_FREQ IS SIGNAL TEMP1: STD_LOGIC; SIGNAL TEMP2: STD_LOGIC; SIGNAL TEMP3: STD_LOGIC; SIGNAL TEMP4: STD_LOGIC; BEGIN TEMP1 <= NOT CLK; TEMP2 <= NOT TEMP1; TEMP3 <= NOT TEMP2; TEMP4 <= NOT TEMP3; CLK_OUT <= CLK XOR TEMP4; END ARCHITECTURE ART; I used some logic gate delay chains , But I can't realize the function. can you tell me where is the problem? thanks!