summaryrefslogtreecommitdiffstats
path: root/src/base/io/ioReadBlifMv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/io/ioReadBlifMv.c')
-rw-r--r--src/base/io/ioReadBlifMv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/base/io/ioReadBlifMv.c b/src/base/io/ioReadBlifMv.c
index 95e7cd1d..2e2388d3 100644
--- a/src/base/io/ioReadBlifMv.c
+++ b/src/base/io/ioReadBlifMv.c
@@ -1828,6 +1828,7 @@ static char * Io_ReadBlifCleanName( char * pName )
***********************************************************************/
static int Io_MvParseLineGateBlif( Io_MvMod_t * p, Vec_Ptr_t * vTokens )
{
+ extern int Io_ReadBlifReorderFormalNames( Vec_Ptr_t * vTokens, Mio_Gate_t * pGate );
Mio_Library_t * pGenlib;
Mio_Gate_t * pGate;
Abc_Obj_t * pNode;
@@ -1868,6 +1869,13 @@ static int Io_MvParseLineGateBlif( Io_MvMod_t * p, Vec_Ptr_t * vTokens )
p->pNtk->pManFunc = pGenlib;
}
+ // reorder the formal inputs to be in the same order as in the gate
+ if ( !Io_ReadBlifReorderFormalNames( vTokens, pGate ) )
+ {
+ sprintf( p->pMan->sError, "Line %d: Mismatch in the fanins of gate \"%s\".", Io_MvGetLine(p->pMan, pName), (char*)vTokens->pArray[1] );
+ return 0;
+ }
+
// remove the formal parameter names
for ( i = 2; i < vTokens->nSize; i++ )
{