diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2005-11-14 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2005-11-14 08:01:00 -0800 |
commit | 85f42d0ebddce595974b8deba419eeee95a1f69e (patch) | |
tree | 66251e0338907210bb9138b5ae3dc2e7d75f1ade /src/map/mio | |
parent | e2619aa120bf8166b70cec3df2740cd748b5b723 (diff) | |
download | abc-85f42d0ebddce595974b8deba419eeee95a1f69e.tar.gz abc-85f42d0ebddce595974b8deba419eeee95a1f69e.tar.bz2 abc-85f42d0ebddce595974b8deba419eeee95a1f69e.zip |
Version abc51114
Diffstat (limited to 'src/map/mio')
-rw-r--r-- | src/map/mio/mio.h | 1 | ||||
-rw-r--r-- | src/map/mio/mioApi.c | 5 | ||||
-rw-r--r-- | src/map/mio/mioInt.h | 1 | ||||
-rw-r--r-- | src/map/mio/mioRead.c | 19 | ||||
-rw-r--r-- | src/map/mio/mioUtils.c | 4 |
5 files changed, 22 insertions, 8 deletions
diff --git a/src/map/mio/mio.h b/src/map/mio/mio.h index 1122dff3..307cdd8d 100644 --- a/src/map/mio/mio.h +++ b/src/map/mio/mio.h @@ -81,6 +81,7 @@ extern char * Mio_LibraryReadSopByName ( Mio_Library_t * pLib, char extern Mio_Gate_t * Mio_LibraryReadConst0 ( Mio_Library_t * pLib ); extern Mio_Gate_t * Mio_LibraryReadConst1 ( Mio_Library_t * pLib ); extern Mio_Gate_t * Mio_LibraryReadNand2 ( Mio_Library_t * pLib ); +extern Mio_Gate_t * Mio_LibraryReadAnd2 ( Mio_Library_t * pLib ); extern Mio_Gate_t * Mio_LibraryReadBuf ( Mio_Library_t * pLib ); extern Mio_Gate_t * Mio_LibraryReadInv ( Mio_Library_t * pLib ); extern float Mio_LibraryReadDelayInvRise( Mio_Library_t * pLib ); diff --git a/src/map/mio/mioApi.c b/src/map/mio/mioApi.c index 9e621758..90a0af93 100644 --- a/src/map/mio/mioApi.c +++ b/src/map/mio/mioApi.c @@ -43,9 +43,10 @@ Mio_Gate_t * Mio_LibraryReadGates ( Mio_Library_t * pLib ) { retur DdManager * Mio_LibraryReadDd ( Mio_Library_t * pLib ) { return pLib->dd; } Mio_Gate_t * Mio_LibraryReadBuf ( Mio_Library_t * pLib ) { return pLib->pGateBuf; } Mio_Gate_t * Mio_LibraryReadInv ( Mio_Library_t * pLib ) { return pLib->pGateInv; } -Mio_Gate_t * Mio_LibraryReadConst0 ( Mio_Library_t * pLib ) { return pLib->pGate0; } -Mio_Gate_t * Mio_LibraryReadConst1 ( Mio_Library_t * pLib ) { return pLib->pGate1; } +Mio_Gate_t * Mio_LibraryReadConst0 ( Mio_Library_t * pLib ) { return pLib->pGate0; } +Mio_Gate_t * Mio_LibraryReadConst1 ( Mio_Library_t * pLib ) { return pLib->pGate1; } Mio_Gate_t * Mio_LibraryReadNand2 ( Mio_Library_t * pLib ) { return pLib->pGateNand2; } +Mio_Gate_t * Mio_LibraryReadAnd2 ( Mio_Library_t * pLib ) { return pLib->pGateAnd2; } float Mio_LibraryReadDelayInvRise ( Mio_Library_t * pLib ) { return (float)(pLib->pGateInv? pLib->pGateInv->pPins->dDelayBlockRise : 0.0); } float Mio_LibraryReadDelayInvFall ( Mio_Library_t * pLib ) { return (float)(pLib->pGateInv? pLib->pGateInv->pPins->dDelayBlockFall : 0.0); } float Mio_LibraryReadDelayInvMax ( Mio_Library_t * pLib ) { return (float)(pLib->pGateInv? pLib->pGateInv->pPins->dDelayBlockMax : 0.0); } diff --git a/src/map/mio/mioInt.h b/src/map/mio/mioInt.h index ea995c6d..a25ca026 100644 --- a/src/map/mio/mioInt.h +++ b/src/map/mio/mioInt.h @@ -60,6 +60,7 @@ struct Mio_LibraryStruct_t_ Mio_Gate_t * pGateBuf; // the buffer Mio_Gate_t * pGateInv; // the inverter Mio_Gate_t * pGateNand2; // the NAND2 gate + Mio_Gate_t * pGateAnd2; // the AND2 gate st_table * tName2Gate; // the mapping of gate names into their pointer DdManager * dd; // the nanager storing functions of gates Extra_MmFlex_t * pMmFlex; // the memory manaqer for SOPs diff --git a/src/map/mio/mioRead.c b/src/map/mio/mioRead.c index 4eb4972c..93b214b5 100644 --- a/src/map/mio/mioRead.c +++ b/src/map/mio/mioRead.c @@ -418,12 +418,14 @@ char *chomp( char *s ) void Mio_LibraryDetectSpecialGates( Mio_Library_t * pLib ) { Mio_Gate_t * pGate; - DdNode * bFuncBuf, * bFuncInv, * bFuncNand2; + DdNode * bFuncBuf, * bFuncInv, * bFuncNand2, * bFuncAnd2; bFuncBuf = pLib->dd->vars[0]; Cudd_Ref( bFuncBuf ); bFuncInv = Cudd_Not( pLib->dd->vars[0] ); Cudd_Ref( bFuncInv ); bFuncNand2 = Cudd_bddNand( pLib->dd, pLib->dd->vars[0], pLib->dd->vars[1] ); Cudd_Ref( bFuncNand2 ); + bFuncAnd2 = Cudd_bddAnd( pLib->dd, pLib->dd->vars[0], pLib->dd->vars[1] ); Cudd_Ref( bFuncAnd2 ); + // get buffer Mio_LibraryForEachGate( pLib, pGate ) if ( pLib->pGateBuf == NULL && pGate->bFunc == bFuncBuf ) { @@ -435,7 +437,8 @@ void Mio_LibraryDetectSpecialGates( Mio_Library_t * pLib ) printf( "Warnings: GENLIB library reader cannot detect the buffer gate.\n" ); printf( "Some parts of the supergate-based technology mapper may not work correctly.\n" ); } - + + // get inverter Mio_LibraryForEachGate( pLib, pGate ) if ( pLib->pGateInv == NULL && pGate->bFunc == bFuncInv ) { @@ -448,20 +451,28 @@ void Mio_LibraryDetectSpecialGates( Mio_Library_t * pLib ) printf( "Some parts of the supergate-based technology mapper may not work correctly.\n" ); } + // get the NAND2 and AND2 gates Mio_LibraryForEachGate( pLib, pGate ) if ( pLib->pGateNand2 == NULL && pGate->bFunc == bFuncNand2 ) { pLib->pGateNand2 = pGate; break; } - if ( pLib->pGateNand2 == NULL ) + Mio_LibraryForEachGate( pLib, pGate ) + if ( pLib->pGateAnd2 == NULL && pGate->bFunc == bFuncAnd2 ) + { + pLib->pGateAnd2 = pGate; + break; + } + if ( pLib->pGateAnd2 == NULL && pLib->pGateNand2 == NULL ) { - printf( "Warnings: GENLIB library reader cannot detect the NAND2 gate.\n" ); + printf( "Warnings: GENLIB library reader cannot detect the AND2 or NAND2 gate.\n" ); printf( "Some parts of the supergate-based technology mapper may not work correctly.\n" ); } Cudd_RecursiveDeref( pLib->dd, bFuncInv ); Cudd_RecursiveDeref( pLib->dd, bFuncNand2 ); + Cudd_RecursiveDeref( pLib->dd, bFuncAnd2 ); } /**Function************************************************************* diff --git a/src/map/mio/mioUtils.c b/src/map/mio/mioUtils.c index ada0cc5f..b051584e 100644 --- a/src/map/mio/mioUtils.c +++ b/src/map/mio/mioUtils.c @@ -165,9 +165,9 @@ void Mio_WriteGate( FILE * pFile, Mio_Gate_t * pGate, int fPrintSops ) Mio_Pin_t * pPin; fprintf( pFile, "GATE " ); - fprintf( pFile, "%12s ", pGate->pName ); + fprintf( pFile, "%12s ", pGate->pName ); fprintf( pFile, "%10.2f ", pGate->dArea ); - fprintf( pFile, "O=%s;\n", pGate->pForm ); + fprintf( pFile, "%s=%s;\n", pGate->pOutName, pGate->pForm ); // print the pins if ( fPrintSops ) fprintf( pFile, "%s", pGate->pSop? pGate->pSop : "unspecified\n" ); |