File "cdf.il"
Full Path: /home/analogde/www/VirtualKeyboardSample/SKILL/cdf.il
File size: 12.28 KB
MIME-type: text/plain
Charset: utf-8
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(listing_terminaux()
prog( ()
let(( cv listing_pins )
printf(" Recherche les pins dans le schema ... \n" )
cv=geGetEditCellView()
listing_pins=cv~>terminals~>name
;printf(" Voici la liste des pins %L \n" listing_pins)
nombre_pins=length(listing_pins)
fileName = strcat("~/" cv~>cellName "_PIN.report")
outPort = outfile(fileName)
fprintf(outPort "\n PIN REPORT \n")
fprintf(outPort "---------------------\n")
fprintf(outPort "Lib Name: %s\n" cv~>libName)
fprintf(outPort "Cell Name: %s\n" cv~>cellName)
fprintf(outPort "View Name: %s\n" cv~>viewName)
fprintf(outPort "Extracted by: %s\n" getLogin() )
fprintf(outPort "%s\n" getCurrentTime())
fprintf(outPort "---------------------\n\n")
for( i 0 nombre_pins-1
fprintf(outPort "%L" nth(i listing_pins ))
fprintf(outPort "\n")
);for
close(outPort)
printf("[INFOS]: Extraction reussie")
;view(fileName)
return(listing_pins)
) ;let
);prog
);procedure
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(pins()
cpt_gauche=0
cpt_droite=0
cpt_haut=0
cpt_bas=0
espace=1
minX=0
minY=0
L = 0.4
H = 0.6
position = "left"
cv=geGetWindowCellView()
pins = setof(x cv~>shapes x~>pin)
nb_pin = length(pins)
for(i 0 length(pins)-1
;couleur=list(layer "drawing")
;shape~>lpp = couleur
case( position
("left"
if(cpt_gauche==0 then
x1=minX
y1=minY
cpt_gauche++
H_precedent=H
else
x1=x1
y1=y1+H_precedent+espace
cpt_gauche++
H_precedent=H
);if
)
("right"
if(cpt_droite==0 then
x1=maxX-L
y1=minY
cpt_droite++
H_precedent=H
else
x1=x1
y1=y1+H_precedent+espace
cpt_droite++
H_precedent=H
);if
)
("top"
if(cpt_haut==0 then
x1=minX
y1=maxY-H
cpt_haut++
L_precedent=L
else
x1=x1+L_precedent+espace
y1=maxY-H
cpt_haut++
L_precedent=L
);if
)
("bottom"
if(cpt_bas==0 then
x1=minX
y1=minY
L_precedent=L
cpt_bas++
else
x1=x1+L_precedent+espace
y1=y1
L_precedent=L
cpt_bas++
);if
)
); case
delta_x=x1+L ;x0
delta_y=y1+H ;y0
couple=list(x1:y1 delta_x:delta_y)
;printf(" nouvelle taille %L \n" couple)
nth(i pins)~>bBox=couple
); for
labels=setof( shape cv~>shapes shape~>objType == "label")
foreach( label labels
x = car(label~>xy)
y = cadr(label~>xy)
text = label~>theLabel
;printf(" infos %L %L %L \n" x y text)
foreach( shape cv~>shapes
if(shape~>pin !=nil then
if(text == shape~>pin~>term~>name then
;printf(" infos %L %L \n" text shape~>pin~>term~>name)
centreX=((caadr(shape~>bBox) - caar(shape~>bBox))/2.0) + caar(shape~>bBox)
centreY=((cadadr(shape~>bBox) - cadar(shape~>bBox))/2.0) + cadar(shape~>bBox)
label~>xy=list(centreX centreY)
label~>lpp = list("METAL1" "pin")
label~>height = 0.2
;printf(" Centre %L %L\n" centreX centreY)
);if
);if
);foreach
);foreach
; count=0
;
; foreach( indice pins
; overlapShapes=dbGetOverlaps(cv indice~>bBox indice~>lpp 0:32)
; unless( length(overlapShapes)>1
; geSelectFig(indice)
; count++
; printf("Isolated %L indice with net %s found at %L\n"
; indice~>lpp indice~>net~>name centerBox(indice~>bBox))
; ) ;unless
; ) ;foreach
;;leSearchHierarchy(cv cv~>bBox 0 "pin" list(list("term name" "==" "b")))
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(formulaire()
let(()
champs = list(
list(hiCreateLayerCyclicField(techGetTechFile(geGetEditCellView()~>lib)
"Couche ref NMOS:"
"recuperation_couche('couche_extraction_mos_n)"
techGetLeLswLayers(techGetTechFile(geGetEditCellView()~>lib))
()
'couche_extraction_mos_n
)
(10:30)
(200:30)
150
)
list(hiCreateLayerCyclicField(techGetTechFile(geGetEditCellView()~>lib)
"Couche ref PMOS:"
"recuperation_couche('couche_extraction_mos_p)"
techGetLeLswLayers(techGetTechFile(geGetEditCellView()~>lib))
()
'couche_extraction_mos_p
)
(10:70)
(200:30)
150
)
list(hiCreateLayerCyclicField(techGetTechFile(geGetEditCellView()~>lib)
"Couche N:"
"recuperation_couche('couche_N)"
techGetLeLswLayers(techGetTechFile(geGetEditCellView()~>lib))
()
'couche_N
)
(10:110)
(200:30)
150
)
list(hiCreateLayerCyclicField(techGetTechFile(geGetEditCellView()~>lib)
"Couche P:"
"recuperation_couche('couche_P)"
techGetLeLswLayers(techGetTechFile(geGetEditCellView()~>lib))
()
'couche_P
)
(10:150)
(200:30)
150
)
list(hiCreateCyclicField( ?name 'cycle_nom_ring_N
?prompt "Affectation ring N:"
?choices global_liste_fichier_conf
?value nth(0 global_liste_fichier_conf)
?defValue nth(0 global_liste_fichier_conf)
;?callback "chargement_fichier_config('Form_configuration_isoring 'cycle_nom_ring_N)"
)
(10:190)
(200:30)
150
)
list(hiCreateCyclicField( ?name 'cycle_nom_ring_P
?prompt "Affectation ring P:"
?choices global_liste_fichier_conf
?value nth(0 global_liste_fichier_conf)
?defValue nth(0 global_liste_fichier_conf)
;?callback "chargement_fichier_config('Form_configuration_isoring 'cycle_nom_ring_P)"
)
(10:230)
(200:30)
150
)
list(hiCreateCyclicField( ?name 'cycle_nom_ring_N_ISI
?prompt "Affectation ring N ISO:"
?choices global_liste_fichier_conf
?value nth(0 global_liste_fichier_conf)
?defValue nth(0 global_liste_fichier_conf)
;?callback "chargement_fichier_config('Form_configuration_isoring 'cycle_nom_ring_P)"
)
(10:270)
(200:30)
150
)
list( hiCreateBooleanButton( ?name 'boolean_btn_align
?buttonText "Alignement"
?value t
?defValue nil
?callback "alignement()"
)
(10:470)
(200:50)
150
)
)
hiCreateAppForm( ?name 'Form_configuration_isoring
?fields champs
?formTitle "# Parametrages isoring des mos #"
?unmapAfterCB nil
?initialSize t
)
hiDisplayForm('Form_configuration_isoring)
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(aligne2()
x_min ='()
y_min ='()
x_max ='()
y_max ='()
xmin = 0.0
ymin = 0.0
xmax = 0.0
ymax = 0.0
x = 0.0
y = 0.0
xy_pcell ='()
liste_id='()
layer_detection = "NIMP"
liste_id = setof(element geGetSelectedSet() element~>objType=="inst")
nombre_mos = length(liste_id)
for(i 0 nombre_mos-1
if(nth(i liste_id )~>orient != "R0" then
nth(i liste_id )~>orient = "R0"
)
)
for(i 1 nombre_mos-1
foreach(couche nth(i liste_id)~>master~>shapes
if( couche~>layerName == layer_detection && couche~>purpose == "drawing" then
xy_pcell = nth(i-1 liste_id)~>bBox
x1 = car(car(xy_pcell))
y1 = cadr(car(xy_pcell))
x2 = car(cadr(xy_pcell))
y2 = cadr(cadr(xy_pcell))
x = x2 + 0.66
y = y1 + 0.35
nth(i liste_id)~>xy=list(x y)
)
)
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(toto()
; alignement des instances qui sont énumérées
cv=geGetWindowCellView()
id_listing = '()
instances = list("I2" "I4" "I6")
for( i 0 length(instances)-1
id = car(leSearchHierarchy(cv cv~>bBox 0 "inst" list(list("inst name" "==" nth(i instances) ))) )
id_listing = append1(id_listing id )
)
nombre_mos = length( id_listing)
for(i 0 nombre_mos-1
if(nth(i id_listing )~>orient != "R0" then
nth(i id_listing )~>orient = "R0"
)
)
for(i 1 nombre_mos-1
foreach(couche nth(i id_listing )~>master~>shapes
if( couche~>layerName == layer_detection && couche~>purpose == "drawing" then
xy_pcell = nth(i-1 id_listing )~>bBox
x1 = car(car(xy_pcell))
y1 = cadr(car(xy_pcell))
x2 = car(cadr(xy_pcell))
y2 = cadr(cadr(xy_pcell))
x = x2 + 0.66
y = y1 + 0.35
nth(i id_listing )~>xy=list(x y)
)
)
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(aligne1()
x_min ='()
y_min ='()
x_max ='()
y_max ='()
xmin = 0.0
ymin = 0.0
xmax = 0.0
ymax = 0.0
x = 0.0
y = 0.0
xy_pcell ='()
liste_id='()
layer_detection = "NIMP"
liste_id = setof(element geGetSelectedSet() element~>objType=="inst")
nombre_mos = length(liste_id)
for(i 0 nombre_mos-1
if(nth(i liste_id )~>orient != "R0" then
nth(i liste_id )~>orient = "R0"
)
)
for(i 0 nombre_mos-1
foreach(couche nth(i liste_id)~>master~>shapes
if( couche~>layerName == layer_detection && couche~>purpose == "drawing" then
xy_pcell = nth(i liste_id)~>bBox
x_min = append1(x_min car(car(xy_pcell)))
y_min = append1(y_min cadr(car(xy_pcell)) )
x_max = append1(x_max car(cadr(xy_pcell)) )
y_max = append1(y_max cadr(cadr(xy_pcell)) )
;printf(" Box : %L \n" xy_pcell)
;x1 = car(car(xy_pcell))
;y1 = cadr(car(xy_pcell))
;x2 = car(cadr(xy_pcell))
;y2 = cadr(cadr(xy_pcell))
;printf(" Box : %f %f %f %f \n" x1 y1 x2 y2)
if(i != 0 then
x = nth(i-1 x_max) + 0.66
y = nth(i-1 y_min) + 0.35
nth(i liste_id)~>xy=list(x y)
printf(" Box : %f %f \n" x y)
)
)
)
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; q=car(geGetSelSet())
; cdf=cdfGetInstCDF(q)
; cdf~>??
; q~>master~>shapes~>??
; q=car(geGetSelSet())
; contenu = nth(i liste_id)~>master~>shapes
; nbre_shape = length(contenu)
; type_cell = nth(i liste_id)~>cellName
; liste_type_cell = append1(liste_type_cell type_cell)
; for(j 0 (nbre_shape-1)
; if(nth(j contenu)~>layerName == layer_detection && nth(j contenu)~>purpose == "drawing" then
; xy_pcell = nth(j contenu)~>bBox
;
; if(nth(i liste_id)~>orient == "MX" then
; cdf=cdfGetInstCDF(nth(i liste_id))
; champ = nth(0 cdf~>parameters )~>value
; h = atof(champ)
; x0 = car(coord)
; y0 = cadr(coord) - h
; xmin = x0 + car(car(xy_pcell))
; ymin = y0 + cadr(car(xy_pcell))
; xmax = x0 + car(cadr(xy_pcell))
; ymax = y0 + cadr(cadr(xy_pcell))
; x_min = append1(x_min xmin)
; y_min = append1(y_min ymin)
; x_max = append1(x_max xmax)
; y_max = append1(y_max ymax)
; )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(extraire()
results=listing_terminaux()
;action = "extraction"
;gui(results)
;gestionnaire_form()
)