diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2007-02-19 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2007-02-19 08:01:00 -0800 |
commit | fb51057e4a36d2e5737bba8739b88140b55db7c7 (patch) | |
tree | c4902ec2ccb1b1201853ee209a9fdb3a37de26a3 /src/base/io/ioReadVerilog.c | |
parent | 50e0d1dea52e73d9646de4869fceb57c10553e6d (diff) | |
download | abc-fb51057e4a36d2e5737bba8739b88140b55db7c7.tar.gz abc-fb51057e4a36d2e5737bba8739b88140b55db7c7.tar.bz2 abc-fb51057e4a36d2e5737bba8739b88140b55db7c7.zip |
Version abc70219
Diffstat (limited to 'src/base/io/ioReadVerilog.c')
-rw-r--r-- | src/base/io/ioReadVerilog.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/base/io/ioReadVerilog.c b/src/base/io/ioReadVerilog.c index 5956a9bc..090cf254 100644 --- a/src/base/io/ioReadVerilog.c +++ b/src/base/io/ioReadVerilog.c @@ -45,13 +45,12 @@ Abc_Ntk_t * Io_ReadVerilog( char * pFileName, int fCheck ) { Abc_Ntk_t * pNtk; Abc_Lib_t * pDesign; - int i; // parse the verilog file - pDesign = Ver_ParseFile( pFileName, NULL, 1, fCheck ); + pDesign = Ver_ParseFile( pFileName, NULL, fCheck, 1 ); if ( pDesign == NULL ) return NULL; - +/* // extract the master network pNtk = Vec_PtrEntryLast( pDesign->vModules ); pNtk->pDesign = pDesign; @@ -75,6 +74,28 @@ Abc_Ntk_t * Io_ReadVerilog( char * pFileName, int fCheck ) // check that there is no cyclic dependency Abc_NtkIsAcyclicHierarchy( pNtk ); } +*/ + // extract the master network + pNtk = Vec_PtrEntry( pDesign->vModules, 0 ); + pNtk->pDesign = pDesign; + pDesign->pManFunc = NULL; + +//Io_WriteVerilog( pNtk, "_temp.v" ); + + // verify the design for cyclic dependence + assert( Vec_PtrSize(pDesign->vModules) > 0 ); + if ( Vec_PtrSize(pDesign->vModules) == 1 ) + { +// printf( "Warning: The design is not hierarchical.\n" ); + Abc_LibFree( pDesign, pNtk ); + pNtk->pDesign = NULL; + pNtk->pSpec = Extra_UtilStrsav( pFileName ); + } + else + { + // check that there is no cyclic dependency + Abc_NtkIsAcyclicHierarchy( pNtk ); + } return pNtk; } |