• 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. Print result of SKILL function to file

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 144
  • Views 21270
  • 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

Print result of SKILL function to file

tyanata
tyanata over 15 years ago

 Hello,

 Can any one say how can I print result of function to file? What I mean? I want to print to file the list of the libraries of the project.

For this purpose I use SKILL function ddDumpLibList but its result if all is OK actually is t.

So if I do following:

p = outfile( "xxx")

fprintf( p "%s \n" ddDumpLibList())

close(p) 

 

In file xxx only t will be printed, and the necessary result is printed anly in CIW.

 

Thanks in advance!

 

 

  • Cancel
  • skillUser
    skillUser over 15 years ago

     Hi Tyanata,

    One way that you can achieve this is by redirecting the printed output temporarily, so that information sent to "stdout" goes to a file instead, and then return output to stdout again to revert to normal operation:

    
    ;; open a temporary file to receive printed command output
    tmpout = outfile("./tmpout")
    => port:"./tmpout"
    
    ;; set the printed output to go to the new file
    poport = tmpout
    => port:"./tmpout"
    
    ;; run the command
    ddDumpLibList()
    => t
    
    ;; revert the printed output back to 'stdout'
    poport=stdout
    => port:"*stdout*"
    
    ;; close the output file
    close(tmpout)
    
    
    

    Now the file "tmpout" in the current directory contains the output of the ddDumpLibList() command. I hope that this answers your question.

    regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tyanata
    tyanata over 15 years ago

    Hello skillUser,

     

    Thanks for the reponse!

    Proposed by you approach works perfectly.

    Best regards,

    tyanata

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • nosaj
    nosaj over 14 years ago

    I have a similar question, trying to capture the warnings/errors of schCheck output in CIW to a file, but poport doesn't seem to work for me. the output file is always empty. Any ideas?

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • nosaj
    nosaj over 14 years ago

    turns out the i need to write the file in append mode

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • kbhow
    kbhow over 14 years ago

    Thanks Lawrence,

    This is really useful especially when u trying to create a log file. Good sharing

    How

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • gs748
    gs748 over 10 years ago

    I tried the above example to append output of a SKILL function to a file. But did not succeed.

    Can any one of you help me to do this.

    I tried the below example too but did not work.

    tmpout = outfile("./tmpout" "w")
    poport = tmpout
    (axlGetWindowSession() ; function to get  ADEXLsession
    poport=stdout
    close(tmpout)

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

    I'm not quite sure why you'd do this (it seems a slightly odd thing to want to save to a file), but nevertheless it won't work using this approach.

    The fundamental reason is that when you call a function in the CIW, it doesn't actually print the return value to poport. It writes both the command you enter and the return value into the CDS.log, and then the CIW is showing a filtered version of the CDS.log (based on the log filter setting). It never actually writes to poport though.

    A far simpler way to write this information to a file would be to do:

    tmpout=outfile("./tmpout")
    println(axlGetWindowSession() tmpout)
    close(tmpout)

    or you could use:

    fprintf(tmpout "%L\n" axlGetWindowSession())

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • gs748
    gs748 over 10 years ago

    Thanks for the information! %L did the trick.

    How can I compare a String with a List? I tried rexMatchp but ended with format error: *Error* : argument #2 should be either a string or a symbol (type template = "tS")

    I want to match a string "manual" with result of function "axlGetAttachedJobPolicy(axlGetWindowSession())", result of the function is as below, can you please let me know compare a String with List?

    =============

    (nil FM_COl_CONFIG_FREE "ACT"

    "300" distributionmethod "NB interface (manual)"

    lingertimeout "30")

    =============

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

    You wouldn't compare a string against a list (although you could have used rexMatchList to do this). Instead it would be better to do:

    rexMatchp("manual" axlGetAttachedJobPolicy(axlGetWindowSession())->distributionmethod)

    Since the function returns a disembodied property list, you can use -> to retrieve the value of that key.

    Kind Regards,

    Andrew.

    • 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