mirror of https://github.com/YosysHQ/abc.git
Value of properties can be expression.
Example found in the 2007.03 Liberty Reference Manual that was also found
in the wild:
input_voltage(CMOS) {
vil : 0.3 * VDD ;
vih : 0.7 * VDD ;
vimin : -0.5 ;
vimax : VDD + 0.5 ;
}
Current implementation just parses the expression but no interpretation is done.
This commit is contained in:
parent
f3dcf87cea
commit
e4875df4e5
|
|
@ -399,6 +399,18 @@ int Scl_LibertyBuildItem( Scl_Tree_t * p, char ** ppPos, char * pEnd )
|
|||
if ( Scl_LibertySkipSpaces( p, ppPos, pEnd, 1 ) )
|
||||
goto exit;
|
||||
pNext = *ppPos;
|
||||
while ( *pNext == '+' || *pNext == '-' || *pNext == '*' || *pNext == '/' )
|
||||
{
|
||||
(*ppPos) += 1;
|
||||
if ( Scl_LibertySkipSpaces( p, ppPos, pEnd, 0 ) )
|
||||
goto exit;
|
||||
if ( Scl_LibertySkipEntry( ppPos, pEnd ) )
|
||||
goto exit;
|
||||
Head.End = *ppPos - p->pContents;
|
||||
if ( Scl_LibertySkipSpaces( p, ppPos, pEnd, 1 ) )
|
||||
goto exit;
|
||||
pNext = *ppPos;
|
||||
}
|
||||
if ( *pNext != ';' && *pNext != '\n' )
|
||||
goto exit;
|
||||
*ppPos = pNext + 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue