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

Subversion Repositories npigrctrl

[/] [npigrctrl/] [tags/] [arelease/] [npi_vga_v1_00_b/] [hdl/] [vhdl/] [video_clk_gen_v4.vhd] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 slavek
----------------------------------------------------------------------
2
----                                                              ----
3
---- Vertical V4 clock generator                                  ----
4
----                                                              ----
5
---- Author(s):                                                   ----
6
---- - Slavek Valach, s.valach@dspfpga.com                        ----
7
----                                                              ----
8
----------------------------------------------------------------------
9
----                                                              ----
10
---- Copyright (C) 2008 Authors and OPENCORES.ORG                 ----
11
----                                                              ----
12
---- This source file may be used and distributed without         ----
13
---- restriction provided that this copyright statement is not    ----
14
---- removed from the file and that any derivative work contains  ----
15
---- the original copyright notice and the associated disclaimer. ----
16
----                                                              ----
17
---- This source file is free software; you can redistribute it   ----
18
---- and/or modify it under the terms of the GNU General          ----
19
---- Public License as published by the Free Software Foundation; ----
20
---- either version 2.0 of the License, or (at your option) any   ----
21
---- later version.                                               ----
22
----                                                              ----
23
---- This source is distributed in the hope that it will be       ----
24
---- useful, but WITHOUT ANY WARRANTY; without even the implied   ----
25
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ----
26
---- PURPOSE. See the GNU General Public License for more details.----
27
----                                                              ----
28
---- You should have received a copy of the GNU General           ----
29
---- Public License along with this source; if not, download it   ----
30
---- from http://www.gnu.org/licenses/gpl.txt                     ----
31
----                                                              ----
32
----------------------------------------------------------------------
33
 
34
library ieee;
35
use IEEE.STD_LOGIC_1164.ALL;
36
use IEEE.STD_LOGIC_ARITH.ALL;
37
use IEEE.STD_LOGIC_UNSIGNED.ALL;
38
library UNISIM;
39
use UNISIM.VCOMPONENTS.all;
40
 
41
-------------------------------------------------------------------------------
42
-- Entity section
43
-----------------------------------------------------------------------------
44
 
45
entity video_clk_gen_v4 is
46
Generic (
47
   POLARITY                : natural := 1);                       -- Define polarity of the output clock signal
48
port (
49
   CLK                     : in     std_logic;                    -- Input clock
50
   RST                     : in     std_logic;                    -- System reset
51
   CLK_OUT                 : out    std_logic);
52
end video_clk_gen_v4;
53
 
54
-----------------------------------------------------------------------------
55
-- Architecture section
56
-----------------------------------------------------------------------------
57
architecture implementation of video_clk_gen_v4 is
58
 
59
constant gnd            : std_logic := '0';
60
constant vcc            : std_logic := '1';
61
 
62
component ODDR
63
port (
64
   Q                    : out    std_logic;
65
   D1                   : in     std_logic;
66
   D2                   : in     std_logic;
67
   C                    : in     std_logic;
68
   CE                   : in     std_logic;
69
   R                    : in     std_logic;
70
   S                    : in     std_logic);
71
end component;
72
 
73
signal clk_n               : std_logic;
74
signal d0_i                : std_logic;
75
signal d1_i                : std_logic;
76
 
77
BEGIN
78
 
79
clk_n <= Not clk;
80
d0_i <= '1' When POLARITY = 1 Else '0';
81
d1_i <= '0' When POLARITY = 1 Else '1';
82
 
83
GEN_PIXEL_CLK : ODDR
84
port map (
85
   Q        => CLK_OUT,
86
   D1       => d0_i,
87
   D2       => d1_i,
88
   C        => clk,
89
   CE       => vcc,
90
   R        => gnd,
91
   S        => gnd);
92
 
93
end implementation;

powered by: WebSVN 2.1.0

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