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: genclkbuf
|
20 |
|
|
-- File: genclkbuf.vhd
|
21 |
|
|
-- Author: Jiri Gaisler, Marko Isomaki - Gaisler Research
|
22 |
|
|
-- Description: Hard buffers with tech wrapper
|
23 |
|
|
------------------------------------------------------------------------------
|
24 |
|
|
library ieee;
|
25 |
|
|
use ieee.std_logic_1164.all;
|
26 |
|
|
library techmap;
|
27 |
|
|
use techmap.gencomp.all;
|
28 |
|
|
|
29 |
|
|
entity techbuf is
|
30 |
|
|
generic(
|
31 |
|
|
buftype : integer range 0 to 4 := 0;
|
32 |
|
|
tech : integer range 0 to NTECH := inferred);
|
33 |
|
|
port( i : in std_ulogic; o : out std_ulogic);
|
34 |
|
|
end entity;
|
35 |
|
|
|
36 |
|
|
architecture rtl of techbuf is
|
37 |
|
|
component clkbuf_apa3 is generic( buftype : integer range 0 to 3 := 0);
|
38 |
|
|
port( i : in std_ulogic; o : out std_ulogic);
|
39 |
|
|
end component;
|
40 |
|
|
component clkbuf_actel is generic( buftype : integer range 0 to 3 := 0);
|
41 |
|
|
port( i : in std_ulogic; o : out std_ulogic);
|
42 |
|
|
end component;
|
43 |
|
|
component clkbuf_xilinx is generic( buftype : integer range 0 to 3 := 0);
|
44 |
|
|
port( i : in std_ulogic; o : out std_ulogic);
|
45 |
|
|
end component;
|
46 |
|
|
component clkbuf_ut025crh is generic( buftype : integer range 0 to 3 := 0);
|
47 |
|
|
port( i : in std_ulogic; o : out std_ulogic);
|
48 |
|
|
end component;
|
49 |
|
|
|
50 |
|
|
begin
|
51 |
|
|
gen : if has_techbuf(tech) = 0 generate
|
52 |
|
|
o <= i;
|
53 |
|
|
end generate;
|
54 |
|
|
pa3 : if (tech = apa3) generate
|
55 |
|
|
axc : clkbuf_apa3 generic map (buftype => buftype) port map(i => i, o => o);
|
56 |
|
|
end generate;
|
57 |
|
|
axc : if (tech = axcel) generate
|
58 |
|
|
axc : clkbuf_actel generic map (buftype => buftype) port map(i => i, o => o);
|
59 |
|
|
end generate;
|
60 |
|
|
xil : if (tech = virtex) or (tech = virtex2) or (tech = spartan3) or (tech = virtex4) or
|
61 |
|
|
(tech = spartan3e) or (tech = virtex5) generate
|
62 |
|
|
xil : clkbuf_xilinx generic map (buftype => buftype) port map(i => i, o => o);
|
63 |
|
|
end generate;
|
64 |
|
|
ut : if (tech = ut25) generate
|
65 |
|
|
axc : clkbuf_ut025crh generic map (buftype => buftype) port map(i => i, o => o);
|
66 |
|
|
end generate;
|
67 |
|
|
end architecture;
|