• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. format output the captab

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 15363
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

format output the captab

imagesensor123
imagesensor123 over 13 years ago

 Hi all,

    for some limitation in IC5141, i can't print the capacitance captab out perfectly, so i specifiy a file where the cadence can save all the node capacitance.  the file content looks like belowing:


************************************
Capacitance Table `tran-000_capInfo'
************************************
Capacitance values computed in Tran analysis `tran' at time = 1 ms (T = 27 C).

MCOLUMNAMP:int_d : MCOLUMNAMP:int_d     fixed=106.999 a    variable=2.72777 f  
        sum=2.83477 f   

MCOLUMNAMP:int_s : MCOLUMNAMP:int_s     fixed=106.999 a    variable=2.71843 f  
        sum=2.82542 f   

net7 : net7     fixed=245.898 a    variable=1.41725 f    sum=1.66315 f   

net11 : net11   fixed=245.898 a    variable=516.947 a    sum=762.845 a   

net15 : net15   fixed=245.898 a    variable=462.625 a    sum=708.523 a   

Vout : Vout     fixed=151.313 f    variable=2.72601 f    sum=154.039 f   

vdd! : vdd!     fixed=0            variable=0            sum=0           

Pixel1.MFOLLOWER:int_d : Pixel1.MFOLLOWER:int_d fixed=222.216 a   
        variable=2.44684 f    sum=2.66906 f   

Pixel1.MFOLLOWER:int_s : Pixel1.MFOLLOWER:int_s fixed=222.216 a   
        variable=2.75089 f    sum=2.97311 f   

Pixel1.MRESET:int_d : Pixel1.MRESET:int_d       fixed=106.999 a   
        variable=1.48203 f    sum=1.58903 f   

Pixel1.MRESET:int_s : Pixel1.MRESET:int_s       fixed=106.999 a   
        variable=1.58627 f    sum=1.69327 f   

Pixel1.MSELECT:int_d : Pixel1.MSELECT:int_d     fixed=106.999 a   
        variable=935.721 a    sum=1.04272 f   

Pixel1.MSELECT:int_s : Pixel1.MSELECT:int_s     fixed=106.999 a   
        variable=1.57613 f    sum=1.68313 f   

Pixel1.net8 : Pixel1.net8       fixed=31.9 a       variable=5.45466 f   
        sum=5.48656 f   

Pixel1.net18 : Pixel1.net18     fixed=508.232 a    variable=63.5291 f   
        sum=64.0374 f   

 

 there are too much infomation,  i tried to extracted only the Vout node capacitance, i used a script as "grep "Vout" capinfo.txt >Voutnodecap" , and in the Voutnodecap , the results show like following:

Vout : Vout     fixed=151.313 f    variable=2.72601 f    sum=154.039 f   
Vout : Vout     fixed=151.313 f    variable=2.74593 f    sum=154.059 f   
Vout : Vout     fixed=151.313 f    variable=2.79785 f    sum=154.111 f   
Vout : Vout     fixed=151.313 f    variable=3.24377 f    sum=154.557 f   
Vout : Vout     fixed=151.313 f    variable=3.24482 f    sum=154.558 f   
Vout : Vout     fixed=151.313 f    variable=3.24652 f    sum=154.559 f   
Vout : Vout     fixed=151.313 f    variable=2.85435 f    sum=154.167 f   
Vout : Vout     fixed=151.313 f    variable=2.85957 f    sum=154.172 f   
Vout : Vout     fixed=151.313 f    variable=2.87133 f    sum=154.184 f   
Vout : Vout     fixed=151.313 f    variable=2.86097 f    sum=154.174 f


it looks fine now, but the above Vout capacitance is extracted from different time points, such as timePoints=[1m 3m 6m 6.5m 7m 8m 10m 11m 20m 30m]
so what i want to know now is how to arrange the above data into a file like the followings automatically:

1m  154.039 f

3m  154.059 f

6m  154.111 f

..       ...

do you have some experience? no matter which function you used, skill or shell script is ok.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Not quite sure why you can't use ocnPrint for this - e.g. ocnPrint(pv("Vout : Vout" "Total" ?result "tran_info:tran_info")) 

    From my example:

     ocnPrint(pv("Q58a:int_b : Q58a:int_b" "Total" ?result "tran_info-tran_info") ?output "cap.out")

    Which produces:

     time              pv "Q58a:int_b : Q58a:int_b" "Total" ?resultsDir "/export/home/andrewb/demos/SpectreRF/simulation/ne600/spectre/schematic" ?result "captab"

    99n                   1.1551p
    134n                  1.17948p
    175n                  1.14999p

    Alternatively if you want to do it from an ASCII output file, something similar to this would do the job (not thoroughly tested, I would suggest you clean this up and modify it yourself):

    #!/usr/bin/env perl
    #
    # Author     A.D.Beckett
    # Group      Custom IC, Cadence Design Systems Ltd
    # Machine    SUN
    # Date       Mar 01, 2012
    # Modified
    # By
    #
    # processCaptab pattern fileName
    #

    $pattern = shift;

    while (<>) {
        if ($_ =~ /Capacitance values .* at time/) {
            # do some substitution to extract out the time without
            # any whitespace and also with the "s" units removed
            s/^[^=]*= //;
            s/[(].*//;
            s/\s*//g;
            s/s$//;
            $currentTime=$_;
            }
        if ($_ =~ /$pattern/) {
            $collect=1;
            $line="";
            }
        if ($collect && $_ =~ /^\s*$/) {
            $collect=0;
            $line =~ s/^.*sum=//;
            $line =~ s/\.\s*$//;
            $line =~ s/\s*//g;
            print $currentTime."  ".$line."\n";
            }
        if ($collect) {
            $line=$line.$_;
            }
        }

    So I did something like:

     processCaptab Q58a:int_b input.info.captab

    and got:

     99n  1.1551p
    134n  1.17948p
    175n  1.14999p

    Take your pick!

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • imagesensor123
    imagesensor123 over 13 years ago

    Hi Andrew,

        yes, the same question, i have diffculty in understanding your script above, it's a perl script. your method is also search a "pattern" in the file and then pick the vaule up? 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Yes. You could use "processCapTab Vout fileName" in your other post's example. It's not that complicated a perl script - look at a book on perl (e.g. one of the O'Reilly books).

    If you only want the numbers, you could do:

    grep 'Vout' fileName | awk -F= '{print $NF}'

    or

    awk -F= '/Vout/{print $NF}'

    these use = as the field separator, and then print the last field (NF is a special variable in AWK which is the number of fields on a line). See "man awk" for more details.

    or you could use the SKILL approach.

    There are at least 20 ways to skin  the cat.

    Andew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • imagesensor123
    imagesensor123 over 13 years ago

     Hi Andrew,

         thanks a lot, just a little problem, can i try to use the following function,

    csh("grep 'Vout' capdataFile | awk -F= '{print $NF}' > capValueFile")

    and i got all the capdata in the capValueFile, but the function "grep 'Vout' capdataFile | awk -F= '{print $NF}' > capValueFile" works well if i use it in the terminal,  the "csh" can't work in this case?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • imagesensor123
    imagesensor123 over 13 years ago

    Hi,

       I use "sh" to replace "sch", it's ok now, thanks Andrew.

    have a good weekend! 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information