00001
00019 #ifdef __linux__
00020 #include <libgen.h>
00021 #endif
00022
00023 #include "mapperInt.h"
00024
00028
00029 static int Map_LibraryReadFileTree( Map_SuperLib_t * pLib, FILE * pFile, char *pFileName );
00030 static Map_Super_t * Map_LibraryReadGateTree( Map_SuperLib_t * pLib, char * pBuffer, int Number, int nVars );
00031 static int Map_LibraryDeriveGateInfo( Map_SuperLib_t * pLib, st_table * tExcludeGate );
00032 static void Map_LibraryAddFaninDelays( Map_SuperLib_t * pLib, Map_Super_t * pGate, Map_Super_t * pFanin, Mio_Pin_t * pPin );
00033 static int Map_LibraryGetMaxSuperPi_rec( Map_Super_t * pGate );
00034 static unsigned Map_LibraryGetGateSupp_rec( Map_Super_t * pGate );
00035
00036
00037 extern const int s_MapFanoutLimits[10] = { 1, 10, 5, 2, 1, 1, 1 };
00038
00042
00054 int Map_LibraryReadTree( Map_SuperLib_t * pLib, char * pFileName, char * pExcludeFile )
00055 {
00056 FILE * pFile;
00057 int Status, num;
00058 Abc_Frame_t * pAbc;
00059 st_table * tExcludeGate = 0;
00060
00061
00062 assert( pLib->pGenlib == NULL );
00063 pFile = Io_FileOpen( pFileName, "open_path", "r", 1 );
00064
00065 if ( pFile == NULL )
00066 {
00067 printf( "Cannot open input file \"%s\".\n", pFileName );
00068 return 0;
00069 }
00070
00071 if ( pExcludeFile )
00072 {
00073 pAbc = Abc_FrameGetGlobalFrame();
00074
00075 tExcludeGate = st_init_table(strcmp, st_strhash);
00076 if ( (num = Mio_LibraryReadExclude( pAbc, pExcludeFile, tExcludeGate )) == -1 )
00077 {
00078 st_free_table( tExcludeGate );
00079 tExcludeGate = 0;
00080 return 0;
00081 }
00082
00083 fprintf ( Abc_FrameReadOut( pAbc ), "Read %d gates from exclude file\n", num );
00084 }
00085
00086 Status = Map_LibraryReadFileTree( pLib, pFile, pFileName );
00087 fclose( pFile );
00088 if ( Status == 0 )
00089 return 0;
00090
00091 return Map_LibraryDeriveGateInfo( pLib, tExcludeGate );
00092 }
00093
00094
00106 int Map_LibraryReadFileTree( Map_SuperLib_t * pLib, FILE * pFile, char *pFileName )
00107 {
00108 ProgressBar * pProgress;
00109 char pBuffer[5000], pLibFile[5000];
00110 FILE * pFileGen;
00111 Map_Super_t * pGate;
00112 char * pTemp = 0, * pLibName;
00113 int nCounter, k, i;
00114
00115
00116 while ( fgets( pBuffer, 5000, pFile ) != NULL )
00117 {
00118
00119 for ( pTemp = pBuffer; *pTemp == ' ' || *pTemp == '\r' || *pTemp == '\n'; pTemp++ );
00120
00121 if ( *pTemp != 0 && *pTemp != '#' )
00122 break;
00123 }
00124
00125
00126 pLibName = strtok( pTemp, " \t\r\n" );
00127
00128 if ( strcmp( pLibName, "GATE" ) == 0 )
00129 {
00130 printf( "The input file \"%s\" looks like a GENLIB file and not a supergate library file.\n", pLib->pName );
00131 return 0;
00132 }
00133
00134
00135
00136 #ifdef __linux__
00137 snprintf( pLibFile, 5000, "%s/%s", dirname(strdup(pFileName)), pLibName );
00138 #else
00139 {
00140 char * pStr;
00141 strcpy( pLibFile, pFileName );
00142 pStr = pLibFile + strlen(pBuffer) - 1;
00143 while ( pStr > pLibFile && *pStr != '\\' && *pStr != '/' )
00144 pStr--;
00145 if ( pStr == pLibFile )
00146 strcpy( pLibFile, pLibName );
00147 else
00148 sprintf( pStr, "/%s", pLibName );
00149 }
00150 #endif
00151
00152 pFileGen = Io_FileOpen( pLibFile, "open_path", "r", 1 );
00153
00154 if ( pFileGen == NULL )
00155 {
00156 printf( "Cannot open the GENLIB file \"%s\".\n", pLibFile );
00157 return 0;
00158 }
00159 fclose( pFileGen );
00160
00161
00162 pLib->pGenlib = Mio_LibraryRead( Abc_FrameGetGlobalFrame(), pLibFile, 0, 0 );
00163 if ( pLib->pGenlib == NULL )
00164 {
00165 printf( "Cannot read GENLIB file \"%s\".\n", pLibFile );
00166 return 0;
00167 }
00168
00169
00170 fscanf( pFile, "%d\n", &pLib->nVarsMax );
00171 if ( pLib->nVarsMax < 2 || pLib->nVarsMax > 10 )
00172 {
00173 printf( "Suspicious number of variables (%d).\n", pLib->nVarsMax );
00174 return 0;
00175 }
00176
00177
00178 fscanf( pFile, "%d\n", &pLib->nSupersReal );
00179 if ( pLib->nSupersReal < 1 || pLib->nSupersReal > 10000000 )
00180 {
00181 printf( "Suspicious number of gates (%d).\n", pLib->nSupersReal );
00182 return 0;
00183 }
00184
00185
00186 fscanf( pFile, "%d\n", &pLib->nLines );
00187 if ( pLib->nLines < 1 || pLib->nLines > 10000000 )
00188 {
00189 printf( "Suspicious number of lines (%d).\n", pLib->nLines );
00190 return 0;
00191 }
00192
00193
00194 pLib->ppSupers = ALLOC( Map_Super_t *, pLib->nLines + 10000 );
00195
00196
00197 for ( i = 0; i < pLib->nVarsMax; i++ )
00198 {
00199
00200 pGate = (Map_Super_t *)Extra_MmFixedEntryFetch( pLib->mmSupers );
00201 memset( pGate, 0, sizeof(Map_Super_t) );
00202
00203 pGate->Num = i;
00204
00205 pGate->uTruth[0] = pLib->uTruths[i][0];
00206 pGate->uTruth[1] = pLib->uTruths[i][1];
00207
00208 for ( k = 0; k < pLib->nVarsMax; k++ )
00209 {
00210 pGate->tDelaysR[k].Rise = pGate->tDelaysR[k].Fall = MAP_NO_VAR;
00211 pGate->tDelaysF[k].Rise = pGate->tDelaysF[k].Fall = MAP_NO_VAR;
00212 }
00213
00214 pGate->tDelaysR[i].Rise = 0.0;
00215 pGate->tDelaysF[i].Fall = 0.0;
00216
00217 pLib->ppSupers[i] = pGate;
00218 }
00219
00220
00221 nCounter = pLib->nVarsMax;
00222 pProgress = Extra_ProgressBarStart( stdout, pLib->nLines );
00223 while ( fgets( pBuffer, 5000, pFile ) != NULL )
00224 {
00225 for ( pTemp = pBuffer; *pTemp == ' ' || *pTemp == '\r' || *pTemp == '\n'; pTemp++ );
00226 if ( pTemp[0] == '\0' )
00227 continue;
00228
00229
00230
00231
00232
00233
00234
00235 pGate = Map_LibraryReadGateTree( pLib, pTemp, nCounter, pLib->nVarsMax );
00236 if ( pGate == NULL )
00237 {
00238 Extra_ProgressBarStop( pProgress );
00239 return 0;
00240 }
00241 pLib->ppSupers[nCounter++] = pGate;
00242
00243
00244
00245 Extra_ProgressBarUpdate( pProgress, nCounter, NULL );
00246 }
00247 Extra_ProgressBarStop( pProgress );
00248 if ( nCounter != pLib->nLines )
00249 printf( "The number of lines read (%d) is different what the file says (%d).\n", nCounter, pLib->nLines );
00250 pLib->nSupersAll = nCounter;
00251
00252 nCounter = 0;
00253 for ( k = 0; k < pLib->nLines; k++ )
00254 nCounter += pLib->ppSupers[k]->fSuper;
00255 if ( nCounter != pLib->nSupersReal )
00256 printf( "The number of gates read (%d) is different what the file says (%d).\n", nCounter, pLib->nSupersReal );
00257 pLib->nSupersReal = nCounter;
00258 return 1;
00259 }
00260
00272 Map_Super_t * Map_LibraryReadGateTree( Map_SuperLib_t * pLib, char * pBuffer, int Number, int nVarsMax )
00273 {
00274 Map_Super_t * pGate;
00275 char * pTemp;
00276 int i, Num;
00277
00278
00279 pGate = (Map_Super_t *)Extra_MmFixedEntryFetch( pLib->mmSupers );
00280 memset( pGate, 0, sizeof(Map_Super_t) );
00281
00282
00283 pGate->Num = Number;
00284
00285
00286 pTemp = strtok( pBuffer, " " );
00287 if ( pTemp[0] == '*' )
00288 {
00289 pGate->fSuper = 1;
00290 pTemp = strtok( NULL, " " );
00291 }
00292
00293
00294 pGate->pRoot = Mio_LibraryReadGateByName( pLib->pGenlib, pTemp );
00295 if ( pGate->pRoot == NULL )
00296 {
00297 printf( "Cannot read the root gate names %s.\n", pTemp );
00298 return NULL;
00299 }
00300
00301 pGate->nFanLimit = s_MapFanoutLimits[ Mio_GateReadInputs(pGate->pRoot) ];
00302
00303
00304 for ( i = 0; ( pTemp = strtok( NULL, " \n\0" ) ); i++ )
00305 {
00306 if ( pTemp[0] == '#' )
00307 break;
00308 if ( i == nVarsMax )
00309 {
00310 printf( "There are too many entries on the line.\n" );
00311 return NULL;
00312 }
00313 Num = atoi(pTemp);
00314 if ( Num < 0 )
00315 {
00316 printf( "The number of a child supergate is negative.\n" );
00317 return NULL;
00318 }
00319 if ( Num > pLib->nLines )
00320 {
00321 printf( "The number of a child supergate (%d) exceeded the number of lines (%d).\n",
00322 Num, pLib->nLines );
00323 return NULL;
00324 }
00325 pGate->pFanins[i] = pLib->ppSupers[Num];
00326 }
00327 pGate->nFanins = i;
00328 if ( pGate->nFanins != (unsigned)Mio_GateReadInputs(pGate->pRoot) )
00329 {
00330 printf( "The number of fanins of a root gate is wrong.\n" );
00331 return NULL;
00332 }
00333
00334
00335 if ( pTemp && pTemp[0] == '#' )
00336 {
00337 if ( pTemp[1] == 0 )
00338 pTemp = strtok( NULL, " \n\0" );
00339 else
00340 for ( pTemp++; *pTemp == ' '; pTemp++ );
00341
00342 pGate->pFormula = Extra_MmFlexEntryFetch( pLib->mmForms, strlen(pTemp)+1 );
00343 strcpy( pGate->pFormula, pTemp );
00344 }
00345
00346 pTemp = strtok( NULL, " \n\0" );
00347 if ( pTemp != NULL )
00348 printf( "The following trailing symbols found \"%s\".\n", pTemp );
00349 return pGate;
00350 }
00351
00352
00364 int Map_LibraryDeriveGateInfo( Map_SuperLib_t * pLib, st_table * tExcludeGate )
00365 {
00366 Map_Super_t * pGate, * pFanin;
00367 Mio_Pin_t * pPin;
00368 unsigned uCanon[2];
00369 unsigned uTruths[6][2];
00370 int i, k, nRealVars;
00371
00372
00373 for ( i = pLib->nVarsMax; i < (int)pLib->nLines; i++ )
00374 {
00375 pGate = pLib->ppSupers[i];
00376
00377 if ( tExcludeGate )
00378 {
00379 if ( st_is_member( tExcludeGate, Mio_GateReadName( pGate->pRoot ) ) )
00380 pGate->fExclude = 1;
00381 for ( k = 0; k < (int)pGate->nFanins; k++ )
00382 {
00383 pFanin = pGate->pFanins[k];
00384 if ( pFanin->fExclude )
00385 {
00386 pGate->fExclude = 1;
00387 continue;
00388 }
00389 }
00390 }
00391
00392
00393 for ( k = 0; k < (int)pGate->nFanins; k++ )
00394 {
00395 pFanin = pGate->pFanins[k];
00396 uTruths[k][0] = pFanin->uTruth[0];
00397 uTruths[k][1] = pFanin->uTruth[1];
00398 }
00399
00400 Mio_DeriveTruthTable( pGate->pRoot, uTruths, pGate->nFanins, 6, pGate->uTruth );
00401
00402
00403 for ( k = 0; k < pLib->nVarsMax; k++ )
00404 {
00405 pGate->tDelaysR[k].Rise = pGate->tDelaysR[k].Fall = MAP_NO_VAR;
00406 pGate->tDelaysF[k].Rise = pGate->tDelaysF[k].Fall = MAP_NO_VAR;
00407 }
00408
00409 pPin = Mio_GateReadPins( pGate->pRoot );
00410
00411 for ( k = 0; k < (int)pGate->nFanins; k++, pPin = Mio_PinReadNext(pPin) )
00412 {
00413
00414 if ( pPin == NULL )
00415 {
00416 printf( "There are less pins than gate inputs.\n" );
00417 return 0;
00418 }
00419
00420 Map_LibraryAddFaninDelays( pLib, pGate, pGate->pFanins[k], pPin );
00421 }
00422
00423 if ( pPin != NULL )
00424 {
00425 printf( "There are more pins than gate inputs.\n" );
00426 return 0;
00427 }
00428
00429 pGate->tDelayMax.Rise = pGate->tDelayMax.Fall = MAP_NO_VAR;
00430 for ( k = 0; k < pLib->nVarsMax; k++ )
00431 {
00432
00433 if ( pGate->tDelayMax.Rise < pGate->tDelaysR[k].Rise )
00434 pGate->tDelayMax.Rise = pGate->tDelaysR[k].Rise;
00435 if ( pGate->tDelayMax.Rise < pGate->tDelaysR[k].Fall )
00436 pGate->tDelayMax.Rise = pGate->tDelaysR[k].Fall;
00437
00438 if ( pGate->tDelayMax.Fall < pGate->tDelaysF[k].Rise )
00439 pGate->tDelayMax.Fall = pGate->tDelaysF[k].Rise;
00440 if ( pGate->tDelayMax.Fall < pGate->tDelaysF[k].Fall )
00441 pGate->tDelayMax.Fall = pGate->tDelaysF[k].Fall;
00442
00443 pGate->tDelaysF[k].Worst = MAP_MAX( pGate->tDelaysF[k].Fall, pGate->tDelaysF[k].Rise );
00444 pGate->tDelaysR[k].Worst = MAP_MAX( pGate->tDelaysR[k].Fall, pGate->tDelaysR[k].Rise );
00445 }
00446
00447
00448 pGate->nGates = 1;
00449 pGate->Area = (float)Mio_GateReadArea(pGate->pRoot);
00450 for ( k = 0; k < (int)pGate->nFanins; k++ )
00451 {
00452 pGate->nGates += pGate->pFanins[k]->nGates;
00453 pGate->Area += pGate->pFanins[k]->Area;
00454 }
00455
00456
00457 if ( ( !pGate->fSuper ) || pGate->fExclude )
00458 continue;
00459
00460
00461
00462
00463
00464 nRealVars = Map_LibraryGetMaxSuperPi_rec( pGate ) + 1;
00465 assert( nRealVars > 0 && nRealVars <= pLib->nVarsMax );
00466
00467
00468
00469
00470 pGate->nPhases = Map_CanonComputeSlow( pLib->uTruths, pLib->nVarsMax, nRealVars, pGate->uTruth, pGate->uPhases, uCanon );
00471
00472 Map_SuperTableInsertC( pLib->tTableC, uCanon, pGate );
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484 }
00485
00486 Map_SuperTableSortSupergatesByDelay( pLib->tTableC, pLib->nSupersAll );
00487
00488
00489
00490 return 1;
00491 }
00492
00504 int Map_LibraryGetMaxSuperPi_rec( Map_Super_t * pGate )
00505 {
00506 int i, VarCur, VarMax = 0;
00507 if ( pGate->pRoot == NULL )
00508 return pGate->Num;
00509 for ( i = 0; i < (int)pGate->nFanins; i++ )
00510 {
00511 VarCur = Map_LibraryGetMaxSuperPi_rec( pGate->pFanins[i] );
00512 if ( VarMax < VarCur )
00513 VarMax = VarCur;
00514 }
00515 return VarMax;
00516 }
00517
00529 unsigned Map_LibraryGetGateSupp_rec( Map_Super_t * pGate )
00530 {
00531 unsigned uSupport;
00532 int i;
00533 if ( pGate->pRoot == NULL )
00534 return (unsigned)(1 << (pGate->Num));
00535 uSupport = 0;
00536 for ( i = 0; i < (int)pGate->nFanins; i++ )
00537 uSupport |= Map_LibraryGetGateSupp_rec( pGate->pFanins[i] );
00538 return uSupport;
00539 }
00540
00552 void Map_LibraryAddFaninDelays( Map_SuperLib_t * pLib, Map_Super_t * pGate, Map_Super_t * pFanin, Mio_Pin_t * pPin )
00553 {
00554 Mio_PinPhase_t PinPhase;
00555 float tDelayBlockRise, tDelayBlockFall, tDelayPin;
00556 bool fMaxDelay = 0;
00557 int i;
00558
00559
00560 if ( fMaxDelay )
00561 {
00562 float tDelayBlockMax;
00563
00564 tDelayBlockMax = (float)Mio_PinReadDelayBlockMax(pPin);
00565
00566 for ( i = 0; i < pLib->nVarsMax; i++ )
00567 {
00568 if ( pFanin->tDelaysR[i].Rise < 0 )
00569 continue;
00570 tDelayPin = pFanin->tDelaysR[i].Rise + tDelayBlockMax;
00571 if ( pGate->tDelaysR[i].Rise < tDelayPin )
00572 pGate->tDelaysR[i].Rise = tDelayPin;
00573 }
00574
00575 for ( i = 0; i < pLib->nVarsMax; i++ )
00576 {
00577 if ( pFanin->tDelaysF[i].Fall < 0 )
00578 continue;
00579 tDelayPin = pFanin->tDelaysF[i].Fall + tDelayBlockMax;
00580 if ( pGate->tDelaysF[i].Fall < tDelayPin )
00581 pGate->tDelaysF[i].Fall = tDelayPin;
00582 }
00583 return;
00584 }
00585
00586
00587 PinPhase = Mio_PinReadPhase(pPin);
00588 tDelayBlockRise = (float)Mio_PinReadDelayBlockRise( pPin );
00589 tDelayBlockFall = (float)Mio_PinReadDelayBlockFall( pPin );
00590
00591
00592 if ( PinPhase != MIO_PHASE_INV )
00593 {
00594
00595
00596 for ( i = 0; i < pLib->nVarsMax; i++ )
00597 {
00599
00601
00602
00603
00604 if ( pFanin->tDelaysR[i].Rise >= 0 )
00605 {
00606
00607 if ( pGate->tDelaysR[i].Rise < pFanin->tDelaysR[i].Rise + tDelayBlockRise )
00608 pGate->tDelaysR[i].Rise = pFanin->tDelaysR[i].Rise + tDelayBlockRise;
00609 }
00610 if ( pFanin->tDelaysR[i].Fall >= 0 )
00611 {
00612
00613 if ( pGate->tDelaysR[i].Fall < pFanin->tDelaysR[i].Fall + tDelayBlockRise )
00614 pGate->tDelaysR[i].Fall = pFanin->tDelaysR[i].Fall + tDelayBlockRise;
00615 }
00617
00619
00621
00622
00623
00624 if ( pFanin->tDelaysF[i].Rise >= 0 )
00625 {
00626 if ( pGate->tDelaysF[i].Rise < pFanin->tDelaysF[i].Rise + tDelayBlockFall )
00627 pGate->tDelaysF[i].Rise = pFanin->tDelaysF[i].Rise + tDelayBlockFall;
00628 }
00629 if ( pFanin->tDelaysF[i].Fall >= 0 )
00630 {
00631 if ( pGate->tDelaysF[i].Fall < pFanin->tDelaysF[i].Fall + tDelayBlockFall )
00632 pGate->tDelaysF[i].Fall = pFanin->tDelaysF[i].Fall + tDelayBlockFall;
00633 }
00635 }
00636 }
00637 if ( PinPhase != MIO_PHASE_NONINV )
00638 {
00639
00640
00641 for ( i = 0; i < pLib->nVarsMax; i++ )
00642 {
00644
00646
00647
00648
00649 if ( pFanin->tDelaysF[i].Rise >= 0 )
00650 {
00651
00652 if ( pGate->tDelaysR[i].Rise < pFanin->tDelaysF[i].Rise + tDelayBlockRise )
00653 pGate->tDelaysR[i].Rise = pFanin->tDelaysF[i].Rise + tDelayBlockRise;
00654 }
00655 if ( pFanin->tDelaysF[i].Fall >= 0 )
00656 {
00657
00658 if ( pGate->tDelaysR[i].Fall < pFanin->tDelaysF[i].Fall + tDelayBlockRise )
00659 pGate->tDelaysR[i].Fall = pFanin->tDelaysF[i].Fall + tDelayBlockRise;
00660 }
00662
00664
00666
00667
00668
00669 if ( pFanin->tDelaysR[i].Rise >= 0 )
00670 {
00671 if ( pGate->tDelaysF[i].Rise < pFanin->tDelaysR[i].Rise + tDelayBlockFall )
00672 pGate->tDelaysF[i].Rise = pFanin->tDelaysR[i].Rise + tDelayBlockFall;
00673 }
00674 if ( pFanin->tDelaysR[i].Fall >= 0 )
00675 {
00676 if ( pGate->tDelaysF[i].Fall < pFanin->tDelaysR[i].Fall + tDelayBlockFall )
00677 pGate->tDelaysF[i].Fall = pFanin->tDelaysR[i].Fall + tDelayBlockFall;
00678 }
00680 }
00681 }
00682 }
00683
00684
00696 unsigned Map_CalculatePhase( unsigned uTruths[][2], int nVars, unsigned uTruth, unsigned uPhase )
00697 {
00698 int v, Shift;
00699 for ( v = 0, Shift = 1; v < nVars; v++, Shift <<= 1 )
00700 if ( uPhase & Shift )
00701 uTruth = (((uTruth & ~uTruths[v][0]) << Shift) | ((uTruth & uTruths[v][0]) >> Shift));
00702 return uTruth;
00703 }
00704
00716 void Map_CalculatePhase6( unsigned uTruths[][2], int nVars, unsigned uTruth[], unsigned uPhase, unsigned uTruthRes[] )
00717 {
00718 unsigned uTemp;
00719 int v, Shift;
00720
00721
00722 uTruthRes[0] = uTruth[0];
00723 uTruthRes[1] = uTruth[1];
00724 if ( uPhase == 0 )
00725 return;
00726
00727 for ( v = 0, Shift = 1; v < nVars; v++, Shift <<= 1 )
00728 if ( uPhase & Shift )
00729 {
00730 if ( Shift < 32 )
00731 {
00732 uTruthRes[0] = (((uTruthRes[0] & ~uTruths[v][0]) << Shift) | ((uTruthRes[0] & uTruths[v][0]) >> Shift));
00733 uTruthRes[1] = (((uTruthRes[1] & ~uTruths[v][1]) << Shift) | ((uTruthRes[1] & uTruths[v][1]) >> Shift));
00734 }
00735 else
00736 {
00737 uTemp = uTruthRes[0];
00738 uTruthRes[0] = uTruthRes[1];
00739 uTruthRes[1] = uTemp;
00740 }
00741 }
00742 }
00743
00757 void Map_LibraryPrintTree( Map_SuperLib_t * pLib )
00758 {
00759 Map_Super_t * pGate;
00760 int i, k;
00761
00762
00763
00764 for ( i = pLib->nVarsMax; i < 20; i++ )
00765 {
00766 pGate = pLib->ppSupers[i];
00767
00768
00769 printf( "%6d ", pGate->Num );
00770 printf( "%c ", pGate->fSuper? '*' : ' ' );
00771 printf( "%6s", Mio_GateReadName(pGate->pRoot) );
00772 for ( k = 0; k < (int)pGate->nFanins; k++ )
00773 printf( " %6d", pGate->pFanins[k]->Num );
00774 printf( " %s", pGate->pFormula );
00775 printf( "\n" );
00776
00777
00778 Extra_PrintBinary( stdout, pGate->uTruth, 64 );
00779 printf( " %3d", pGate->nGates );
00780 printf( " %6.2f", pGate->Area );
00781 printf( " (%4.2f, %4.2f)", pGate->tDelayMax.Rise, pGate->tDelayMax.Fall );
00782 printf( "\n" );
00783 for ( k = 0; k < pLib->nVarsMax; k++ )
00784 {
00785
00786
00787
00788 if ( pGate->tDelaysR[k].Rise < 0 && pGate->tDelaysR[k].Fall < 0 )
00789 printf( " (----, ----)" );
00790 else if ( pGate->tDelaysR[k].Fall < 0 )
00791 printf( " (%4.2f, ----)", pGate->tDelaysR[k].Rise );
00792 else if ( pGate->tDelaysR[k].Rise < 0 )
00793 printf( " (----, %4.2f)", pGate->tDelaysR[k].Fall );
00794 else
00795 printf( " (%4.2f, %4.2f)", pGate->tDelaysR[k].Rise, pGate->tDelaysR[k].Fall );
00796
00797
00798
00799
00800 if ( pGate->tDelaysF[k].Rise < 0 && pGate->tDelaysF[k].Fall < 0 )
00801 printf( " (----, ----)" );
00802 else if ( pGate->tDelaysF[k].Fall < 0 )
00803 printf( " (%4.2f, ----)", pGate->tDelaysF[k].Rise );
00804 else if ( pGate->tDelaysF[k].Rise < 0 )
00805 printf( " (----, %4.2f)", pGate->tDelaysF[k].Fall );
00806 else
00807 printf( " (%4.2f, %4.2f)", pGate->tDelaysF[k].Rise, pGate->tDelaysF[k].Fall );
00808 printf( "\n" );
00809 }
00810 printf( "\n" );
00811 }
00812 }
00813
00817
00818