From 2575a5d6836c5bd8160b8e965c622e358b2dc742 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 10 Dec 2012 13:56:40 -0800 Subject: Unifification of custom extensions. --- src/misc/tim/tim.h | 4 ++-- src/misc/tim/timDump.c | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/misc/tim') diff --git a/src/misc/tim/tim.h b/src/misc/tim/tim.h index b2009ec0..5fda0e59 100644 --- a/src/misc/tim/tim.h +++ b/src/misc/tim/tim.h @@ -122,8 +122,8 @@ extern float * Tim_ManBoxDelayTable( Tim_Man_t * p, int iBox ); extern int Tim_ManBoxCopy( Tim_Man_t * p, int iBox ); extern void Tim_ManBoxSetCopy( Tim_Man_t * p, int iBox, int iCopy ); /*=== timDump.c ===========================================================*/ -extern Vec_Str_t * Tim_ManSave( Tim_Man_t * p ); -extern Tim_Man_t * Tim_ManLoad( Vec_Str_t * p ); +extern Vec_Str_t * Tim_ManSave( Tim_Man_t * p, int fHieOnly ); +extern Tim_Man_t * Tim_ManLoad( Vec_Str_t * p, int fHieOnly ); /*=== timMan.c ===========================================================*/ extern Tim_Man_t * Tim_ManStart( int nCis, int nCos ); extern Tim_Man_t * Tim_ManDup( Tim_Man_t * p, int fUnitDelay ); diff --git a/src/misc/tim/timDump.c b/src/misc/tim/timDump.c index c7fb8861..1cda07b9 100644 --- a/src/misc/tim/timDump.c +++ b/src/misc/tim/timDump.c @@ -43,7 +43,7 @@ ABC_NAMESPACE_IMPL_START SeeAlso [] ***********************************************************************/ -Vec_Str_t * Tim_ManSave( Tim_Man_t * p ) +Vec_Str_t * Tim_ManSave( Tim_Man_t * p, int fHieOnly ) { Tim_Box_t * pBox; Tim_Obj_t * pObj; @@ -71,6 +71,8 @@ Vec_Str_t * Tim_ManSave( Tim_Man_t * p ) Vec_StrPutI_ne( vStr, Tim_ManBoxDelayTableId(p, pBox->iBox) ); // can be -1 if delay table is not given Vec_StrPutI_ne( vStr, Tim_ManBoxCopy(p, pBox->iBox) ); // can be -1 if the copy is node defined } + if ( fHieOnly ) + return vStr; // save the number of delay tables Vec_StrPutI_ne( vStr, Tim_ManDelayTableNum(p) ); // save the delay tables @@ -107,7 +109,7 @@ Vec_Str_t * Tim_ManSave( Tim_Man_t * p ) SeeAlso [] ***********************************************************************/ -Tim_Man_t * Tim_ManLoad( Vec_Str_t * p ) +Tim_Man_t * Tim_ManLoad( Vec_Str_t * p, int fHieOnly ) { Tim_Man_t * pMan; Tim_Obj_t * pObj; @@ -149,6 +151,8 @@ Tim_Man_t * Tim_ManLoad( Vec_Str_t * p ) curPo += nPos; assert( curPi == nCis ); assert( curPo == nCos ); + if ( fHieOnly ) + return pMan; // create delay tables nTables = Vec_StrGetI_ne( p, &iStr ); assert( pMan->vDelayTables == NULL ); -- cgit v1.2.3