1 | | {{{ |
2 | | #!html |
3 | | <h1> TP9 VLSI : Vue physique de l'AMD2901</h1> |
4 | | }}} |
5 | | [[PageOutline]] |
6 | | == Objectifs == |
7 | | * Utiliser les outils de placement et routage. |
8 | | * Vérifier la validité du routage. |
9 | | == Exercice(s) == |
10 | | === Exercice 1-Placement === |
11 | | La première étape consiste à placer les plots puis le coeur. |
12 | | ==== Question 1 ==== |
13 | | Exécutez le script suivant amd_chip.py en ayant pris soin de comprendre le contenu de ce fichier |
14 | | {{{ |
15 | | #!/usr/bin/python |
16 | | |
17 | | from stratus import * |
18 | | |
19 | | class amd_chip ( Model ) : |
20 | | |
21 | | def Interface ( self ) : |
22 | | |
23 | | self.cke = CkIn ( "cke") |
24 | | self.cin = SignalIn ( "cin", 1 ) |
25 | | self.cout = SignalOut ( "cout", 1 ) |
26 | | self.np = SignalOut ( "np", 1 ) |
27 | | self.ng = SignalOut ( "ng", 1 ) |
28 | | self.ovr = SignalOut ( "ovr", 1 ) |
29 | | self.zero = SignalOut ( "zero", 1 ) |
30 | | self.signe = SignalOut ( "signe", 1 ) |
31 | | self.r0 = TriState ( "r0", 1 ) |
32 | | self.r3 = TriState ( "r3", 1 ) |
33 | | self.q0 = TriState ( "q0", 1 ) |
34 | | self.q3 = TriState ( "q3", 1 ) |
35 | | self.a = SignalIn ( "a", 4 ) |
36 | | self.b = SignalIn ( "b", 4 ) |
37 | | self.d = SignalIn ( "d", 4 ) |
38 | | self.i = SignalIn ( "i", 9 ) |
39 | | self.noe = SignalIn ( "noe", 1 ) |
40 | | self.y = TriState ( "y", 4 ) |
41 | | |
42 | | self.vdd = VddIn ( "vdd" ) |
43 | | self.vss = VssIn ( "vss" ) |
44 | | self.vdde = VddIn ( "vdde" ) |
45 | | self.vsse = VssIn ( "vsse" ) |
46 | | |
47 | | |
48 | | def Netlist ( self ) : |
49 | | |
50 | | cin_from_pads = Signal ( "cin_from_pads", 1 ) |
51 | | cout_to_pads = Signal ( "cout_to_pads", 1 ) |
52 | | np_to_pads = Signal ( "np_to_pads", 1 ) |
53 | | ng_to_pads = Signal ( "ng_to_pads", 1 ) |
54 | | ovr_to_pads = Signal ( "ovr_to_pads", 1 ) |
55 | | zero_to_pads = Signal ( "zero_to_pads", 1 ) |
56 | | shift_r = Signal ( "shift_r", 1 ) |
57 | | shift_l = Signal ( "shift_l", 1 ) |
58 | | signe_to_pads = Signal ( "signe_to_pads", 1 ) |
59 | | r0_to_pads = Signal ( "r0_to_pads", 1 ) |
60 | | r3_to_pads = Signal ( "r3_to_pads", 1 ) |
61 | | r0_from_pads = Signal ( "r0_from_pads", 1 ) |
62 | | r3_from_pads = Signal ( "r3_from_pads", 1 ) |
63 | | q0_to_pads = Signal ( "q0_to_pads", 1 ) |
64 | | q3_to_pads = Signal ( "q3_to_pads", 1 ) |
65 | | q0_from_pads = Signal ( "q0_from_pads", 1 ) |
66 | | q3_from_pads = Signal ( "q3_from_pads", 1 ) |
67 | | ck_ring = Signal ( "ck_ring", 1 ) |
68 | | a_from_pads = Signal ( "a_from_pads", 4 ) |
69 | | b_from_pads = Signal ( "b_from_pads", 4 ) |
70 | | d_from_pads = Signal ( "d_from_pads", 4 ) |
71 | | i_from_pads = Signal ( "i_from_pads", 9 ) |
72 | | y_to_pads = Signal ( "y_to_pads", 4 ) |
73 | | noe_from_pads = Signal ( "noe_from_pads", 1 ) |
74 | | y_oe = Signal ( "y_oe", 1 ) |
75 | | self.ckc = Signal ( "ckc", 1 ) |
76 | | |
77 | | |
78 | | self.coeur = Inst ( "coeur" |
79 | | , "coeur" |
80 | | , map = { 'cin_from_pads' : cin_from_pads |
81 | | , 'cout_to_pads' : cout_to_pads |
82 | | , 'np_to_pads' : np_to_pads |
83 | | , 'ng_to_pads' : ng_to_pads |
84 | | , 'ovr_to_pads' : ovr_to_pads |
85 | | , 'signe_to_pads' : signe_to_pads |
86 | | , 'zero_to_pads' : zero_to_pads |
87 | | , 'shift_r' : shift_r |
88 | | , 'shift_l' : shift_l |
89 | | , 'r0_to_pads' : r0_to_pads |
90 | | , 'r3_to_pads' : r3_to_pads |
91 | | , 'r0_from_pads' : r0_from_pads |
92 | | , 'r3_from_pads' : r3_from_pads |
93 | | , 'q0_to_pads' : q0_to_pads |
94 | | , 'q3_to_pads' : q3_to_pads |
95 | | , 'q0_from_pads' : q0_from_pads |
96 | | , 'q3_from_pads' : q3_from_pads |
97 | | , 'ck' : self.ckc |
98 | | , 'a_from_pads' : a_from_pads |
99 | | , 'b_from_pads' : b_from_pads |
100 | | , 'd_from_pads' : d_from_pads |
101 | | , 'i_from_pads' : i_from_pads |
102 | | , 'y_to_pads' : y_to_pads |
103 | | , 'noe_from_pads' : noe_from_pads |
104 | | , 'y_oe' : y_oe |
105 | | , 'vdd' : self.vdd |
106 | | , 'vss' : self.vss |
107 | | } |
108 | | ) |
109 | | |
110 | | self.p_ck = Inst ( "pck_px", "p_ck" |
111 | | , map = { 'pad' : self.cke |
112 | | , 'ck' : ck_ring |
113 | | , 'vddi' : self.vdd |
114 | | , 'vssi' : self.vss |
115 | | , 'vdde' : self.vdde |
116 | | , 'vsse' : self.vsse |
117 | | } |
118 | | ) |
119 | | |
120 | | self.p_cin = Inst ( "pi_px", "p_cin" |
121 | | , map = { 'pad' : self.cin |
122 | | , 't' : cin_from_pads |
123 | | , 'ck' : ck_ring |
124 | | , 'vddi' : self.vdd |
125 | | , 'vssi' : self.vss |
126 | | , 'vdde' : self.vdde |
127 | | , 'vsse' : self.vsse |
128 | | } |
129 | | ) |
130 | | |
131 | | self.p_noe = Inst ( "pi_px", "p_noe" |
132 | | , map = { 'pad' : self.noe |
133 | | , 't' : noe_from_pads |
134 | | , 'ck' : ck_ring |
135 | | , 'vddi' : self.vdd |
136 | | , 'vssi' : self.vss |
137 | | , 'vdde' : self.vdde |
138 | | , 'vsse' : self.vsse |
139 | | } |
140 | | ) |
141 | | |
142 | | self.p_a = {} |
143 | | self.p_b = {} |
144 | | self.p_d = {} |
145 | | for i in range ( 4 ) : |
146 | | self.p_a[i] = Inst ( "pi_px", "p_a%d" % i |
147 | | , map = { 'pad' : self.a[i] |
148 | | , 't' : a_from_pads[i] |
149 | | , 'ck' : ck_ring |
150 | | , 'vddi' : self.vdd |
151 | | , 'vssi' : self.vss |
152 | | , 'vdde' : self.vdde |
153 | | , 'vsse' : self.vsse |
154 | | } |
155 | | ) |
156 | | |
157 | | self.p_b[i] = Inst ( "pi_px", "p_b%d" % i |
158 | | , map = { 'pad' : self.b[i] |
159 | | , 't' : b_from_pads[i] |
160 | | , 'ck' : ck_ring |
161 | | , 'vddi' : self.vdd |
162 | | , 'vssi' : self.vss |
163 | | , 'vdde' : self.vdde |
164 | | , 'vsse' : self.vsse |
165 | | } |
166 | | ) |
167 | | |
168 | | self.p_d[i] = Inst ( "pi_px", "p_d%d" % i |
169 | | , map = { 'pad' : self.d[i] |
170 | | , 't' : d_from_pads[i] |
171 | | , 'ck' : ck_ring |
172 | | , 'vddi' : self.vdd |
173 | | , 'vssi' : self.vss |
174 | | , 'vdde' : self.vdde |
175 | | , 'vsse' : self.vsse |
176 | | } |
177 | | ) |
178 | | |
179 | | self.p_i = {} |
180 | | for i in range ( 9 ) : |
181 | | self.p_i[i] = Inst ( "pi_px", "p_i%d" % i |
182 | | , map = { 'pad' : self.i[i] |
183 | | , 't' : i_from_pads[i] |
184 | | , 'ck' : ck_ring |
185 | | , 'vddi' : self.vdd |
186 | | , 'vssi' : self.vss |
187 | | , 'vdde' : self.vdde |
188 | | , 'vsse' : self.vsse |
189 | | } |
190 | | ) |
191 | | |
192 | | self.p_cout = Inst ( "po_px", "p_cout" |
193 | | , map = { 'i' : cout_to_pads |
194 | | , 'pad' : self.cout |
195 | | , 'ck' : ck_ring |
196 | | , 'vddi' : self.vdd |
197 | | , 'vssi' : self.vss |
198 | | , 'vdde' : self.vdde |
199 | | , 'vsse' : self.vsse |
200 | | } |
201 | | ) |
202 | | |
203 | | self.p_np = Inst ( "po_px", "p_np" |
204 | | , map = { 'i' : np_to_pads |
205 | | , 'pad' : self.np |
206 | | , 'ck' : ck_ring |
207 | | , 'vddi' : self.vdd |
208 | | , 'vssi' : self.vss |
209 | | , 'vdde' : self.vdde |
210 | | , 'vsse' : self.vsse |
211 | | } |
212 | | ) |
213 | | |
214 | | self.p_ng = Inst ( "po_px", "p_ng" |
215 | | , map = { 'i' : ng_to_pads |
216 | | , 'pad' : self.ng |
217 | | , 'ck' : ck_ring |
218 | | , 'vddi' : self.vdd |
219 | | , 'vssi' : self.vss |
220 | | , 'vdde' : self.vdde |
221 | | , 'vsse' : self.vsse |
222 | | } |
223 | | ) |
224 | | |
225 | | self.p_ovr = Inst ( "po_px", "p_ovr" |
226 | | , map = { 'i' : ovr_to_pads |
227 | | , 'pad' : self.ovr |
228 | | , 'ck' : ck_ring |
229 | | , 'vddi' : self.vdd |
230 | | , 'vssi' : self.vss |
231 | | , 'vdde' : self.vdde |
232 | | , 'vsse' : self.vsse |
233 | | } |
234 | | ) |
235 | | |
236 | | self.p_zero = Inst ( "po_px", "p_zero" |
237 | | , map = { 'i' : zero_to_pads |
238 | | , 'pad' : self.zero |
239 | | , 'ck' : ck_ring |
240 | | , 'vddi' : self.vdd |
241 | | , 'vssi' : self.vss |
242 | | , 'vdde' : self.vdde |
243 | | , 'vsse' : self.vsse |
244 | | } |
245 | | ) |
246 | | |
247 | | self.p_signe = Inst ( "po_px", "p_signe" |
248 | | , map = { 'i' : signe_to_pads |
249 | | , 'pad' : self.signe |
250 | | , 'ck' : ck_ring |
251 | | , 'vddi' : self.vdd |
252 | | , 'vssi' : self.vss |
253 | | , 'vdde' : self.vdde |
254 | | , 'vsse' : self.vsse |
255 | | } |
256 | | ) |
257 | | |
258 | | self.p_y = {} |
259 | | for i in range ( 4 ) : |
260 | | self.p_y[i] = Inst ( "pot_px", "p_y%d" % i |
261 | | , map = { 'i' : y_to_pads[i] |
262 | | , 'b' : y_oe |
263 | | , 'pad' : self.y[i] |
264 | | , 'ck' : ck_ring |
265 | | , 'vddi' : self.vdd |
266 | | , 'vssi' : self.vss |
267 | | , 'vdde' : self.vdde |
268 | | , 'vsse' : self.vsse |
269 | | } |
270 | | ) |
271 | | |
272 | | self.p_q0 = Inst ( "piot_px", "p_q0" |
273 | | , map = { 'i' : q0_to_pads |
274 | | , 'b' : shift_r |
275 | | , 't' : q0_from_pads |
276 | | , 'pad' : self.q0 |
277 | | , 'ck' : ck_ring |
278 | | , 'vddi' : self.vdd |
279 | | , 'vssi' : self.vss |
280 | | , 'vdde' : self.vdde |
281 | | , 'vsse' : self.vsse |
282 | | } |
283 | | ) |
284 | | |
285 | | self.p_q3 = Inst ( "piot_px", "p_q3" |
286 | | , map = { 'i' : q3_to_pads |
287 | | , 'b' : shift_l |
288 | | , 't' : q3_from_pads |
289 | | , 'pad' : self.q3 |
290 | | , 'ck' : ck_ring |
291 | | , 'vddi' : self.vdd |
292 | | , 'vssi' : self.vss |
293 | | , 'vdde' : self.vdde |
294 | | , 'vsse' : self.vsse |
295 | | } |
296 | | ) |
297 | | |
298 | | self.p_r0 = Inst ( "piot_px", "p_r0" |
299 | | , map = { 'i' : r0_to_pads |
300 | | , 'b' : shift_r |
301 | | , 't' : r0_from_pads |
302 | | , 'pad' : self.r0 |
303 | | , 'ck' : ck_ring |
304 | | , 'vddi' : self.vdd |
305 | | , 'vssi' : self.vss |
306 | | , 'vdde' : self.vdde |
307 | | , 'vsse' : self.vsse |
308 | | } |
309 | | ) |
310 | | |
311 | | self.p_r3 = Inst ( "piot_px", "p_r3" |
312 | | , map = { 'i' : r3_to_pads |
313 | | , 'b' : shift_l |
314 | | , 't' : r3_from_pads |
315 | | , 'pad' : self.r3 |
316 | | , 'ck' : ck_ring |
317 | | , 'vddi' : self.vdd |
318 | | , 'vssi' : self.vss |
319 | | , 'vdde' : self.vdde |
320 | | , 'vsse' : self.vsse |
321 | | } |
322 | | ) |
323 | | |
324 | | self.p_vddick0 = Inst ( "pvddick_px", "p_vddick0" |
325 | | , map = { 'cko' : self.ckc |
326 | | , 'ck' : ck_ring |
327 | | , 'vddi' : self.vdd |
328 | | , 'vssi' : self.vss |
329 | | , 'vdde' : self.vdde |
330 | | , 'vsse' : self.vsse |
331 | | } |
332 | | ) |
333 | | |
334 | | self.p_vssick0 = Inst ( "pvssick_px", "p_vssick0" |
335 | | , map = { 'cko' : self.ckc |
336 | | , 'ck' : ck_ring |
337 | | , 'vddi' : self.vdd |
338 | | , 'vssi' : self.vss |
339 | | , 'vdde' : self.vdde |
340 | | , 'vsse' : self.vsse |
341 | | } |
342 | | ) |
343 | | |
344 | | self.p_vddeck0 = Inst ( "pvddeck_px", "p_vddeck0" |
345 | | , map = { 'cko' : self.ckc |
346 | | , 'ck' : ck_ring |
347 | | , 'vddi' : self.vdd |
348 | | , 'vssi' : self.vss |
349 | | , 'vdde' : self.vdde |
350 | | , 'vsse' : self.vsse |
351 | | } |
352 | | ) |
353 | | |
354 | | self.p_vddeck1 = Inst ( "pvddeck_px", "p_vddeck1" |
355 | | , map = { 'cko' : self.ckc |
356 | | , 'ck' : ck_ring |
357 | | , 'vddi' : self.vdd |
358 | | , 'vssi' : self.vss |
359 | | , 'vdde' : self.vdde |
360 | | , 'vsse' : self.vsse |
361 | | } |
362 | | ) |
363 | | |
364 | | self.p_vsseck0 = Inst ( "pvsseck_px", "p_vsseck0" |
365 | | , map = { 'cko' : self.ckc |
366 | | , 'ck' : ck_ring |
367 | | , 'vddi' : self.vdd |
368 | | , 'vssi' : self.vss |
369 | | , 'vdde' : self.vdde |
370 | | , 'vsse' : self.vsse |
371 | | } |
372 | | ) |
373 | | |
374 | | self.p_vsseck1 = Inst ( "pvsseck_px", "p_vsseck1" |
375 | | , map = { 'cko' : self.ckc |
376 | | , 'ck' : ck_ring |
377 | | , 'vddi' : self.vdd |
378 | | , 'vssi' : self.vss |
379 | | , 'vdde' : self.vdde |
380 | | , 'vsse' : self.vsse |
381 | | } |
382 | | ) |
383 | | |
384 | | |
385 | | def Layout ( self ) : |
386 | | |
387 | | ##### A COMLPETER ##### |
388 | | DefAb(XY(0,0),XY(3000,3000)) |
389 | | |
390 | | PlaceCentric(self.coeur) |
391 | | |
392 | | PadNorth(self.p_i[3],self.p_i[4],self.p_i[5],self.p_b[0],self.p_b[1],self.p_b[2],self.p_b[3] |
393 | | ,self.p_q0,self.p_q3,self.p_i[6],self.p_i[7]) |
394 | | |
395 | | |
396 | | PadWest(self.p_ck,self.p_d[0],self.p_d[1],self.p_d[2],self.p_zero,self.p_vsseck0,self.p_ovr |
397 | | ,self.p_d[3],self.p_i[0],self.p_i[1],self.p_i[2]) |
398 | | |
399 | | |
400 | | PadSouth(self.p_cin,self.p_np,self.p_ng,self.p_vssick0,self.p_vddeck0,self.p_vsseck1,self.p_vddeck1 |
401 | | ,self.p_cout,self.p_y[0],self.p_y[1],self.p_y[2]) |
402 | | |
403 | | |
404 | | PadEast(self.p_y[3],self.p_signe,self.p_noe,self.p_a[0],self.p_a[1],self.p_vddick0 |
405 | | ,self.p_a[2],self.p_a[3],self.p_r0,self.p_r3,self.p_i[8]) |