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/] [maps/] [odpad.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:      odpad
20
-- File:        odpad.vhd
21
-- Author:      Jiri Gaisler - Gaisler Research
22
-- Description: tri-state output pad with technology wrapper
23
------------------------------------------------------------------------------
24
 
25
library techmap;
26
library ieee;
27
use ieee.std_logic_1164.all;
28
use techmap.gencomp.all;
29
use techmap.allpads.all;
30
 
31
entity odpad is
32
  generic (tech : integer := 0; level : integer := 0; slew : integer := 0;
33
           voltage : integer := x33v; strength : integer := 12;
34
           oepol : integer := 0);
35
  port (pad : out std_ulogic; i : in std_ulogic);
36
end;
37
 
38
architecture rtl of odpad is
39
signal gnd, oen, padx : std_ulogic;
40
begin
41
  oen <= not i when oepol /= padoen_polarity(tech) else i;
42
  gnd <= '0';
43
  gen0 : if has_pads(tech) = 0 generate
44
    pad <= gnd after 2 ns when oen = '0'
45
-- pragma translate_off
46
           else 'X' after 2 ns when is_x(i)
47
-- pragma translate_on
48
           else 'Z' after 2 ns;
49
  end generate;
50
  xcv : if (tech = virtex) or (tech = virtex2) or (tech = spartan3) or
51
        (tech = virtex4) or (tech = spartan3e) or (tech = virtex5)
52
  generate
53
    x0 : virtex_toutpad generic map (level, slew, voltage, strength)
54
         port map (pad, gnd, oen);
55
  end generate;
56
  axc : if (tech = axcel) or (tech = proasic) or (tech = apa3) generate
57
    x0 : axcel_toutpad generic map (level, slew, voltage, strength)
58
         port map (pad, gnd, oen);
59
  end generate;
60
  atc : if (tech = atc18s) generate
61
    x0 : atc18_toutpad generic map (level, slew, voltage, strength)
62
         port map (pad, gnd, oen);
63
  end generate;
64
  atcrh : if (tech = atc18rha) generate
65
    x0 : atc18rha_toutpad generic map (level, slew, voltage, strength)
66
         port map (pad, gnd, oen);
67
  end generate;
68
  um : if (tech = umc) generate
69
    x0 : umc_toutpad generic map (level, slew, voltage, strength)
70
         port map (pad, gnd, oen);
71
  end generate;
72
  rhu : if (tech = rhumc) generate
73
    x0 : rhumc_toutpad generic map (level, slew, voltage, strength)
74
         port map (pad, gnd, oen);
75
  end generate;
76
  ihp : if (tech = ihp25) generate
77
    x0 : ihp25_toutpad generic map(level, slew, voltage, strength)
78
         port map (pad, gnd, oen);
79
  end generate;
80
  rh18t : if (tech = rhlib18t) generate
81
    x0 : rh_lib18t_iopad generic map (strength)
82
         port map (padx, gnd, oen, open);
83
    pad <= padx;
84
  end generate;
85
  ut025 : if (tech = ut25) generate
86
    x0 : ut025crh_iopad generic map (strength)
87
         port map (padx, gnd, oen, open);
88
    pad <= padx;
89
  end generate;
90
  pere  : if (tech = peregrine) generate
91
    x0 : peregrine_iopad generic map (strength)
92
         port map (padx, gnd, oen, open);
93
    pad <= padx;
94
  end generate;
95
  nex : if (tech = easic90) generate
96
    x0 : nextreme_toutpad generic map (level, slew, voltage, strength)
97
         port map (pad, gnd, oen);
98
  end generate;
99
 
100
end;
101
 
102
library techmap;
103
library ieee;
104
use ieee.std_logic_1164.all;
105
use techmap.gencomp.all;
106
 
107
entity odpadv is
108
  generic (tech : integer := 0; level : integer := 0; slew : integer := 0;
109
        voltage : integer := 0; strength : integer := 0; width : integer := 1;
110
        oepol : integer := 0);
111
  port (
112
    pad : out std_logic_vector(width-1 downto 0);
113
    i   : in  std_logic_vector(width-1 downto 0));
114
end;
115
architecture rtl of odpadv is
116
begin
117
  v : for j in width-1 downto 0 generate
118
    x0 : odpad generic map (tech, level, slew, voltage, strength, oepol)
119
         port map (pad(j), i(j));
120
  end generate;
121
end;

powered by: WebSVN 2.1.0

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