mirror of
https://github.com/YosysHQ/abc.git
synced 2026-09-08 03:46:07 +02:00
Version abc51114
This commit is contained in:
@@ -64,13 +64,10 @@ int Fpga_Mapping( Fpga_Man_t * p )
|
||||
p->timeMatch = clock() - clk;
|
||||
|
||||
// perform area recovery
|
||||
if ( p->fAreaRecovery )
|
||||
{
|
||||
clk = clock();
|
||||
if ( !Fpga_MappingPostProcess( p ) )
|
||||
return 0;
|
||||
p->timeRecover = clock() - clk;
|
||||
}
|
||||
clk = clock();
|
||||
if ( !Fpga_MappingPostProcess( p ) )
|
||||
return 0;
|
||||
p->timeRecover = clock() - clk;
|
||||
//PRT( "Total mapping time", clock() - clkTotal );
|
||||
|
||||
// print the AI-graph used for mapping
|
||||
@@ -114,6 +111,9 @@ printf( "Switch = %8.1f ", Fpga_MappingGetSwitching(p,p->vMapping) );
|
||||
PRT( "Time", p->timeMatch );
|
||||
}
|
||||
|
||||
if ( !p->fAreaRecovery )
|
||||
return 1;
|
||||
|
||||
if ( fRecoverAreaFlow )
|
||||
{
|
||||
clk = clock();
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
***********************************************************************/
|
||||
int Map_Mapping( Map_Man_t * p )
|
||||
{
|
||||
int fShowSwitching = 0;
|
||||
int fShowSwitching = 1;
|
||||
int fUseAreaFlow = 1;
|
||||
int fUseExactArea = !p->fSwitching;
|
||||
int fUseExactAreaWithPhase = !p->fSwitching;
|
||||
@@ -93,7 +93,11 @@ PRT( "Time", p->timeMatch );
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
if ( !p->fAreaRecovery )
|
||||
{
|
||||
if ( p->fVerbose )
|
||||
Map_MappingPrintOutputArrivals( p );
|
||||
return 1;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// perform area recovery using area flow
|
||||
|
||||
@@ -179,7 +179,7 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib )
|
||||
return 0;
|
||||
|
||||
// write the current library into the file
|
||||
strcpy( FileNameGenlib, Mio_LibraryReadName(pLib) );
|
||||
sprintf( FileNameGenlib, "%s_temp", Mio_LibraryReadName(pLib) );
|
||||
pFile = fopen( FileNameGenlib, "w" );
|
||||
Mio_WriteLibrary( pFile, pLib, 0 );
|
||||
fclose( pFile );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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); }
|
||||
|
||||
@@ -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
|
||||
|
||||
+15
-4
@@ -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*************************************************************
|
||||
|
||||
@@ -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" );
|
||||
|
||||
@@ -75,7 +75,6 @@ Pga_Man_t * Pga_ManStart( Pga_Params_t * pParams )
|
||||
{
|
||||
printf( "The nodes of the network are not DFS ordered.\n" );
|
||||
// Abc_NtkReassignIds( pNtk );
|
||||
// Abc_AigRehash( pNtk->pManFunc );
|
||||
return NULL;
|
||||
}
|
||||
// make sure there are no dangling nodes (unless they are choices)
|
||||
|
||||
Reference in New Issue
Block a user