summaryrefslogtreecommitdiffstats
path: root/src/map/amap
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-08-28 17:47:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2015-08-28 17:47:00 -0700
commit04be8af56019e6e831bcf5e244d6ae3fb7a92d81 (patch)
tree115b2b3b4bec4df53000a7cb3d4d51972aa71049 /src/map/amap
parentcb439f2ecf000ebaab4447de120a95480b231ef5 (diff)
downloadabc-04be8af56019e6e831bcf5e244d6ae3fb7a92d81.tar.gz
abc-04be8af56019e6e831bcf5e244d6ae3fb7a92d81.tar.bz2
abc-04be8af56019e6e831bcf5e244d6ae3fb7a92d81.zip
Important bug fixes in standard-cell library handling and mapper &nf.
Diffstat (limited to 'src/map/amap')
-rw-r--r--src/map/amap/amapParse.c6
-rw-r--r--src/map/amap/amapRead.c3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/map/amap/amapParse.c b/src/map/amap/amapParse.c
index f02cd6cc..61377d14 100644
--- a/src/map/amap/amapParse.c
+++ b/src/map/amap/amapParse.c
@@ -103,7 +103,7 @@ Hop_Obj_t * Amap_ParseFormulaOper( Hop_Man_t * pMan, Vec_Ptr_t * pStackFn, int O
SeeAlso []
***********************************************************************/
-Hop_Obj_t * Amap_ParseFormula( FILE * pOutput, char * pFormInit, Vec_Ptr_t * vVarNames, Hop_Man_t * pMan )
+Hop_Obj_t * Amap_ParseFormula( FILE * pOutput, char * pFormInit, Vec_Ptr_t * vVarNames, Hop_Man_t * pMan, char * pGateName )
{
char * pFormula;
Vec_Ptr_t * pStackFn;
@@ -278,7 +278,7 @@ Hop_Obj_t * Amap_ParseFormula( FILE * pOutput, char * pFormInit, Vec_Ptr_t * vVa
}
if ( !fFound )
{
- fprintf( pOutput, "Amap_ParseFormula(): The parser cannot find var \"%s\" in the input var list.\n", pTemp );
+ fprintf( pOutput, "Amap_ParseFormula(): The parser cannot find var \"%s\" in the input var list of gate \"%s\".\n", pTemp, pGateName );
Flag = AMAP_EQN_FLAG_ERROR;
break;
}
@@ -428,7 +428,7 @@ int Amap_LibParseEquations( Amap_Lib_t * p, int fVerbose )
Vec_PtrClear( vNames );
Amap_GateForEachPin( pGate, pPin )
Vec_PtrPush( vNames, pPin->pName );
- pObj = Amap_ParseFormula( stdout, pGate->pForm, vNames, pMan );
+ pObj = Amap_ParseFormula( stdout, pGate->pForm, vNames, pMan, pGate->pName );
if ( pObj == NULL )
break;
pTruth = Hop_ManConvertAigToTruth( pMan, pObj, pGate->nPins, vTruth, 0 );
diff --git a/src/map/amap/amapRead.c b/src/map/amap/amapRead.c
index 183989c1..3ccfc011 100644
--- a/src/map/amap/amapRead.c
+++ b/src/map/amap/amapRead.c
@@ -36,6 +36,7 @@ ABC_NAMESPACE_IMPL_START
// these symbols (and no other) can appear in the formulas
#define AMAP_SYMB_AND '*'
+#define AMAP_SYMB_AND2 '&'
#define AMAP_SYMB_OR1 '+'
#define AMAP_SYMB_OR2 '|'
#define AMAP_SYMB_XOR '^'
@@ -236,7 +237,7 @@ int Amap_GateCollectNames( Aig_MmFlex_t * pMem, char * pForm, char * pPinNames[]
for ( pTemp = Buffer; *pTemp; pTemp++ )
if ( *pTemp == AMAP_SYMB_AND || *pTemp == AMAP_SYMB_OR1 || *pTemp == AMAP_SYMB_OR2
|| *pTemp == AMAP_SYMB_XOR || *pTemp == AMAP_SYMB_NOT || *pTemp == AMAP_SYMB_OPEN
- || *pTemp == AMAP_SYMB_CLOSE || *pTemp == AMAP_SYMB_AFTNOT )
+ || *pTemp == AMAP_SYMB_CLOSE || *pTemp == AMAP_SYMB_AFTNOT || *pTemp == AMAP_SYMB_AND2 )
*pTemp = ' ';
// save the names
nPins = 0;