1 /****************************************************************************/
3 /* Chaine de CAO & VLSI Avertec */
5 /* Fichier : efg_ext_fig.c */
7 /* (c) copyright 1991-2003 Avertec */
8 /* Tous droits reserves */
9 /* Support : contact@avertec.com */
11 /* Auteur(s) : Marc KUOCH */
13 /****************************************************************************/
14 /* Extraction d'une lofig concernant un chemin */
15 /****************************************************************************/
18 char EFG_CALC_EQUI_CAPA
= EFG_OUT_NONE
; /* a passer en param de extract_fig */
19 int EFG_TRS_INDEX
= 0;
20 char *EFG_SET_FIG_NAME
=NULL
;
22 /*****************************************************************************\
25 \*****************************************************************************/
33 switch ( SIM_OUTLOAD
) {
34 case SIM_NO_OUTLOAD
: EFG_CALC_EQUI_CAPA
= EFG_OUT_NONE
;
36 case SIM_DYNAMIC_OUTLOAD
: EFG_CALC_EQUI_CAPA
= EFG_OUT_CAPA
;
38 case SIM_TRANSISTOR_OUTLOAD
: EFG_CALC_EQUI_CAPA
= EFG_OUT_TRANSISTOR
;
40 default : EFG_CALC_EQUI_CAPA
= EFG_OUT_TRANSISTOR
;
45 /*****************************************************************************\
46 function efg_threat_alim ()
48 \*****************************************************************************/
49 void efg_threat_alim ( lofig_list
*lofig
, lofig_list
*fig_ext
,cnsfig_list
*cnsfig
)
53 for(losig
= lofig
->LOSIG
; losig
!= NULL
; losig
= losig
->NEXT
)
55 if( ( mbk_LosigIsVDD (losig
) ) )
57 if(getptype(losig
->USER
,EFG_SIG_VDD
) == NULL
)
59 losig
->USER
= addptype(losig
->USER
,EFG_SIG_VDD
,NULL
) ;
60 if(getptype(losig
->USER
,EFG_SIG_ALIM
) == NULL
)
61 losig
->USER
= addptype(losig
->USER
,EFG_SIG_ALIM
,NULL
) ;
62 if (cnsfig
) efg_addlosig (fig_ext
,losig
,1);
65 if( ( mbk_LosigIsVSS(losig
) ) )
67 if(getptype(losig
->USER
,EFG_SIG_VSS
) == NULL
)
69 losig
->USER
= addptype(losig
->USER
,EFG_SIG_VSS
,NULL
) ;
70 if(getptype(losig
->USER
,EFG_SIG_ALIM
) == NULL
)
71 losig
->USER
= addptype(losig
->USER
,EFG_SIG_ALIM
,NULL
) ;
72 if (cnsfig
) efg_addlosig (fig_ext
,losig
,1);
79 /*****************************************************************************\
80 function efg_report_extcon ()
82 \*****************************************************************************/
84 static locon_list
*choose_best_node_for_connector(losig_list
*sig
, int out
)
88 locon_list
*con
, *bestcon
=NULL
;
90 ptype
= getptype ( sig
->USER
, LOFIGCHAIN
);
91 for ( chain
= (chain_list
*)ptype
->DATA
; chain
; chain
=chain
->NEXT
)
93 con
= (locon_list
*)chain
->DATA
;
96 if (bestcon
==NULL
) bestcon
=con
;
99 if (con
->TYPE
=='E' || (con
->TYPE
=='T' && con
->NAME
==MBK_GRID_NAME
)) bestcon
=con
;
103 if (con
->TYPE
=='E' || (con
->TYPE
=='T' && (con
->NAME
==MBK_DRAIN_NAME
|| con
->NAME
==MBK_SOURCE_NAME
))) bestcon
=con
;
105 if (bestcon
->TYPE
=='E') break;
113 void efg_report_extcon ( lofig_list
*fig_ext
, spisig_list
*spisig
)
116 int need_lofigchain
= 0, haslonode
;
119 lotrs_list
*lotrs
,*trs
;
121 locon_list
*locon
,*con
;
124 spisig_list
*scanspisig
;
125 long nodenum
, rcxnode
;
127 // report any possible flotting gate in the interface...
128 for (locon
= fig_ext
->LOCON
; locon
; locon
=locon
->NEXT
)
129 if (locon
->SIG
->TYPE
!= 'E')
130 locon
->SIG
->TYPE
= 'E';
132 for (lotrs
= (fig_ext
)->LOTRS
; lotrs
; lotrs
=lotrs
->NEXT
) {
133 grid
= lotrs
->GRID
->SIG
;
135 if ( grid
->TYPE
== 'I' ) {
136 ptype
= getptype ( grid
->USER
, LOFIGCHAIN
);
138 for ( chain
= (chain_list
*)ptype
->DATA
; chain
; chain
=chain
->NEXT
) {
139 locon
= (locon_list
*)chain
->DATA
;
140 if ( locon
->TYPE
== 'T' ) {
141 trs
= (lotrs_list
*)locon
->ROOT
;
142 if ( trs
->FLAGS
!= EFG_BLOCK_TRS
&& locon
!= trs
->GRID
) {
150 locon
= addlocon ( (fig_ext
), efg_getlosigname (grid
), grid
, 'I' );
151 locon
->SIG
->TYPE
= 'E';
152 if ( lotrs
->GRID
->PNODE
)
153 locon
->PNODE
= dupnumlst(lotrs
->GRID
->PNODE
);
158 for( scanspisig
= spisig
; scanspisig
; scanspisig
= scanspisig
->NEXT
) {
159 if((scanspisig
->START
|| scanspisig
->END
) && scanspisig
->START
!=scanspisig
->END
) {
160 sig
= efg_GetDestSigBySpiSig( scanspisig
);
161 signame
= efg_getlosigname ( sig
);
162 if ( (locon
=efg_get_locon ( fig_ext
,signame
))==NULL
) {
165 locon
= addlocon (fig_ext
,signame
,sig
,'O');
167 if (scanspisig
->END
) rcxnode
=scanspisig
->OUTCONRC_NODE
;
168 else rcxnode
=scanspisig
->INCONRC_NODE
;
170 efg_checkvalidnode(scanspisig
->DESTSIG
, rcxnode
, &haslonode
);
172 if (haslonode
) nodenum
=rcxnode
;
173 else if ((con
=choose_best_node_for_connector(efg_GetSrcSigBySpiSig(scanspisig
), scanspisig
->START
?0:1))!=NULL
&& con
->PNODE
!=NULL
)
174 nodenum
=con
->PNODE
->DATA
;
177 locon
->PNODE
= addnum(NULL
, nodenum
);
179 ptype = getptype ( sig->USER, LOFIGCHAIN );
180 for ( chain = (chain_list *)ptype->DATA ; chain ; chain=chain->NEXT ) {
181 con = (locon_list *)chain->DATA;
183 locon->PNODE = (num_list*)dupnumlst((chain_list*)con->PNODE);
189 // correct locon pnode
190 if (scanspisig
->END
) rcxnode
=scanspisig
->OUTCONRC_NODE
;
191 else rcxnode
=scanspisig
->INCONRC_NODE
;
193 efg_checkvalidnode(scanspisig
->DESTSIG
, rcxnode
, &haslonode
);
197 freenum(locon
->PNODE
);
198 locon
->PNODE
= addnum(NULL
, rcxnode
);
204 if ( need_lofigchain
) lofigchain (fig_ext
);
207 spisig_list
*efg_AddLatchLoopFeebackCone(lofig_list
*lofig
, cnsfig_list
*cnsfig
, spisig_list
*origspisig
)
210 edge_list
*ptinedge
;
211 ptype_list dummy
, *crade
=NULL
, *pt
;
216 if (cnsfig
==NULL
|| lofig
==NULL
) return origspisig
;
220 for(cone
= cnsfig
->CONE
; cone
!= NULL
; cone
= cone
->NEXT
)
222 if ((cone
->TYPE
& CNS_LATCH
) == CNS_LATCH
)
224 spisig
= efg_GetSpiSig ( origspisig
, cone
->NAME
);
225 if (spisig
!=NULL
&& !spisig
->START
)
227 for (ptinedge
= cone
->INCONE
; ptinedge
; ptinedge
= ptinedge
->NEXT
)
229 if ((ptinedge
->TYPE
& CNS_FEEDBACK
) != 0 || (ptinedge
->TYPE
& CNS_MEMSYM
) != 0)
231 if (efg_GetSpiSig ( origspisig
, ptinedge
->UEDGE
.CONE
->NAME
)==NULL
)
233 for (pt
=crade
; pt
!=NULL
&& pt
->DATA
!=ptinedge
->UEDGE
.CONE
->NAME
; pt
=pt
->NEXT
);
234 if (pt
==NULL
) crade
=addptype(crade
, (long)spisig
, ptinedge
->UEDGE
.CONE
);
242 for (pt
=crade
; pt
!=NULL
; pt
=pt
->NEXT
)
244 char *cmd
=NULL
, cmddir
=0;
245 spisig
=(spisig_list
*)pt
->TYPE
;
246 cone
=(cone_list
*)pt
->DATA
;
247 if ((cone
->TYPE
& CNS_MEMSYM
)!=0) cmd
=spisig
->LATCHCMD
, cmddir
=spisig
->LATCHCMDDIR
;
248 path
=efg_AddPathEvent(NULL
, cone
->NAME
, spisig
->EVENT
==(long)EFG_SIG_SET_RISE
?EFG_FALL
:EFG_RISE
,0,spisig
->MINDATE
+1, -1, -1, -1, cmd
, cmddir
, spisig
->NAME
);
249 origspisig
=efg_BuildSpiSigList (lofig
,path
,origspisig
,0,&err
,0);
250 spisig
->USER
=addptype(spisig
->USER
, EFG_SPISIG_LOOP_SPISIG
, origspisig
);
251 origspisig
->USER
=addptype(origspisig
->USER
, EFG_SPISIG_LOOP_SPISIG
, spisig
);
252 efg_FreePathEvent(path
);
259 /*****************************************************************************\
260 function efg_extract_fig()
262 drive le spice des signaux du .inf
263 \*****************************************************************************/
264 static int checkprechargememsym(cone_list
*cone
, char *input
, cone_list
**other
)
269 if ((cone
->TYPE
& CNS_MEMSYM
)==0 || V_BOOL_TAB
[__CPE_PRECHARGED_MEMSYM
].VALUE
==0) return 0;
270 for (ptinedge
= cone
->INCONE
; ptinedge
; ptinedge
= ptinedge
->NEXT
) {
271 if ((ptinedge
->TYPE
& CNS_EXT
) == 0)
273 if (input
!=NULL
&& !mbk_casestrcmp(ptinedge
->UEDGE
.CONE
->NAME
,input
))
274 if ((ptinedge
->TYPE
& CNS_COMMAND
)!=0) res
=1;
275 if ((ptinedge
->TYPE
& CNS_MEMSYM
)!=0) *other
=ptinedge
->UEDGE
.CONE
;
281 chain_list
*efg_getcone_onpath (spisig_list
*hdspisig
,cnsfig_list
*cnsfig
)
284 cone_list
*cone
, *other
;
285 chain_list
*hdchain
=NULL
;
286 gsp_cone_info
*ci
, *other_ci
;
288 for ( spis
= hdspisig
; spis
; spis
=spis
->NEXT
) {
289 if ( (cone
= getcone(cnsfig
, 0, mbk_devect (spis
->critic_NAME
,"[","]"))) ) {
291 if (!getptype (spis
->SRCSIG
->USER
,EFG_SIG2CONE
))
292 spis
->SRCSIG
->USER
= addptype (spis
->SRCSIG
->USER
,EFG_SIG2CONE
,cone
);
294 ci
=gsp_create_cone_info(cone
);
296 ci
->MinDate
=spis
->MINDATE
;
297 ci
->cmd
=spis
->LATCHCMD
;
298 ci
->cmd_state
=spis
->LATCHCMDDIR
;
299 if (checkprechargememsym(cone
, spis
->PREVIOUS
, &other
))
301 if (other
!=NULL
&& (other_ci
=gsp_get_cone_info(other
))!=NULL
)
303 if (other_ci
->precharged
) ci
->precharged
=1;
304 else if (ci
->precharged
) other_ci
->precharged
=1;
306 if (!efg_test_signal_flags(spis
->SRCSIG
, EFG_SIG_SET_OUTPATH
))
308 if (spis
->EVENT
==(long)EFG_SIG_SET_RISE
) ci
->BeforeTransitionState
=0, ci
->AfterTransitionState
=1;
309 else ci
->BeforeTransitionState
=1, ci
->AfterTransitionState
=0;
311 hdchain
= addchain(hdchain
,cone
);
314 if (!(spis
->START
&& spis
->SRCSIG
->TYPE
=='E'))
316 avt_errmsg(EFG_ERRMSG
, "001", AVT_FATAL
, spis
->critic_NAME
);
319 else hdchain
= addchain(hdchain
,NULL
);
327 /*****************************************************************************\
328 function efg_extract_fig()
330 drive le spice des signaux du .inf
331 \*****************************************************************************/
332 char *efg_get_fig_name(lofig_list
*lf
, char *buf
)
334 if (EFG_SET_FIG_NAME
==NULL
)
335 sprintf (buf
,"%s_ext",lf
->NAME
);
337 strcpy(buf
, EFG_SET_FIG_NAME
);
340 void efg_extract_fig (lofig_list
*lofig
,
341 lofig_list
**fig_ext
,
344 chain_list
**chaincone
,
345 chain_list
**chaininstance
,
346 chain_list
*loins2drv
, // usr instance to drv
347 chain_list
*lotrs2drv
, // usr lotrs to drv
348 chain_list
*locon2drv
, // usr external locon 2 drv
349 chain_list
*losig2drv
, // usr losig to drv
350 chain_list
*cone_onpath
, // accelerate search of cone
351 chain_list
*usrlist
, // pathsig list from user
352 int markfig
// allow to obtain patterns
358 efg_fullsiglist
* fullsiglist
= NULL
;
362 int create_local_onpath
, err
;
364 if (!lofig
|| (!spisig
&& !usrlist
)) return;
370 spisig
= efg_BuildSpiSigList (lofig
,usrlist
,NULL
,1,&err
,0);
371 spisig
= efg_AddLatchLoopFeebackCone(lofig
, cnsfig
, spisig
);
377 efg_get_fig_name(lofig
, buf
);
379 newfigname
= namealloc (buf
);
380 *fig_ext
= addlofig (newfigname
);
382 efg_createcontext ();
383 efg_setsrcfig2context ( lofig
);
384 efg_setdestfig2context ( *fig_ext
);
385 efg_setspisig2context ( spisig
);
387 if (chaincone
!= NULL
) *chaincone
= NULL
;
388 if (chaininstance
!= NULL
) *chaininstance
= NULL
;
392 /*****************************************************************************/
393 /* positionne les alimentations sur les signaux d'alims */
394 /*****************************************************************************/
395 efg_threat_alim ( lofig
, *fig_ext
, cnsfig
);
396 if ( !efg_get_vdd_on_destfig () ) {
397 avt_errmsg(EFG_ERRMSG
, "002", AVT_ERROR
);
398 //fprintf (stderr,"[EFG ERR] can't get vdd\n");
399 efg_FreeMarksOnExtFig (*fig_ext
);
400 efg_FreeMarksOnFig (lofig
);
402 if (*fig_ext
!= NULL
) dellofig ((*fig_ext
)->NAME
);
406 if ( !efg_get_vss_on_destfig () ) {
407 avt_errmsg(EFG_ERRMSG
, "003", AVT_ERROR
);
408 //fprintf (stderr,"[EFG ERR] can't get vss\n");
409 efg_FreeMarksOnExtFig (*fig_ext
);
410 efg_FreeMarksOnFig (lofig
);
412 if (*fig_ext
!= NULL
) dellofig ((*fig_ext
)->NAME
);
417 create_local_onpath
= 0 ;
418 if ( !cone_onpath
) {
419 create_local_onpath
= 1 ;
420 cone_onpath
= efg_getcone_onpath (spisig
,cnsfig
);
421 if (cone_onpath
&& cone_onpath
->DATA
==NULL
)
422 cone_onpath
=delchain(cone_onpath
,cone_onpath
);
426 /*****************************************************************************/
427 /* ouverture du fichier */
428 /*****************************************************************************/
431 if (spisig
!=NULL
&& spisig
->START
&& spisig
->END
)
433 efg_addlosig(*fig_ext
, spisig
->SRCSIG
, 1);
434 spisig
->SRCSIG
->USER
= addptype (spisig
->SRCSIG
->USER
, EFG_SIG_DRV
, (void *)1);
437 efg_MarkCnsfig (lofig
,*fig_ext
,cnsfig
,chaincone
,
438 chaininstance
,cone_onpath
);
440 /*****************************************************************************\
442 Construction de la figure extraite a deux niveaux de hierarchie :
444 le top level qui instancie les cellules de base
446 \*****************************************************************************/
447 if (lofig
->LOINS
!= NULL
&& !cnsfig
) {
448 fullsiglist
= efg_buildhierfullsig ( lofig
->NAME
, 1, NULL
, 1);
449 efg_buildlofig ( fullsiglist
);
450 efg_set_path_info ( fullsiglist
);
451 for (loins
= (*fig_ext
)->LOINS
; loins
; loins
= loins
->NEXT
)
452 efg_set_loins_rc_node (loins
);
453 if (chaininstance
!= NULL
)
454 *chaininstance
= efg_get_loins_on_path ();
455 efg_freechainfullsig( fullsiglist
);
458 /*****************************************************************************\
460 Traitement des objets (instances, transistors) a rajouter
462 \*****************************************************************************/
463 for (chain
= loins2drv
; chain
; chain
=chain
->NEXT
)
464 efg_addloins (*fig_ext
,(loins_list
*)chain
->DATA
,0);
465 for (chain
= lotrs2drv
; chain
; chain
=chain
->NEXT
) {
466 efg_addlotrs (*fig_ext
,(lotrs_list
*)chain
->DATA
,1);
467 efg_set_node_in_out_lotrs ((lotrs_list
*)chain
->DATA
);
469 for (chain
= locon2drv
; chain
; chain
=chain
->NEXT
) {
471 chain_list
*lofigchain
=NULL
,*chaincon
;
473 locon_list
*newlocon
,
475 *con
= (locon_list
*)chain
->DATA
;
477 for (loconx
= (*fig_ext
)->LOCON
; loconx
; loconx
=loconx
->NEXT
) {
478 if (efg_getlosigname (loconx
->SIG
) == efg_getlosigname (con
->SIG
))
482 sig
= efg_addlosig (*fig_ext
,con
->SIG
,1);
483 newlocon
= addlocon (*fig_ext
,con
->NAME
,sig
,con
->DIRECTION
);
484 if (con
->SIG
->PRCN
&& con
->SIG
->PRCN
->PWIRE
) {
485 ptype
= getptype (con
->SIG
->USER
,LOFIGCHAIN
);
487 lofigchain
= (chain_list
*)ptype
->DATA
;
488 for (chaincon
= lofigchain
; chaincon
; chaincon
=chaincon
->NEXT
) {
489 locon_list
*conx
= (locon_list
*)chaincon
->DATA
;
490 if (conx
->PNODE
!= NULL
) {
491 newlocon
->PNODE
= dupnumlst(conx
->PNODE
);
497 newlocon
->TYPE
= 'E';
500 for (chain
= losig2drv
; chain
; chain
=chain
->NEXT
) {
502 losig_list
*sig
= (losig_list
*)chain
->DATA
;
504 if ( (ptype
= getptype (sig
->USER
,LOFIGCHAIN
)) )
505 for (chainc
= (chain_list
*)ptype
->DATA
; chainc
; chainc
=chainc
->NEXT
) {
506 locon_list
*con
= (locon_list
*)chainc
->DATA
;
507 if (con
->TYPE
== 'T' || con
->TYPE
== 'I')
508 efg_add_lotrs_capa (*fig_ext
,con
,1);
513 lofigchain (*fig_ext
);
515 efg_report_extcon ( *fig_ext
, spisig
);
518 efg_FreeMarksOnExtFig (*fig_ext
);
519 efg_FreeMarksOnFig (lofig
);
522 if ( V_STR_TAB
[__EFG_SIG_ALIAS
].VALUE
)
523 efg_update_spisigname (spisig
);
524 if ( avt_getlibloglevel(LOGEFG
) > 0 ) {
525 for ( spis
= spisig
; spis
; spis
=spis
->NEXT
) {
526 avt_log(LOGEFG
,2,"SpiSig %s number %d\n",spis
->NAME
,spis
->NUM
);
528 avt_log(LOGEFG
,2," -> INCONRC = %s\n",spis
->INCONRC
);
529 if ( spis
->OUTCONRC
)
530 avt_log(LOGEFG
,2," -> OUTCONRC = %s\n",spis
->OUTCONRC
);
534 if( create_local_onpath
) {
535 freechain( cone_onpath
);
538 efg_correct_rc_nodes_based_on_rcx(spisig
);
541 /*****************************************************************************/
543 /* FUNCTION : efg_UpdateSigPtype */
545 /* Marque hierarchiquement les signaux des cellules. */
547 /* reporte egalement le nom le plus significatif du signal : le + haut nivo */
549 /*****************************************************************************/
550 void efg_UpdateSigPtype (lofig
,loconname
,insname
,context
,num
,slope
,
569 for (locon
= lofig
->LOCON
; locon
; locon
= locon
->NEXT
) {
570 if (locon
->NAME
== loconname
) {
572 if (lofig
->LOTRS
!= NULL
) {
573 if (context
!= NULL
) {
574 sprintf(buf
,"%s%c%s",context
,SEPAR
,insname
);
575 context
= namealloc(buf
);
576 efg_SetSigDrive (losig
,num
,slope
,num
==0?'Y':'N',sigend
,'N',context
,0);
579 ptype
= getptype(locon
->SIG
->USER
,LOFIGCHAIN
);
581 for (chain
= (chain_list
*)ptype
->DATA
; chain
;
582 chain
= chain
->NEXT
) {
583 locon_list
*locon
= (locon_list
*)chain
->DATA
;
584 if (locon
->TYPE
== 'I') {
585 loins
= (loins_list
*)locon
->ROOT
;
587 sprintf(buf
,"%s%c%s",context
,SEPAR
,insname
);
589 sprintf(buf
,"%s",loins
->INSNAME
);
590 name
= namealloc(buf
);
591 /* pour marquer les sig des instances egalement */
592 efg_SetSigDrive (locon
->SIG
,num
,slope
,num
==0?'Y':'N',sigend
,'N',name
,0);
594 getloadedlofig(loins
->FIGNAME
),
595 locon
->NAME
,loins
->INSNAME
,name
,
604 /*****************************************************************************/
606 /* FUNCTION : efg_SetSigDrive */
608 /* Marque les signaux du .inf */
610 /*****************************************************************************/
611 void efg_updateflag(losig_list
*ls
, int set
, long mask
)
614 if ((pt
=getptype(ls
->USER
,EFG_SIG_DRV
)) != NULL
)
617 pt
->DATA
=(void *)(((long)pt
->DATA
) | mask
);
619 pt
->DATA
=(void *)(((long)pt
->DATA
) & ~mask
);
623 void efg_SetSigDrive (losig_list
*losig
,int num
, char slope
,char sigstart
,char sigend
, char sigclk
, char *insname
, long flags
)
628 front
= (long)EFG_SIG_SET_RISE
;
630 front
= (long)EFG_SIG_SET_FALL
;
632 if (getptype(losig
->USER
,EFG_SIG_DRV
) == NULL
) {
633 losig
->USER
= addptype(losig
->USER
,
637 /* garde la compatibilite avec analyse a plat de la figure */
638 if (getptype (losig
->USER
,EFG_SIG_SET
) == NULL
) {
639 losig
->USER
= addptype (losig
->USER
,
644 if ( sigclk
=='Y' && getptype(losig
->USER
,EFG_SIG_CLK
) == NULL
) {
645 losig
->USER
= addptype (losig
->USER
,
650 /*------------- Numero du signal dans le .inf ----------------*/
651 losig
->USER
= efg_SetHierPtype (losig
->USER
,
657 /*------------- Info concernant le front du sig --------------*/
658 losig
->USER
= efg_SetHierPtype (losig
->USER
,
663 if (sigstart
== 'Y') {
664 losig
->USER
= efg_SetHierPtype (losig
->USER
,
669 /* garde la compatibilite avec analyse a plat de la figure */
670 if (getptype (losig
->USER
,EFG_SIG_BEG
) == NULL
) {
671 losig
->USER
= addptype (losig
->USER
,
678 losig
->USER
= efg_SetHierPtype (losig
->USER
,
683 /* garde la compatibilite avec analyse a plat de la figure */
684 if (getptype (losig
->USER
,EFG_SIG_END
) == NULL
) {
685 losig
->USER
= addptype (losig
->USER
,
692 /*****************************************************************************/
694 /* FUNCTION : efg_BuildPathSig */
696 /* Construit la liste des signaux presents sur le chemin a sensibiliser */
698 /* <=> equivalent a l'utilisation du .inf */
700 /* La fonction cree une list_list comme lors du traitement classique de */
701 /* tas lors de la lecture du .inf. */
703 /*****************************************************************************/
704 list_list
*efg_BuildPathSig (pathlist
,signame
,slope
)
709 list_list
*newlist
= NULL
;
715 signame
= namealloc (signame
);
716 leftunconcatname (signame
,&left
,&shortsigname
);
718 user
= addptype (NULL
,INF_UP
,shortsigname
);
719 else if (slope
== 'D')
720 user
= addptype (NULL
,INF_DOWN
,shortsigname
);
724 newlist
= mbkalloc(sizeof(struct list
)) ;
725 newlist
->NEXT
= NULL
;
726 newlist
->DATA
= shortsigname
;
727 newlist
->TYPE
= INF_LL_PATHSIGS
;
728 newlist
->USER
= user
;
730 if (pathlist
!= NULL
) {
731 for (list
= pathlist
; list
->NEXT
; list
= list
->NEXT
);
732 list
->NEXT
= newlist
;
740 /*****************************************************************************/
742 /* FUNCTION : efg_FreePathList */
744 /*****************************************************************************/
745 void efg_FreePathList (pathlist
)
750 while (pathlist
!= NULL
) {
752 pathlist
= pathlist
->NEXT
;
753 freeptype (list
->USER
);
758 /*****************************************************************************/
760 /* FUNCTION : efg_FreeMarksOnExtFig */
762 /* Supprime tous les marquages de la figure extraite. */
764 /*****************************************************************************/
765 void efg_FreeMarksOnExtFig (lofig_list
*fig_ext
)
767 efg_DelHierSigPtype (fig_ext
);
770 /*****************************************************************************/
772 /* FUNCTION : efg_FreeMarksOnExtFig */
774 /* Supprime tous les marquages de la figure extraite. */
776 /*****************************************************************************/
777 void efg_FreeMarksOnFig (lofig_list
*fig
)
779 efg_DelHierSigPtype (fig
);
782 /*****************************************************************************/
784 /* FUNCTION : efg_con_is_on_path */
786 /* retourne 'Y' si le cone est dans la liste, 'N' sinon */
788 /*****************************************************************************/
789 char efg_con_is_on_path (chain_list
*cone_onpath
,cone_list
*cone
)
794 for (chain
= cone_onpath
; chain
; chain
= chain
->NEXT
) {
795 if ((cone_list
*)chain
->DATA
== cone
) {
803 /*****************************************************************************\
804 FUNCTION : efg_add_instance
805 \*****************************************************************************/
806 void efg_add_instance (chain_list
*chaincone
,chain_list
**chaininstance
)
809 ptype_list
*ptype
,*sigbeg
,*sigend
;
810 chain_list
*chainc
,*chain
;
816 if (!chaincone
) return;
817 for (chainc
= chaincone
; chainc
; chainc
=chainc
->NEXT
) {
818 sigbeg
= sigend
= NULL
;
819 cone
= (cone_list
*)chainc
->DATA
;
820 if (!cone
|| !(losig
= efg_getlosigcone (cone
)))
822 sigbeg
= getptype (losig
->USER
,EFG_SIG_BEG
);
823 sigend
= getptype (losig
->USER
,EFG_SIG_END
);
824 ptype
= getptype (losig
->USER
,LOFIGCHAIN
);
825 for (chain
= (chain_list
*)ptype
->DATA
; chain
; chain
=chain
->NEXT
) {
826 locon
= (locon_list
*)chain
->DATA
;
827 if (locon
->TYPE
== 'I') {
828 loins
= (loins_list
*)locon
->ROOT
;
829 if ((context
= efg_get_ins_ctxt (loins
))) {
830 if (efg_is_loins_to_copy (loins
) && efg_loins_is2analyse (context
)) {
831 efg_addloins (EFGCONTEXT
->DESTFIG
,loins
,0);
832 if (chaininstance
!= NULL
&& !sigbeg
&& !sigend
)
833 *chaininstance
= addchain (*chaininstance
,loins
);
841 /*****************************************************************************\
842 FUNC : efg_report_rc_lotrs
843 \*****************************************************************************/
844 void efg_report_rc_lotrs ( lofig_list
*fig_ext
,locon_list
*con
)
848 lotrs_list
*corresplotrs
,*lotrs
;
850 lotrs
= (lotrs_list
*)con
->ROOT
;
851 ptype
= getptype (lotrs
->USER
,EFG_CORRESP
);
852 if ( !ptype
) return;
853 corresplotrs
= (lotrs_list
*)ptype
->DATA
;
855 if ( con
== lotrs
->GRID
) {
856 if (getptype (lotrs
->GRID
->SIG
->USER
,EFG_SIG_DRV
) &&
857 efg_is_wire_on_sig (lotrs
->GRID
->SIG
) == 1 &&
858 (spisig
= efg_GetSpiSig (EFGCONTEXT
->SPISIG
,efg_getlosigname(lotrs
->GRID
->SIG
))) != NULL
) {
859 if (lotrs
->GRID
->PNODE
&&
860 !efg_is_conname_ext (fig_ext
,lotrs
->GRID
->SIG
,lotrs
->GRID
->PNODE
->DATA
) ) {
861 efg_SetSpiSigLoconRc (spisig
, concatname(corresplotrs
->TRNAME
,lotrs
->GRID
->NAME
), 'O',lotrs
);
863 // to avoid shift result if incorrect rc network is detected
864 if (lotrs
->GRID
->PNODE
&& !efg_GetSpiSigLoconRc(spisig
,'O') )
865 efg_SetSpiSigLoconRc (spisig
, concatname(corresplotrs
->TRNAME
,lotrs
->GRID
->NAME
),'O',lotrs
);
869 else if ( con
== lotrs
->DRAIN
) {
870 if (getptype (lotrs
->DRAIN
->SIG
->USER
,EFG_SIG_DRV
) &&
871 efg_is_wire_on_sig (lotrs
->DRAIN
->SIG
) == 1 &&
872 (spisig
= efg_GetSpiSig (EFGCONTEXT
->SPISIG
,efg_getlosigname(lotrs
->DRAIN
->SIG
))) != NULL
) {
873 if (lotrs
->DRAIN
->PNODE
&&
874 !efg_is_conname_ext (fig_ext
,lotrs
->DRAIN
->SIG
,lotrs
->DRAIN
->PNODE
->DATA
) ) {
875 efg_SetSpiSigLoconRc (spisig
, concatname(corresplotrs
->TRNAME
,lotrs
->DRAIN
->NAME
),'I',lotrs
);
876 if ( !efg_GetSpiSigLoconRc(spisig
,'I') )
877 efg_SetSpiSigLoconRc (spisig
, concatname(corresplotrs
->TRNAME
,lotrs
->DRAIN
->NAME
),'I',lotrs
);
879 // to avoid shift result if incorrect rc network is detected
880 if (lotrs
->DRAIN
->PNODE
&& !efg_GetSpiSigLoconRc(spisig
,'I') )
881 efg_SetSpiSigLoconRc (spisig
, concatname(corresplotrs
->TRNAME
,lotrs
->DRAIN
->NAME
),'I',lotrs
);
885 if (getptype (lotrs
->SOURCE
->SIG
->USER
,EFG_SIG_DRV
) &&
886 efg_is_wire_on_sig (lotrs
->SOURCE
->SIG
) == 1 &&
887 (spisig
= efg_GetSpiSig (EFGCONTEXT
->SPISIG
,efg_getlosigname(lotrs
->SOURCE
->SIG
))) != NULL
) {
888 if (lotrs
->SOURCE
->PNODE
&&
889 !efg_is_conname_ext (fig_ext
,lotrs
->SOURCE
->SIG
,lotrs
->SOURCE
->PNODE
->DATA
) ) {
890 efg_SetSpiSigLoconRc (spisig
, concatname(corresplotrs
->TRNAME
,lotrs
->SOURCE
->NAME
),'I',lotrs
);
892 // to avoid shift result if incorrect rc network is detected
893 if ( lotrs
->SOURCE
->PNODE
&& !efg_GetSpiSigLoconRc(spisig
,'I') )
894 efg_SetSpiSigLoconRc (spisig
, concatname(corresplotrs
->TRNAME
,lotrs
->SOURCE
->NAME
),'I',lotrs
);
899 /*****************************************************************************\
901 FUNCTION : efg_addlotrs_conefct
905 - add a fonctionnal trs
906 - add a non fonctionnal trs
907 - add an equivalent capa
909 \*****************************************************************************/
910 void efg_addlotrs_conefct (lofig_list
*fig_ext
, lotrs_list
*lotrs
,
911 locon_list
*con
, int index
, int cone_is_fct
)
914 efg_addlotrs (fig_ext
,lotrs
,index
);
916 efg_add_lotrs_capa (fig_ext
,con
,index
);
919 /*****************************************************************************/
921 /* FUNCTION : efg_MarkCnsfig */
923 /* Analyse la cnsfig par rapport au chemin a sensibilier */
925 /*****************************************************************************/
927 #define TEMPMARKEFGPARALLEL 0xfab80916
929 static void efg_mark_parallel_path(chain_list
*conelist
)
931 cone_list
*cn
, *cn0
, *ptinputcone
;
936 while (conelist
!=NULL
)
938 cn
=(cone_list
*)conelist
->DATA
;
940 for (ptinedge
= cn
->INCONE
; ptinedge
; ptinedge
= ptinedge
->NEXT
)
942 if ((ptinedge
->TYPE
& CNS_VDD
) != 0) continue;
943 if ((ptinedge
->TYPE
& CNS_VSS
) != 0) continue;
944 if ((ptinedge
->TYPE
& CNS_BLEEDER
) != 0) continue;
945 if ((ptinedge
->TYPE
& CNS_EXT
) != 0) continue;
947 ptinputcone
= ptinedge
->UEDGE
.CONE
;
948 ls
= efg_getlosigcone(ptinputcone
) ;
950 if (getptype(ls
->USER
,EFG_SIG_SET
)==NULL
&& (ls
=gsp_FindSimpleCorrelationForToBeStuckConnectors(ptinputcone
, 0, 10, &tog
,1,&res
))!=NULL
)
952 res
=addchain(res
, ptinputcone
);
955 cn0
=(cone_list
*)res
->DATA
;
956 if (getptype(cn0
->USER
, TEMPMARKEFGPARALLEL
)==NULL
)
958 avt_log(LOGEFG
,2,"Parallel path ('%s' -> '%s') : cone '%s' added to spicedeck\n",getsigname(ls
), cn
->NAME
, cn0
->NAME
);
959 cn0
->USER
=addptype(cn0
->USER
, TEMPMARKEFGPARALLEL
, 0);
961 res
=delchain(res
,res
);
965 conelist
=conelist
->NEXT
;
969 void efg_MarkCnsfig (lofig_list
*lofig
,lofig_list
*fig_ext
,cnsfig_list
*cnsfig
,
970 chain_list
**chaincone
, chain_list
**chaininstance
,
971 chain_list
*cone_onpath
)
973 lotrs_list
*lotrs
, *swlotrs
;
975 losig_list
*losig
, *srcsig
,*nxtsig
;
977 branch_list
*branch
[3] ;
982 ptype_list
*ptype
, *pt
;
984 chain_list
*headlotrs
, *stop
;
985 locon_list
*othercon
;
987 if((cnsfig
!= NULL
) && (fig_ext
!= NULL
))
989 for ( locon
= lofig
->LOCON
; locon
; locon
= locon
->NEXT
)
991 if ( getptype (locon
->SIG
->USER
,EFG_SIG_DRV
) )
992 efg_addlocon (fig_ext
,locon
,1);
995 efg_mark_parallel_path(cone_onpath
);
997 // 1ere passe pour rajoute EFG_SIG_DRV pour tous les signaux des cones sur chemin
998 for(cone
= cnsfig
->CONE
; cone
!= NULL
; cone
= cone
->NEXT
)
1000 losig
= efg_getlosigcone(cone
) ;
1001 if (getptype(cone
->USER
, TEMPMARKEFGPARALLEL
)==NULL
&& (cone_onpath
!= NULL
) &&
1002 (efg_con_is_on_path (cone_onpath
,cone
) == 'N'))
1005 if (getptype(cone
->USER
, TEMPMARKEFGPARALLEL
)!=NULL
)
1007 else if ( getptype(losig
->USER
,EFG_SIG_SET
))
1008 cone_is_fct
= efg_cone_is_fonctionnal (cone
,0);
1011 branch
[0] = cone
->BRVDD
;
1012 branch
[1] = cone
->BRVSS
;
1013 branch
[2] = cone
->BREXT
;
1015 for(i
= 0 ; i
< 3 ; i
++)
1017 for(; branch
[i
] != NULL
; branch
[i
] = branch
[i
]->NEXT
)
1019 for(link
= branch
[i
]->LINK
; link
!= NULL
; link
= link
->NEXT
)
1021 if((link
->TYPE
& (CNS_IN
| CNS_INOUT
)) == 0)
1023 lotrs
= link
->ULINK
.LOTRS
;
1024 headlotrs
= addchain( NULL
, lotrs
);
1025 ptype
= getptype( lotrs
->USER
, CNS_SWITCH
) ;
1027 headlotrs
= addchain( headlotrs
, ptype
->DATA
);
1029 for( chain
= headlotrs
; chain
; chain
= chain
->NEXT
) {
1030 lotrs
= (lotrs_list
*)chain
->DATA
;
1031 if((getptype(lotrs
->SOURCE
->SIG
->USER
,EFG_SIG_DRV
) == NULL
) &&
1032 (getptype(lotrs
->SOURCE
->SIG
->USER
,EFG_SIG_ALIM
) == NULL
)) {
1033 lotrs
->SOURCE
->SIG
->USER
= addptype (lotrs
->SOURCE
->SIG
->USER
,
1036 avt_log(LOGEFG
,2,"Sig %s marked as EFG_SIG_DRV\n",efg_getlosigname(lotrs
->SOURCE
->SIG
));
1038 if((getptype(lotrs
->DRAIN
->SIG
->USER
,EFG_SIG_DRV
) == NULL
) &&
1039 (getptype(lotrs
->DRAIN
->SIG
->USER
,EFG_SIG_ALIM
) == NULL
)) {
1040 lotrs
->DRAIN
->SIG
->USER
= addptype (lotrs
->DRAIN
->SIG
->USER
,
1043 avt_log(LOGEFG
,2,"Sig %s marked as EFG_SIG_DRV\n",efg_getlosigname(lotrs
->DRAIN
->SIG
));
1045 if((getptype(lotrs
->GRID
->SIG
->USER
,EFG_SIG_DRV
) == NULL
) &&
1046 (getptype(lotrs
->GRID
->SIG
->USER
,EFG_SIG_ALIM
) == NULL
)) {
1047 lotrs
->GRID
->SIG
->USER
= addptype (lotrs
->GRID
->SIG
->USER
,
1050 avt_log(LOGEFG
,2,"Sig %s marked as EFG_SIG_DRV\n",efg_getlosigname(lotrs
->GRID
->SIG
));
1053 freechain(headlotrs
);
1061 // rajoute les transistors dans la figure extraite
1062 for(cone
= cnsfig
->CONE
; cone
!= NULL
; cone
= cone
->NEXT
)
1064 losig
= efg_getlosigcone(cone
) ;
1065 if ( losig
&& !getptype (losig
->USER
,EFG_SIG2CONE
))
1066 losig
->USER
= addptype (losig
->USER
,EFG_SIG2CONE
,cone
);
1067 if (getptype(cone
->USER
, TEMPMARKEFGPARALLEL
)==NULL
&& (cone_onpath
!= NULL
) &&
1068 (efg_con_is_on_path (cone_onpath
,cone
) == 'N'))
1072 if (getptype(cone
->USER
, TEMPMARKEFGPARALLEL
)!=NULL
)
1074 else if ( getptype(losig
->USER
,EFG_SIG_SET
) )
1075 cone_is_fct
= efg_cone_is_fonctionnal (cone
,0);
1076 branch
[0] = cone
->BRVDD
;
1077 branch
[1] = cone
->BRVSS
;
1078 branch
[2] = cone
->BREXT
;
1080 spisig
= efg_GetSpiSig ( EFGCONTEXT
->SPISIG
, cone
->NAME
);
1082 for(i
= 0 ; i
< 3 ; i
++)
1084 for(; branch
[i
] != NULL
; branch
[i
] = branch
[i
]->NEXT
)
1086 for(link
= branch
[i
]->LINK
; link
!= NULL
; link
= link
->NEXT
)
1088 if((link
->TYPE
& (CNS_IN
| CNS_INOUT
)) == 0)
1090 lotrs
= link
->ULINK
.LOTRS
;
1091 headlotrs
= addchain( NULL
, lotrs
);
1093 ptype
= getptype( lotrs
->USER
, CNS_SWITCH
) ;
1095 swlotrs
=(lotrs_list
*)ptype
->DATA
;
1096 headlotrs
= addchain( headlotrs
, swlotrs
);
1099 if ((ptype
=getptype(lotrs
->USER
, MBK_TRANS_PARALLEL
))!=NULL
) {
1100 for (chain
=(chain_list
*)ptype
->DATA
; chain
!=NULL
; chain
=chain
->NEXT
)
1101 if (chain
->DATA
!=lotrs
) headlotrs
= addchain( headlotrs
, chain
->DATA
);
1103 if (swlotrs
!=NULL
&& (ptype
=getptype(swlotrs
->USER
, MBK_TRANS_PARALLEL
))!=NULL
) {
1104 for (chain
=(chain_list
*)ptype
->DATA
; chain
!=NULL
; chain
=chain
->NEXT
)
1105 if (chain
->DATA
!=swlotrs
) headlotrs
= addchain( headlotrs
, chain
->DATA
);
1108 for( chain
= headlotrs
; chain
; chain
= chain
->NEXT
) {
1109 lotrs
= (lotrs_list
*)chain
->DATA
;
1111 if ( cone_is_fct
) efg_addlotrs (fig_ext
,lotrs
,1);
1112 if((getptype(lotrs
->DRAIN
->SIG
->USER
,EFG_SIG_DRV
) != NULL
) &&
1113 (getptype(lotrs
->DRAIN
->SIG
->USER
,EFG_SIG_ALIM
) == NULL
)) {
1115 //efg_addlotrs_conefct (fig_ext, lotrs, lotrs->DRAIN, 1, cone_is_fct);
1116 efg_add_lotrs_capa (fig_ext
,lotrs
->DRAIN
,1);
1118 if((getptype(lotrs
->SOURCE
->SIG
->USER
,EFG_SIG_DRV
) != NULL
) &&
1119 (getptype(lotrs
->SOURCE
->SIG
->USER
,EFG_SIG_ALIM
) == NULL
)) {
1120 //efg_addlotrs_conefct (fig_ext, lotrs, lotrs->SOURCE, 1, cone_is_fct);
1121 efg_add_lotrs_capa (fig_ext
,lotrs
->SOURCE
,1);
1124 if((getptype(lotrs
->GRID
->SIG
->USER
,EFG_SIG_DRV
) != NULL
) &&
1125 (getptype(lotrs
->GRID
->SIG
->USER
,EFG_SIG_ALIM
) == NULL
)) {
1127 //efg_addlotrs_conefct (fig_ext, lotrs, lotrs->GRID, 1, cone_is_fct);
1128 efg_add_lotrs_capa (fig_ext
,lotrs
->GRID
,1);
1131 freechain( headlotrs
);
1135 locon
= link
->ULINK
.LOCON
;
1136 if((getptype(locon
->SIG
->USER
,EFG_SIG_DRV
) != NULL
) &&
1137 (getptype(locon
->SIG
->USER
,EFG_SIG_ALIM
) == NULL
))
1145 if (getptype(cone
->USER
, TEMPMARKEFGPARALLEL
)!=NULL
)
1147 EFGCONTEXT
->ALLADDEDCONES
=addchain(EFGCONTEXT
->ALLADDEDCONES
, cone
);
1148 avt_log(LOGEFG
,2,"Cone %s ADDED (//)\n",cone
->NAME
);
1149 cone_onpath
=addchain(cone_onpath
, cone
);
1151 else if (getptype(losig
->USER
,EFG_SIG_SET
) != NULL
)
1153 if (spisig
!=NULL
&& spisig
->NUM
==-1) {
1154 *chaincone
= addchain(*chaincone
,cone
) ;
1155 avt_log(LOGEFG
,2,"Cone %s ADDED (out of path feedback loop)\n",cone
->NAME
);
1156 EFGCONTEXT
->ALLADDEDCONES
=addchain(EFGCONTEXT
->ALLADDEDCONES
, cone
);
1158 else if (chaincone
!= NULL
&& !getptype (losig
->USER
,EFG_SIG_BEG
) )
1162 *chaincone
= addchain(*chaincone
,cone
) ;
1163 avt_log(LOGEFG
,2,"Cone %s ADDED\n",cone
->NAME
);
1164 EFGCONTEXT
->ALLADDEDCONES
=addchain(EFGCONTEXT
->ALLADDEDCONES
, cone
);
1168 if(getptype(losig
->USER
,EFG_SIG_CONE
) == NULL
)
1169 losig
->USER
= addptype(losig
->USER
,EFG_SIG_CONE
,NULL
) ;
1172 if ( getptype (cone
->USER
, EFG_CONE_FCT
) )
1173 cone
->USER
= delptype ( cone
->USER
, EFG_CONE_FCT
);
1176 // report RC in (Drain/Source) and RC out (Gate) on Spisig
1177 for ( chain
= cone_onpath
; chain
; chain
=chain
->NEXT
)
1179 cone
= (cone_list
*)chain
->DATA
;
1181 branch
[0] = cone
->BRVDD
;
1182 branch
[1] = cone
->BRVSS
;
1183 branch
[2] = cone
->BREXT
;
1185 for(i
= 0 ; i
< 3 ; i
++)
1187 for(; branch
[i
] != NULL
; branch
[i
] = branch
[i
]->NEXT
)
1189 for(link
= branch
[i
]->LINK
; link
!= NULL
; link
= link
->NEXT
)
1191 if((link
->TYPE
& (CNS_IN
| CNS_INOUT
)) == 0)
1193 lotrs
= link
->ULINK
.LOTRS
;
1194 if((getptype(lotrs
->GRID
->SIG
->USER
,EFG_SIG_SET
) != NULL
) &&
1195 (getptype(lotrs
->GRID
->SIG
->USER
,EFG_SIG_ALIM
) == NULL
)) {
1196 efg_report_rc_lotrs ( fig_ext
,lotrs
->GRID
);
1198 if((getptype(lotrs
->DRAIN
->SIG
->USER
,EFG_SIG_SET
) != NULL
) &&
1199 (getptype(lotrs
->DRAIN
->SIG
->USER
,EFG_SIG_ALIM
) == NULL
)) {
1200 efg_report_rc_lotrs ( fig_ext
,lotrs
->DRAIN
);
1202 if((getptype(lotrs
->SOURCE
->SIG
->USER
,EFG_SIG_SET
) != NULL
) &&
1203 (getptype(lotrs
->SOURCE
->SIG
->USER
,EFG_SIG_ALIM
) == NULL
)) {
1204 efg_report_rc_lotrs ( fig_ext
,lotrs
->SOURCE
);
1212 while (cone_onpath
!=stop
) cone_onpath
=delchain(cone_onpath
, cone_onpath
);
1214 // zinaps: ptype non liberes correctement a cause de la recursivite
1215 // dans la fonction qui les positionnent o_O
1216 for(cone
= cnsfig
->CONE
; cone
!= NULL
; cone
= cone
->NEXT
)
1218 if ( getptype (cone
->USER
, EFG_CONE_FCT
) )
1219 cone
->USER
= delptype ( cone
->USER
, EFG_CONE_FCT
);
1222 if (chaincone
!= NULL
&& *chaincone
!= NULL
&& lofig
->LOINS
!=NULL
)
1224 efg_set_ins_ctxt (lofig
,lofig
->NAME
);
1225 efg_add_instance (*chaincone
,chaininstance
);
1228 lofigchain( fig_ext
);
1229 for (losig
= fig_ext
->LOSIG
; losig
; losig
=nxtsig
)
1232 nxtsig
=losig
->NEXT
;
1233 srcsig
= efg_get_org_sig ( losig
);
1234 if (srcsig
!=NULL
&& (ptype
=getptype(srcsig
->USER
, EFG_SIG_DRV
))!=NULL
&& ptype
->DATA
==NULL
)
1236 ptype
= getptype ( losig
->USER
, LOFIGCHAIN
);
1237 if ( !ptype
->DATA
|| !((chain_list
*)ptype
->DATA
)->NEXT
) {
1238 if ((chain
= (chain_list
*)ptype
->DATA
))
1239 locon
= (locon_list
*)(chain
->DATA
);
1240 if ( losig
!= efg_get_vss_on_destfig () && losig
!= efg_get_vdd_on_destfig () )
1241 if ( !locon
|| (locon
&& locon
->TYPE
!= 'T' )) {
1242 avt_log(LOGEFG
,2,"Sig %s deleted...\n",efg_getlosigname(losig
));
1243 efg_dellosig( fig_ext
, losig
);
1245 avt_log(LOGEFG
,2,"locon %s deleted...\n",locon
->NAME
);
1246 dellocon (fig_ext
,locon
->NAME
);
1253 if ( !srcsig
) continue;
1254 if ( efg_SigIsAlim (srcsig
) == 'Y' ) continue;
1255 ptype
= getptype ( srcsig
->USER
, LOFIGCHAIN
);
1257 for ( chain
= (chain_list
*)ptype
->DATA
; chain
; chain
=chain
->NEXT
)
1258 efg_add_lotrs_capa (fig_ext
,(locon_list
*)chain
->DATA
,1);
1261 efg_rebuild_ctc( fig_ext
);
1263 for ( locon
= fig_ext
->LOCON
; locon
; locon
=othercon
) {
1264 othercon
=locon
->NEXT
;
1266 ptype
= getptype ( locon
->SIG
->USER
, LOFIGCHAIN
);
1267 if ( locon
->SIG
!= efg_get_vss_on_destfig () && locon
->SIG
!= efg_get_vdd_on_destfig () )
1268 if ( !ptype
->DATA
|| !((chain_list
*)ptype
->DATA
)->NEXT
) {
1269 avt_log(LOGEFG
,2,"Sig %s and Con %s deleted...\n",
1270 efg_getlosigname(locon
->SIG
),locon
->NAME
);
1271 efg_dellosig (fig_ext
,locon
->SIG
);
1272 dellocon (fig_ext
,locon
->NAME
);
1277 void efg_dellosig( lofig_list
*lofig
, losig_list
*losig
)
1280 losig_list
*sigsrc
;
1282 ptype
= getptype( losig
->USER
,EFG_CORRESP
);
1284 sigsrc
= (losig_list
*)ptype
->DATA
;
1285 losig
->USER
= delptype( losig
->USER
,EFG_CORRESP
);
1286 ptype
= getptype( sigsrc
->USER
, EFG_CORRESP
);
1288 sigsrc
->USER
= delptype( sigsrc
->USER
,EFG_CORRESP
);
1291 dellosig( lofig
, losig
->INDEX
);