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 |
|
|
-- Package: pad_actel_gen
|
20 |
|
|
-- File: pad_actel_gen.vhd
|
21 |
|
|
-- Author: Jiri Gaisler - Gaisler Research
|
22 |
|
|
-- Description: Actel pads wrappers
|
23 |
|
|
------------------------------------------------------------------------------
|
24 |
|
|
|
25 |
|
|
-- pragma translate_off
|
26 |
|
|
library axcelerator;
|
27 |
|
|
use axcelerator.inbuf;
|
28 |
|
|
use axcelerator.inbuf_pci;
|
29 |
|
|
-- pragma translate_on
|
30 |
|
|
library ieee;
|
31 |
|
|
use ieee.std_logic_1164.all;
|
32 |
|
|
library techmap;
|
33 |
|
|
use techmap.gencomp.all;
|
34 |
|
|
|
35 |
|
|
entity axcel_inpad is
|
36 |
|
|
generic (level : integer := 0; voltage : integer := 0);
|
37 |
|
|
port (pad : in std_ulogic; o : out std_ulogic);
|
38 |
|
|
end;
|
39 |
|
|
architecture rtl of axcel_inpad is
|
40 |
|
|
component inbuf port(pad :in std_logic; y : out std_logic); end component;
|
41 |
|
|
component inbuf_pci port(pad :in std_logic; y : out std_logic); end component;
|
42 |
|
|
attribute syn_tpd11 : string;
|
43 |
|
|
attribute syn_tpd11 of inbuf_pci : component is "pad -> y = 2.0";
|
44 |
|
|
begin
|
45 |
|
|
pci0 : if level = pci33 generate
|
46 |
|
|
ip : inbuf_pci port map (pad => pad, y => o);
|
47 |
|
|
end generate;
|
48 |
|
|
gen0 : if level /= pci33 generate
|
49 |
|
|
ip : inbuf port map (pad => pad, y => o);
|
50 |
|
|
end generate;
|
51 |
|
|
end;
|
52 |
|
|
|
53 |
|
|
-- pragma translate_off
|
54 |
|
|
library axcelerator;
|
55 |
|
|
use axcelerator.bibuf;
|
56 |
|
|
use axcelerator.bibuf_pci;
|
57 |
|
|
-- pragma translate_on
|
58 |
|
|
library ieee;
|
59 |
|
|
use ieee.std_logic_1164.all;
|
60 |
|
|
library techmap;
|
61 |
|
|
use techmap.gencomp.all;
|
62 |
|
|
|
63 |
|
|
entity axcel_iopad is
|
64 |
|
|
generic (level : integer := 0; slew : integer := 0;
|
65 |
|
|
voltage : integer := 0; strength : integer := 0);
|
66 |
|
|
port (pad : inout std_ulogic; i, en : in std_ulogic; o : out std_ulogic);
|
67 |
|
|
end ;
|
68 |
|
|
architecture rtl of axcel_iopad is
|
69 |
|
|
component bibuf port(
|
70 |
|
|
d, e : in std_logic; pad : inout std_logic; y : out std_logic);
|
71 |
|
|
end component;
|
72 |
|
|
component bibuf_pci port(
|
73 |
|
|
d, e : in std_logic; pad : inout std_logic; y : out std_logic);
|
74 |
|
|
end component;
|
75 |
|
|
attribute syn_tpd12 : string;
|
76 |
|
|
attribute syn_tpd12 of bibuf_pci : component is "pad -> y = 2.0";
|
77 |
|
|
begin
|
78 |
|
|
pci0 : if level = pci33 generate
|
79 |
|
|
op : bibuf_pci port map (d => i, e => en, pad => pad, y => o);
|
80 |
|
|
end generate;
|
81 |
|
|
gen0 : if level /= pci33 generate
|
82 |
|
|
op : bibuf port map (d => i, e => en, pad => pad, y => o);
|
83 |
|
|
end generate;
|
84 |
|
|
end;
|
85 |
|
|
|
86 |
|
|
-- pragma translate_off
|
87 |
|
|
library axcelerator;
|
88 |
|
|
use axcelerator.bibuf;
|
89 |
|
|
use axcelerator.bibuf_pci;
|
90 |
|
|
-- pragma translate_on
|
91 |
|
|
library ieee;
|
92 |
|
|
use ieee.std_logic_1164.all;
|
93 |
|
|
library techmap;
|
94 |
|
|
use techmap.gencomp.all;
|
95 |
|
|
|
96 |
|
|
entity axcel_iodpad is
|
97 |
|
|
generic (level : integer := 0; slew : integer := 0;
|
98 |
|
|
voltage : integer := 0; strength : integer := 0);
|
99 |
|
|
port (pad : inout std_ulogic; i, en : in std_ulogic; o : out std_ulogic);
|
100 |
|
|
end ;
|
101 |
|
|
architecture rtl of axcel_iodpad is
|
102 |
|
|
component bibuf port(
|
103 |
|
|
d, e : in std_logic; pad : inout std_logic; y : out std_logic);
|
104 |
|
|
end component;
|
105 |
|
|
component bibuf_pci port(
|
106 |
|
|
d, e : in std_logic; pad : inout std_logic; y : out std_logic);
|
107 |
|
|
end component;
|
108 |
|
|
attribute syn_tpd12 : string;
|
109 |
|
|
attribute syn_tpd12 of bibuf_pci : component is "pad -> y = 2.0";
|
110 |
|
|
signal gnd : std_ulogic;
|
111 |
|
|
begin
|
112 |
|
|
gnd <= '0';
|
113 |
|
|
pci0 : if level = pci33 generate
|
114 |
|
|
op : bibuf_pci port map (d => gnd, e => en, pad => pad, y => o);
|
115 |
|
|
end generate;
|
116 |
|
|
gen0 : if level /= pci33 generate
|
117 |
|
|
op : bibuf port map (d => gnd, e => en, pad => pad, y => o);
|
118 |
|
|
end generate;
|
119 |
|
|
end;
|
120 |
|
|
|
121 |
|
|
-- pragma translate_off
|
122 |
|
|
library axcelerator;
|
123 |
|
|
use axcelerator.outbuf;
|
124 |
|
|
use axcelerator.outbuf_f_8;
|
125 |
|
|
use axcelerator.outbuf_f_12;
|
126 |
|
|
use axcelerator.outbuf_f_16;
|
127 |
|
|
use axcelerator.outbuf_f_24;
|
128 |
|
|
use axcelerator.outbuf_pci;
|
129 |
|
|
-- pragma translate_on
|
130 |
|
|
library ieee;
|
131 |
|
|
use ieee.std_logic_1164.all;
|
132 |
|
|
library techmap;
|
133 |
|
|
use techmap.gencomp.all;
|
134 |
|
|
|
135 |
|
|
entity axcel_outpad is
|
136 |
|
|
generic (level : integer := 0; slew : integer := 0;
|
137 |
|
|
voltage : integer := 0; strength : integer := 0);
|
138 |
|
|
port (pad : out std_ulogic; i : in std_ulogic);
|
139 |
|
|
end ;
|
140 |
|
|
architecture rtl of axcel_outpad is
|
141 |
|
|
component outbuf port(d : in std_logic; pad : out std_logic); end component;
|
142 |
|
|
component outbuf_f_8 port(d : in std_logic; pad : out std_logic); end component;
|
143 |
|
|
component outbuf_f_12 port(d : in std_logic; pad : out std_logic); end component;
|
144 |
|
|
component outbuf_f_16 port(d : in std_logic; pad : out std_logic); end component;
|
145 |
|
|
component outbuf_f_24 port(d : in std_logic; pad : out std_logic); end component;
|
146 |
|
|
component outbuf_pci port(d : in std_logic; pad : out std_logic); end component;
|
147 |
|
|
attribute syn_tpd13 : string;
|
148 |
|
|
attribute syn_tpd13 of outbuf_pci : component is "d -> pad = 2.0";
|
149 |
|
|
begin
|
150 |
|
|
pci0 : if level = pci33 generate
|
151 |
|
|
op : outbuf_pci port map (d => i, pad => pad);
|
152 |
|
|
end generate;
|
153 |
|
|
gen0 : if level /= pci33 generate
|
154 |
|
|
x0 : if slew = 0 generate
|
155 |
|
|
op : outbuf port map (d => i, pad => pad);
|
156 |
|
|
end generate;
|
157 |
|
|
x1 : if slew = 1 generate
|
158 |
|
|
f0 : if (strength = 0) generate
|
159 |
|
|
op : outbuf port map (d => i, pad => pad);
|
160 |
|
|
end generate;
|
161 |
|
|
f8 : if (strength > 0) and (strength <= 8) generate
|
162 |
|
|
op : outbuf_f_8 port map (d => i, pad => pad);
|
163 |
|
|
end generate;
|
164 |
|
|
f12 : if (strength > 8) and (strength <= 12) generate
|
165 |
|
|
op : outbuf_f_12 port map (d => i, pad => pad);
|
166 |
|
|
end generate;
|
167 |
|
|
f16 : if (strength > 12) and (strength <= 16) generate
|
168 |
|
|
op : outbuf_f_16 port map (d => i, pad => pad);
|
169 |
|
|
end generate;
|
170 |
|
|
f24 : if (strength > 16) generate
|
171 |
|
|
op : outbuf_f_24 port map (d => i, pad => pad);
|
172 |
|
|
end generate;
|
173 |
|
|
end generate;
|
174 |
|
|
end generate;
|
175 |
|
|
end;
|
176 |
|
|
|
177 |
|
|
-- pragma translate_off
|
178 |
|
|
library axcelerator;
|
179 |
|
|
use axcelerator.tribuff;
|
180 |
|
|
use axcelerator.tribuff_pci;
|
181 |
|
|
-- pragma translate_on
|
182 |
|
|
library ieee;
|
183 |
|
|
use ieee.std_logic_1164.all;
|
184 |
|
|
library techmap;
|
185 |
|
|
use techmap.gencomp.all;
|
186 |
|
|
|
187 |
|
|
entity axcel_odpad is
|
188 |
|
|
generic (level : integer := 0; slew : integer := 0;
|
189 |
|
|
voltage : integer := 0; strength : integer := 0);
|
190 |
|
|
port (pad : out std_ulogic; i : in std_ulogic);
|
191 |
|
|
end ;
|
192 |
|
|
architecture rtl of axcel_odpad is
|
193 |
|
|
component tribuff port(d, e : in std_logic; pad : out std_logic); end component;
|
194 |
|
|
component tribuff_pci port(d, e : in std_logic; pad : out std_logic); end component;
|
195 |
|
|
attribute syn_tpd14 : string;
|
196 |
|
|
attribute syn_tpd14 of tribuff_pci : component is "d,e -> pad = 2.0";
|
197 |
|
|
signal gnd : std_ulogic;
|
198 |
|
|
begin
|
199 |
|
|
gnd <= '0';
|
200 |
|
|
pci0 : if level = pci33 generate
|
201 |
|
|
op : tribuff_pci port map (d => gnd, e => i, pad => pad);
|
202 |
|
|
end generate;
|
203 |
|
|
gen0 : if level /= pci33 generate
|
204 |
|
|
op : tribuff port map (d => gnd, e => i, pad => pad);
|
205 |
|
|
end generate;
|
206 |
|
|
end;
|
207 |
|
|
|
208 |
|
|
-- pragma translate_off
|
209 |
|
|
library axcelerator;
|
210 |
|
|
use axcelerator.tribuff;
|
211 |
|
|
use axcelerator.tribuff_pci;
|
212 |
|
|
-- pragma translate_on
|
213 |
|
|
library ieee;
|
214 |
|
|
use ieee.std_logic_1164.all;
|
215 |
|
|
library techmap;
|
216 |
|
|
use techmap.gencomp.all;
|
217 |
|
|
|
218 |
|
|
entity axcel_toutpad is
|
219 |
|
|
generic (level : integer := 0; slew : integer := 0;
|
220 |
|
|
voltage : integer := 0; strength : integer := 0);
|
221 |
|
|
port (pad : out std_ulogic; i, en : in std_ulogic);
|
222 |
|
|
end ;
|
223 |
|
|
architecture rtl of axcel_toutpad is
|
224 |
|
|
component tribuff port(d, e : in std_logic; pad : out std_logic); end component;
|
225 |
|
|
component tribuff_pci port(d, e : in std_logic; pad : out std_logic); end component;
|
226 |
|
|
attribute syn_tpd14 : string;
|
227 |
|
|
attribute syn_tpd14 of tribuff_pci : component is "d,e -> pad = 2.0";
|
228 |
|
|
begin
|
229 |
|
|
pci0 : if level = pci33 generate
|
230 |
|
|
op : tribuff_pci port map (d => i, e => en, pad => pad);
|
231 |
|
|
end generate;
|
232 |
|
|
gen0 : if level /= pci33 generate
|
233 |
|
|
op : tribuff port map (d => i, e => en, pad => pad);
|
234 |
|
|
end generate;
|
235 |
|
|
end;
|
236 |
|
|
|
237 |
|
|
-- pragma translate_off
|
238 |
|
|
library axcelerator;
|
239 |
|
|
use axcelerator.hclkbuf;
|
240 |
|
|
use axcelerator.hclkbuf_pci;
|
241 |
|
|
-- pragma translate_on
|
242 |
|
|
library ieee;
|
243 |
|
|
use ieee.std_logic_1164.all;
|
244 |
|
|
library techmap;
|
245 |
|
|
use techmap.gencomp.all;
|
246 |
|
|
|
247 |
|
|
entity axcel_clkpad is
|
248 |
|
|
generic (level : integer := 0; voltage : integer := 0);
|
249 |
|
|
port (pad : in std_ulogic; o : out std_ulogic);
|
250 |
|
|
end;
|
251 |
|
|
architecture rtl of axcel_clkpad is
|
252 |
|
|
component hclkbuf
|
253 |
|
|
port( pad : in std_logic; y : out std_logic); end component;
|
254 |
|
|
component hclkbuf_pci
|
255 |
|
|
port( pad : in std_logic; y : out std_logic); end component;
|
256 |
|
|
begin
|
257 |
|
|
pci0 : if level = pci33 generate
|
258 |
|
|
cp : hclkbuf_pci port map (pad => pad, y => o);
|
259 |
|
|
end generate;
|
260 |
|
|
gen0 : if level /= pci33 generate
|
261 |
|
|
cp : hclkbuf port map (pad => pad, y => o);
|
262 |
|
|
end generate;
|
263 |
|
|
end;
|
264 |
|
|
|
265 |
|
|
-- pragma translate_off
|
266 |
|
|
library axcelerator;
|
267 |
|
|
use axcelerator.inbuf_lvds;
|
268 |
|
|
-- pragma translate_on
|
269 |
|
|
library ieee;
|
270 |
|
|
use ieee.std_logic_1164.all;
|
271 |
|
|
library techmap;
|
272 |
|
|
use techmap.gencomp.all;
|
273 |
|
|
|
274 |
|
|
entity axcel_inpad_ds is
|
275 |
|
|
generic (level : integer := lvds; voltage : integer := x33v);
|
276 |
|
|
port (padp, padn : in std_ulogic; o : out std_ulogic);
|
277 |
|
|
end;
|
278 |
|
|
architecture rtl of axcel_inpad_ds is
|
279 |
|
|
component inbuf_lvds port(Y : out std_logic; PADP : in std_logic; PADN : in std_logic); end component;
|
280 |
|
|
begin
|
281 |
|
|
u0: inbuf_lvds port map (y => o, padp => padp, padn => padn);
|
282 |
|
|
end;
|
283 |
|
|
|
284 |
|
|
-- pragma translate_off
|
285 |
|
|
library axcelerator;
|
286 |
|
|
use axcelerator.outbuf_lvds;
|
287 |
|
|
-- pragma translate_on
|
288 |
|
|
library ieee;
|
289 |
|
|
use ieee.std_logic_1164.all;
|
290 |
|
|
library techmap;
|
291 |
|
|
use techmap.gencomp.all;
|
292 |
|
|
|
293 |
|
|
entity axcel_outpad_ds is
|
294 |
|
|
generic (level : integer := lvds; voltage : integer := x33v);
|
295 |
|
|
port (padp, padn : out std_ulogic; i : in std_ulogic);
|
296 |
|
|
end;
|
297 |
|
|
architecture rtl of axcel_outpad_ds is
|
298 |
|
|
component outbuf_lvds port(D : in std_logic; PADP : out std_logic; PADN : out std_logic); end component;
|
299 |
|
|
begin
|
300 |
|
|
u0 : outbuf_lvds port map (d => i, padp => padp, padn => padn);
|
301 |
|
|
end;
|