Altera_Forum
Honored Contributor
14 years agodivide the internal clock
Hello
I'm trying to divide the intern oscillator to obtain a frequency around 1Khz.
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.numeric_std.all;
LIBRARY work;
entity ClockGene is
port (
osc : in std_logic;
clk : out std_logic
);
end entity;
architecture arc of ClockGene is
signal count : unsigned (12 downto 0);
begin
--count <= (others => '0'); impossible to synthetize
--count <= "0000000000000";
process (osc)
begin
if rising_edge (osc) then
count <= count + 1;
clk <= count(11);
end if;
end process;
end arc;
But I can't simulate. error deleting "msim_transcript": permission denied