OpenCores
URL https://opencores.org/ocsvn/z80soc/z80soc/trunk

Subversion Repositories z80soc

[/] [z80soc/] [branches/] [RonivonCosta/] [DE1/] [rtl/] [VHDL/] [clock_357mhz.vhd] - Blame information for rev 41

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 11 rrred
-- 3.57 Mhz clock from a 50 Mhz input
2
-- Ronivon C. costa
3
-- 03/2008
4
------------------------------------------------------------------
5
library IEEE;
6
use  IEEE.STD_LOGIC_1164.all;
7
use  IEEE.STD_LOGIC_ARITH.all;
8
use  IEEE.STD_LOGIC_UNSIGNED.all;
9
 
10
ENTITY Clock_357Mhz IS
11
        PORT (
12
                clock_50Mhz                             : IN    STD_LOGIC;
13
                clock_357Mhz                    : OUT   STD_LOGIC);
14
        END Clock_357Mhz;
15
 
16
ARCHITECTURE rtl OF Clock_357Mhz IS
17
 
18
        SIGNAL counter: STD_LOGIC_VECTOR(3 DOWNTO 0);
19
        SIGNAL clock_357Mhz_int : STD_LOGIC;
20
 
21
BEGIN
22
 
23
        PROCESS (clock_50Mhz)
24
        BEGIN
25
                IF clock_50Mhz'EVENT and clock_50Mhz = '1' THEN
26
                        IF counter < "1110" THEN
27
                                counter <= counter + 1;
28
                        ELSE
29
                                counter <= "0000";
30
                                clock_357Mhz_int <= not clock_357Mhz_int;
31
                        END IF;
32
                END IF;
33
 
34
        clock_357Mhz <= clock_357Mhz_int;
35
 
36
        END PROCESS;
37
END rtl;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.