From 6130e39b18b5f53902e4eab14f6d5cdde5219563 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 1 Nov 2010 01:35:04 -0700 Subject: initial commit of public abc --- src/base/io/ioWriteBlifMv.c | 59 ++++++--------------------------------------- 1 file changed, 8 insertions(+), 51 deletions(-) (limited to 'src/base/io/ioWriteBlifMv.c') diff --git a/src/base/io/ioWriteBlifMv.c b/src/base/io/ioWriteBlifMv.c index e1494475..62028606 100644 --- a/src/base/io/ioWriteBlifMv.c +++ b/src/base/io/ioWriteBlifMv.c @@ -22,6 +22,9 @@ #include "main.h" #include "mio.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -72,7 +75,7 @@ void Io_WriteBlifMv( Abc_Ntk_t * pNtk, char * FileName ) // write the remaining networks if ( pNtk->pDesign ) { - Vec_PtrForEachEntry( pNtk->pDesign->vModules, pNtkTemp, i ) + Vec_PtrForEachEntry( Abc_Ntk_t *, pNtk->pDesign->vModules, pNtkTemp, i ) { if ( pNtkTemp == pNtk ) continue; @@ -135,14 +138,6 @@ void Io_NtkWriteBlifMvOne( FILE * pFile, Abc_Ntk_t * pNtk ) Io_NtkWriteBlifMvPos( pFile, pNtk ); fprintf( pFile, "\n" ); - // write the assertions - if ( Abc_NtkAssertNum(pNtk) ) - { - fprintf( pFile, ".asserts" ); - Io_NtkWriteBlifMvAsserts( pFile, pNtk ); - fprintf( pFile, "\n" ); - } - // write the MV directives fprintf( pFile, "\n" ); Abc_NtkForEachCi( pNtk, pTerm, i ) @@ -284,46 +279,6 @@ void Io_NtkWriteBlifMvPos( FILE * pFile, Abc_Ntk_t * pNtk ) } } -/**Function************************************************************* - - Synopsis [Writes the assertion list.] - - Description [] - - SideEffects [] - - SeeAlso [] - -***********************************************************************/ -void Io_NtkWriteBlifMvAsserts( FILE * pFile, Abc_Ntk_t * pNtk ) -{ - Abc_Obj_t * pTerm, * pNet; - int LineLength; - int AddedLength; - int NameCounter; - int i; - - LineLength = 8; - NameCounter = 0; - - Abc_NtkForEachAssert( pNtk, pTerm, i ) - { - pNet = Abc_ObjFanin0(pTerm); - // get the line length after this name is written - AddedLength = strlen(Abc_ObjName(pNet)) + 1; - if ( NameCounter && LineLength + AddedLength + 3 > IO_WRITE_LINE_LENGTH ) - { // write the line extender - fprintf( pFile, " \\\n" ); - // reset the line length - LineLength = 0; - NameCounter = 0; - } - fprintf( pFile, " %s", Abc_ObjName(pNet) ); - LineLength += AddedLength; - NameCounter++; - } -} - /**Function************************************************************* Synopsis [Write the latch into a file.] @@ -365,7 +320,7 @@ void Io_NtkWriteBlifMvLatch( FILE * pFile, Abc_Obj_t * pLatch ) ***********************************************************************/ void Io_NtkWriteBlifMvSubckt( FILE * pFile, Abc_Obj_t * pNode ) { - Abc_Ntk_t * pModel = pNode->pData; + Abc_Ntk_t * pModel = (Abc_Ntk_t *)pNode->pData; Abc_Obj_t * pTerm; int i; // write the MV directives @@ -436,7 +391,7 @@ void Io_NtkWriteBlifMvNode( FILE * pFile, Abc_Obj_t * pNode ) fprintf( pFile, "\n" ); // write the cubes - pCur = Abc_ObjData(pNode); + pCur = (char *)Abc_ObjData(pNode); if ( *pCur == 'd' ) { fprintf( pFile, ".default " ); @@ -517,3 +472,5 @@ void Io_NtkWriteBlifMvNodeFanins( FILE * pFile, Abc_Obj_t * pNode ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + -- cgit v1.2.3