Open Source Liberty Liberty Discussion Forum Forum Archive Liberty Home

It is currently Sun Sep 05, 2010 10:09 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Liberty Parser 2.6 fails two tests under RHEL4 and RHEL5
PostPosted: Thu Jul 15, 2010 9:03 am 

Joined: Tue Feb 26, 2008 2:06 pm
Posts: 6
I downloaded the latest source for the parser because I need to install it on RHEL5 systems ( 32bit and 64bit). However, when I run
Code:
make check
I get some failed tests:
Code:
...
var9................%%FAILED%%
writer-comments.....PASSED
my_group.lib........PASSED
newstuff.lib........%%FAILED%%
defgroup.lib........PASSED
...


Comparing var9.out and var9.ref leads me to believe that the expression parsing is the issue. It seems to be returning the wrong expression back for the right-hand-side. Here is a sample diff. There are quite a few of these:\
Code:
$ diff var9.out var9.ref
...
777c777
< vimax : EXPR= VDD + VDD
---
> vimax : EXPR= VDD + 0.3
781c781
< vomax : EXPR= VDD + VDD
---
> vomax : EXPR= VDD + 0.3
...

As you can see the LHS is replicated at the RHS on the bad output. The true RHS is ... gone.

For the newstuff difference there are additional errors noted:
Code:
$ diff newstuff.out newstuff.ref
13d12
< ERROR: newstuff.lib:6, Argument #2 of retention_pin should be an int, but it has non-integer characters in it (z). (Syntax Error Encountered)
16d14
< ERROR: newstuff.lib:11, Argument #2 of retention_pin should be an int, but it has non-integer characters in it (z). (Syntax Error Encountered)
...

Here are the problematic lines:
Code:
grep retention_pin  newstuff.lib
         retention_pin( "pin2","z");
         retention_pin( "pin1","z");


It seems to want the "z" to be an integer. This complies with the syntax.cmos.desc file. In this case I think the newstuff.ref needs to be regenerated to include the new errors or the lib file needs the have the "z" changed to an int.

Code:
$ grep retention_pin syntax.cmos.desc
                retention_pin( string, int);


I will fix the code for var9 problem...when I get the chance. For now I'll have to go back to 2.5.

So where should I send the patches, or who do I have to contact about the issues so that they can be addressed in future releases? Is there some sort of formal issue tracking system other than simply posting to this forum...

The low activity level here has me concerned about using it as a formal mechanism for issue tracking... :(

Thanks
Nick


Top
 Profile  
 
 Post subject: FIX 1: Liberty Parser 2.6 fails two tests under RHEL4 and RH
PostPosted: Mon Jul 19, 2010 10:22 pm 

Joined: Tue Feb 26, 2008 2:06 pm
Posts: 6
Ok, It seems that the var9 problem was over-aggressive code clean up. I had to add a few simple lines back to the expr_string
function in PI.c. Here is an svn diff :
Code:
[nicky@dev LibertyParse]$ svn diff -rPREV PI.c
Index: PI.c
===================================================================
--- PI.c   (revision 8)
+++ PI.c   (working copy)
@@ -4364,9 +4364,11 @@
                buf1 = liberty_strtable_enter_string(master_string_table,tbuf);
                break;
             case SI2DR_FLOAT64:
+               sprintf (tbuf, "%g", e->u.d);
                buf1 = liberty_strtable_enter_string(master_string_table,tbuf);
                break;
             case SI2DR_INT32:
+               sprintf (tbuf, "%d", e->u.i);
                buf1 = liberty_strtable_enter_string(master_string_table,tbuf);
                break;
             default:
@@ -4405,6 +4407,7 @@
           break;

       case SI2DR_EXPR_OP_PAREN:
+          sprintf (tbuf, "(%s)", lefts);
           buf1 = liberty_strtable_enter_string(master_string_table,tbuf);
          break;



The sprintf lines that start with the plus '+' symbol need to be added back. I think they were probably removed from the 2.6 source when some comments were deleted from the 2.5e source version. At least the var9 expressions look good!
:D

Nick


Top
 Profile  
 
 Post subject: Re: Liberty Parser 2.6 fails two tests under RHEL4 and RHEL5
PostPosted: Tue Jul 20, 2010 8:41 am 

Joined: Tue Feb 26, 2008 2:06 pm
Posts: 6
The retention pin has a disable value argument that must be a 1 or a 0. The lib in the test directory is incorrect. That is why the test fails. The fix is to change the lib or the ref file to reflect the test properly.

From the manual :
Quote:
retention_pin Complex Attribute
The retention_pin complex attribute identifies the retention pins of a retention cell. The attribute defines the
following information:
pin class
    Valid values:
  • restore Restores the state of the cell.
  • save Saves the state of the cell.
  • save_restore Saves and restores the state of the cell.
disable value
    Defines the value of the retention pin when the cell works in normal mode. The valid values are 0 and 1.
Syntax
retention_pin (pin_class, disable_value) ;
Example
retention_pin (save/restore/save_restore, <enumerated_type>) ;


I think the enumerated_type should be changed to 1 or 0 for clarity.

Nick


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group