From 48912a22474688302c4ed62133111740061f58bb Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 6 Feb 2014 12:22:30 -0800 Subject: Fixing Liberty parser to handle 'scalar' delay/slew tables. --- src/map/scl/sclLiberty.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/map/scl/sclLiberty.c') diff --git a/src/map/scl/sclLiberty.c b/src/map/scl/sclLiberty.c index e128b515..36d01c1b 100644 --- a/src/map/scl/sclLiberty.c +++ b/src/map/scl/sclLiberty.c @@ -1030,6 +1030,23 @@ int Scl_LibertyScanTable( Scl_Tree_t * p, Vec_Ptr_t * vOut, Scl_Item_t * pTiming Vec_PtrPush( vOut, vInd2 ); Vec_PtrPush( vOut, vValues ); } + else if ( !strcmp(pTempl, "scalar") ) + { + Scl_ItemForEachChild( p, pTable, pItem ) + if ( !Scl_LibertyCompare(p, pItem->Key, "values") ) + { + assert(vValues == NULL); + vValues = Scl_LibertyReadFloatVec( Scl_LibertyReadString(p, pItem->Head) ); + assert( Vec_FltSize(vValues) == 1 ); + // write entries + Vec_PtrPush( vOut, Vec_IntStart(1) ); + Vec_PtrPush( vOut, Vec_IntStart(1) ); + Vec_PtrPush( vOut, vValues ); + break; + } + else + { printf( "Cannot read \"scalar\" template\n" ); return 0; } + } else { // fetch the template -- cgit v1.2.3