summaryrefslogtreecommitdiffstats
path: root/src/misc/tim
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-12-10 13:56:40 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2012-12-10 13:56:40 -0800
commit2575a5d6836c5bd8160b8e965c622e358b2dc742 (patch)
tree92eaa25ce4be9b47651e043e93fe55c7ea99b342 /src/misc/tim
parentf7b7ab59cf842053cc2819c9a569839dc970ed85 (diff)
downloadabc-2575a5d6836c5bd8160b8e965c622e358b2dc742.tar.gz
abc-2575a5d6836c5bd8160b8e965c622e358b2dc742.tar.bz2
abc-2575a5d6836c5bd8160b8e965c622e358b2dc742.zip
Unifification of custom extensions.
Diffstat (limited to 'src/misc/tim')
-rw-r--r--src/misc/tim/tim.h4
-rw-r--r--src/misc/tim/timDump.c8
2 files changed, 8 insertions, 4 deletions
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 );