Frequency Doubler in VHDL with symmetric duty cycle

G

Gazelle

Good day gents,
I am wondering if VHDL (or Verilog) code exists in order to make a frequency doubler in a normal
CPLD (without internal DDL/DPL/PLL infrastructure ) with a symmetric duty cycle.
Below some code can be found which generates a by-2 multiplied frequency - however the duty cycle
is very assymmetrical ...

Many thanks for your input !

Regards,

Michel


-- Frequency Doubler using DFF
-- code in VHDL

library ieee;
use ieee.std_logic_1164.all;

entity F2 is
port (fi : in std_logic; -- Input signal fi
fo : out std_logic); -- fo = 2*fi
end F2;


architecture behav of F2 is
signal clk : std_logic;
signal q : std_logic;
signal notq : std_logic;


begin
process (clk) begin
if (clk 'event and clk = '1') then
q <= notq;
end if;
end process;

notq <= not q ;
clk <= (notq xnor fi) ;
fo <= clk;

end behav;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

2 JK Circuit in VHDL 0
Array VHDL 3
pls help me ; vhdl; 0
racing condition in vhdl 0
code vhdl 1
Problem With Mealy Sequence Detector 1
erreur VHDL 3
Problem with frequency divider 3

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top