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/] [unisim/] [buffer_unisim.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:      clkbuf_xilinx
20
-- File:        clkbuf_xilinx.vhd
21
-- Author:      Marko Isomaki, Jiri GAisler - Gaisler Research
22
-- Description: Clock buffer generator for Xilinx devices
23
------------------------------------------------------------------------------
24
library ieee;
25
use ieee.std_logic_1164.all;
26
-- pragma translate_off
27
library unisim;
28
use unisim.BUFGMUX;
29
use unisim.BUFG;
30
use unisim.BUFGDLL;
31
-- pragma translate_on
32
 
33
entity clkbuf_xilinx is
34
  generic(
35
    buftype :  integer range 0 to 3 := 0);
36
  port(
37
    i       :  in  std_ulogic;
38
    o       :  out std_ulogic
39
  );
40
end entity;
41
 
42
architecture rtl of clkbuf_xilinx is
43
  component BUFGDLL port (O : out std_logic; I : in std_logic); end component;
44
  component BUFGMUX port (O : out std_logic; I0, I1, S : in std_logic); end component;
45
  component BUFG port (O : out std_logic; I : in std_logic); end component;
46
  signal gnd  : std_ulogic;
47
  signal x  : std_ulogic;
48
  attribute syn_noclockbuf : boolean;
49
  attribute syn_noclockbuf of x : signal is true;
50
begin
51
  gnd <= '0';
52
  buf0 : if (buftype = 0) or (buftype > 2) generate
53
    x <= i; o <= x;
54
  end generate;
55
  buf1 : if buftype = 1 generate
56
    buf : bufgmux port map(S => gnd, I0 => i, I1 => gnd, O => o);
57
  end generate;
58
  buf2 : if (buftype = 2) generate
59
    buf : bufg port map(I => i, O => o);
60
  end generate;
61
 
62
end architecture;
63
 
64
library ieee;
65
use ieee.std_logic_1164.all;
66
-- pragma translate_off
67
library unisim;
68
use unisim.BUFGMUX;
69
-- pragma translate_on
70
 
71
entity clkmux_xilinx is
72
  port(
73
    i0, i1  :  in  std_ulogic;
74
    sel     :  in  std_ulogic;
75
    o       :  out std_ulogic
76
  );
77
end entity;
78
 
79
architecture rtl of clkmux_xilinx is
80
  component BUFGMUX port (O : out std_logic; I0, I1, S : in std_logic); end component;
81
begin
82
  buf : bufgmux port map(S => sel, I0 => i0, I1 => i1, O => o);
83
end architecture;
84
 
85
 
86
 

powered by: WebSVN 2.1.0

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