| 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: iopad
|
| 20 |
|
|
-- File: iopad.vhd
|
| 21 |
|
|
-- Author: Jiri Gaisler - Gaisler Research
|
| 22 |
|
|
-- Description: io 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 iopad 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 : inout std_ulogic; i, en : in std_ulogic; o : out std_ulogic);
|
| 36 |
|
|
end;
|
| 37 |
|
|
|
| 38 |
|
|
architecture rtl of iopad is
|
| 39 |
|
|
signal oen : std_ulogic;
|
| 40 |
|
|
begin
|
| 41 |
|
|
oen <= not en when oepol /= padoen_polarity(tech) else en;
|
| 42 |
|
|
gen0 : if has_pads(tech) = 0 generate
|
| 43 |
|
|
pad <= i after 2 ns when oen = '0'
|
| 44 |
|
|
-- pragma translate_off
|
| 45 |
|
|
else 'X' after 2 ns when is_x(oen)
|
| 46 |
|
|
-- pragma translate_on
|
| 47 |
|
|
else 'Z' after 2 ns;
|
| 48 |
|
|
o <= to_X01(pad) after 1 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_iopad generic map (level, slew, voltage, strength)
|
| 54 |
|
|
port map (pad, i, oen, o);
|
| 55 |
|
|
end generate;
|
| 56 |
|
|
axc : if (tech = axcel) or (tech = proasic) or (tech = apa3) generate
|
| 57 |
|
|
x0 : axcel_iopad generic map (level, slew, voltage, strength)
|
| 58 |
|
|
port map (pad, i, oen, o);
|
| 59 |
|
|
end generate;
|
| 60 |
|
|
atc : if (tech = atc18s) generate
|
| 61 |
|
|
x0 : atc18_iopad generic map (level, slew, voltage, strength)
|
| 62 |
|
|
port map (pad, i, oen, o);
|
| 63 |
|
|
end generate;
|
| 64 |
|
|
atcrh : if (tech = atc18rha) generate
|
| 65 |
|
|
x0 : atc18rha_iopad generic map (level, slew, voltage, strength)
|
| 66 |
|
|
port map (pad, i, oen, o);
|
| 67 |
|
|
end generate;
|
| 68 |
|
|
um : if (tech = umc) generate
|
| 69 |
|
|
x0 : umc_iopad generic map (level, slew, voltage, strength)
|
| 70 |
|
|
port map (pad, i, oen, o);
|
| 71 |
|
|
end generate;
|
| 72 |
|
|
rhu : if (tech = rhumc) generate
|
| 73 |
|
|
x0 : rhumc_iopad generic map (level, slew, voltage, strength)
|
| 74 |
|
|
port map (pad, i, oen, o);
|
| 75 |
|
|
end generate;
|
| 76 |
|
|
ihp : if (tech = ihp25) generate
|
| 77 |
|
|
x0 : ihp25_iopad generic map (level, slew, voltage, strength)
|
| 78 |
|
|
port map (pad, i, oen, o);
|
| 79 |
|
|
end generate;
|
| 80 |
|
|
ihprh : if (tech = ihp25rh) generate
|
| 81 |
|
|
x0 : ihp25rh_iopad generic map (level, slew, voltage, strength)
|
| 82 |
|
|
port map (pad, i, oen, o);
|
| 83 |
|
|
end generate;
|
| 84 |
|
|
rh18t : if (tech = rhlib18t) generate
|
| 85 |
|
|
x0 : rh_lib18t_iopad generic map (strength)
|
| 86 |
|
|
port map (pad, i, oen, o);
|
| 87 |
|
|
end generate;
|
| 88 |
|
|
ut025 : if (tech = ut25) generate
|
| 89 |
|
|
x0 : ut025crh_iopad generic map (level, slew, voltage, strength)
|
| 90 |
|
|
port map (pad, i, oen, o);
|
| 91 |
|
|
end generate;
|
| 92 |
|
|
pere : if (tech = peregrine) generate
|
| 93 |
|
|
x0 : peregrine_iopad generic map (level, slew, voltage, strength)
|
| 94 |
|
|
port map(pad, i, oen, o);
|
| 95 |
|
|
end generate;
|
| 96 |
|
|
nex : if (tech = easic90) generate
|
| 97 |
|
|
x0 : nextreme_iopad generic map (level, slew, voltage, strength)
|
| 98 |
|
|
port map (pad, i, oen, o);
|
| 99 |
|
|
end generate;
|
| 100 |
|
|
end;
|
| 101 |
|
|
|
| 102 |
|
|
library techmap;
|
| 103 |
|
|
library ieee;
|
| 104 |
|
|
use ieee.std_logic_1164.all;
|
| 105 |
|
|
use techmap.gencomp.all;
|
| 106 |
|
|
|
| 107 |
|
|
entity iopadv is
|
| 108 |
|
|
generic (tech : integer := 0; level : integer := 0; slew : integer := 0;
|
| 109 |
|
|
voltage : integer := x33v; strength : integer := 12; width : integer := 1;
|
| 110 |
|
|
oepol : integer := 0);
|
| 111 |
|
|
port (
|
| 112 |
|
|
pad : inout std_logic_vector(width-1 downto 0);
|
| 113 |
|
|
i : in std_logic_vector(width-1 downto 0);
|
| 114 |
|
|
en : in std_ulogic;
|
| 115 |
|
|
o : out std_logic_vector(width-1 downto 0));
|
| 116 |
|
|
end;
|
| 117 |
|
|
architecture rtl of iopadv is
|
| 118 |
|
|
begin
|
| 119 |
|
|
v : for j in width-1 downto 0 generate
|
| 120 |
|
|
x0 : iopad generic map (tech, level, slew, voltage, strength, oepol)
|
| 121 |
|
|
port map (pad(j), i(j), en, o(j));
|
| 122 |
|
|
end generate;
|
| 123 |
|
|
end;
|
| 124 |
|
|
|
| 125 |
|
|
library techmap;
|
| 126 |
|
|
library ieee;
|
| 127 |
|
|
use ieee.std_logic_1164.all;
|
| 128 |
|
|
use techmap.gencomp.all;
|
| 129 |
|
|
|
| 130 |
|
|
entity iopadvv is
|
| 131 |
|
|
generic (tech : integer := 0; level : integer := 0; slew : integer := 0;
|
| 132 |
|
|
voltage : integer := x33v; strength : integer := 12; width : integer := 1;
|
| 133 |
|
|
oepol : integer := 0);
|
| 134 |
|
|
port (
|
| 135 |
|
|
pad : inout std_logic_vector(width-1 downto 0);
|
| 136 |
|
|
i : in std_logic_vector(width-1 downto 0);
|
| 137 |
|
|
en : in std_logic_vector(width-1 downto 0);
|
| 138 |
|
|
o : out std_logic_vector(width-1 downto 0));
|
| 139 |
|
|
end;
|
| 140 |
|
|
architecture rtl of iopadvv is
|
| 141 |
|
|
begin
|
| 142 |
|
|
v : for j in width-1 downto 0 generate
|
| 143 |
|
|
x0 : iopad generic map (tech, level, slew, voltage, strength, oepol)
|
| 144 |
|
|
port map (pad(j), i(j), en(j), o(j));
|
| 145 |
|
|
end generate;
|
| 146 |
|
|
end;
|