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

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [lib/] [techmap/] [axcelerator/] [clkgen_axcelerator.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
------------------------------------------------------------------------------
2
--  This file is a part of the GRLIB VHDL IP LIBRARY
3
--  Copyright (C) 2003, Gaisler Research
4
--
5
--  This program is free software; you can redistribute it and/or modify
6
--  it under the terms of the GNU General Public License as published by
7
--  the Free Software Foundation; either version 2 of the License, or
8
--  (at your option) any later version.
9
--
10
--  This program is distributed in the hope that it will be useful,
11
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
--  GNU General Public License for more details.
14
--
15
--  You should have received a copy of the GNU General Public License
16
--  along with this program; if not, write to the Free Software
17
--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
18
-----------------------------------------------------------------------------
19
-- Entity:      clkgen_actel
20
-- File:        clkgen_actel.vhd
21
-- Author:      Jiri Gaisler Gaisler Research
22
-- Description: Clock generator for Actel fpga
23
-----------------------------------------------------------------------------
24
 
25
library ieee;
26
use ieee.std_logic_1164.all;
27
-- pragma translate_off
28
library grlib;
29
use grlib.stdlib.all;
30
library axcelerator;
31
-- pragma translate_on
32
library techmap;
33
use techmap.gencomp.all;
34
 
35
entity clkgen_axcelerator is
36
  generic (
37
    clk_mul  : integer := 1;
38
    clk_div  : integer := 1;
39
    sdramen  : integer := 0;
40
    sdinvclk : integer := 0;
41
    pcien    : integer := 0;
42
    pcidll   : integer := 0;
43
    pcisysclk: integer := 0);
44
  port (
45
    clkin   : in  std_ulogic;
46
    pciclkin: in  std_ulogic;
47
    clk     : out std_ulogic;                   -- main clock
48
    clkn    : out std_ulogic;                   -- inverted main clock
49
    sdclk   : out std_ulogic;                   -- SDRAM clock
50
    pciclk  : out std_ulogic;                   -- PCI clock
51
    cgi     : in clkgen_in_type;
52
    cgo     : out clkgen_out_type);
53
end;
54
 
55
architecture struct of clkgen_axcelerator is
56
  component hclkbuf
57
  port( pad : in  std_logic; y   : out std_logic); end component;
58
  component hclkbuf_pci
59
  port( pad : in  std_logic; y   : out std_logic); end component;
60
signal clkint, pciclkint : std_ulogic;
61
begin
62
 
63
  c0 : if (PCIEN = 0) or (PCISYSCLK=0) generate
64
    u0 : hclkbuf port map (pad => clkin, y => clkint);
65
    clk <= clkint;
66
    clkn <= not clkint;
67
  end generate;
68
 
69
  c2 : if PCIEN/=0 generate
70
    c1 : if PCISYSCLK=1 generate
71
      clk <= pciclkint;
72
      clkn <= not pciclkint;
73
    end generate;
74
    u0 : hclkbuf_pci port map (pad => pciclkin, y => pciclkint);
75
    pciclk <= pciclkint;
76
  end generate;
77
 
78
  cgo.pcilock <= '1';
79
  cgo.clklock <= '1';
80
  sdclk <= '0';
81
 
82
-- pragma translate_off
83
  bootmsg : report_version
84
  generic map (
85
    "clkgen_axcelerator" & ": using HCLKBUF as clock buffer");
86
-- pragma translate_on
87
end;
88
 

powered by: WebSVN 2.1.0

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