summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-09-11 19:11:51 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-09-11 19:11:51 -0700
commita246882a5be32c47534dda85d55f737164cb3a55 (patch)
treeb19bc70ad99e3fe50f936d4398cfa5379bcc6725 /src/base
parent1c865bf2298233ccad6f6ace730a882e0c4f7f9c (diff)
downloadabc-a246882a5be32c47534dda85d55f737164cb3a55.tar.gz
abc-a246882a5be32c47534dda85d55f737164cb3a55.tar.bz2
abc-a246882a5be32c47534dda85d55f737164cb3a55.zip
Scalable gate-level abstraction.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/io/ioReadBlifMv.c39
1 files changed, 30 insertions, 9 deletions
diff --git a/src/base/io/ioReadBlifMv.c b/src/base/io/ioReadBlifMv.c
index 32fa5a68..57cbb915 100644
--- a/src/base/io/ioReadBlifMv.c
+++ b/src/base/io/ioReadBlifMv.c
@@ -1954,6 +1954,14 @@ static int Io_MvParseLineNamesBlif( Io_MvMod_t * p, char * pLine )
return 1;
}
+ABC_NAMESPACE_IMPL_END
+
+#include "map/mio/mio.h"
+#include "base/main/main.h"
+
+ABC_NAMESPACE_IMPL_START
+
+
/**Function*************************************************************
Synopsis [Parses the nodes line.]
@@ -1989,7 +1997,28 @@ static int Io_MvParseLineShortBlif( Io_MvMod_t * p, char * pLine )
// create fanins
pNode = Io_ReadCreateNode( p->pNtk, pName, (char **)(vTokens->pArray + 1), 1 );
// parse the table of this node
- pNode->pData = Abc_SopRegister( (Mem_Flex_t *)p->pNtk->pManFunc, "1 1\n" );
+ if ( p->pNtk->ntkFunc == ABC_FUNC_MAP )
+ {
+ Mio_Library_t * pGenlib;
+ Mio_Gate_t * pGate;
+ // check that the library is available
+ pGenlib = (Mio_Library_t *)Abc_FrameReadLibGen();
+ if ( pGenlib == NULL )
+ {
+ sprintf( p->pMan->sError, "Line %d: The current library is not available.", Io_MvGetLine(p->pMan, pName) );
+ return 0;
+ }
+ // get the gate
+ pGate = Mio_LibraryReadBuf( pGenlib );
+ if ( pGate == NULL )
+ {
+ sprintf( p->pMan->sError, "Line %d: Cannot find buffer gate in the library.", Io_MvGetLine(p->pMan, pName) );
+ return 0;
+ }
+ Abc_ObjSetData( pNode, pGate );
+ }
+ else
+ pNode->pData = Abc_SopRegister( (Mem_Flex_t *)p->pNtk->pManFunc, "1 1\n" );
return 1;
}
@@ -2027,14 +2056,6 @@ Io_MvVar_t * Abc_NtkMvVarDup( Abc_Ntk_t * pNtk, Io_MvVar_t * pVar )
return pVarDup;
}
-ABC_NAMESPACE_IMPL_END
-
-#include "map/mio/mio.h"
-#include "base/main/main.h"
-
-ABC_NAMESPACE_IMPL_START
-
-
/**Function*************************************************************
Synopsis []