• 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. Redirecting the output of a script into a text file when...

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 8318
  • 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

Redirecting the output of a script into a text file when in a loop

Peat
Peat over 3 years ago

 ic6.1.8 (19)  I can't seem to find a helpful link anywhere...

Dealing with two separate *.il files and one output file to write to.

script_1  prints what it finds to the CIW (the things I want it to and it works great).

script_2  opens an outfile(report_file), loops through a list of cells and invokes script_1 when a valid condition is found.

I cannot find a way to get the output of script_1 into the report_file.

All the fprintf statements in script_2 get into the report_file, but none of the printf() statements from the call to script_1.

I have attempted many combinations of things, all to no avail.

What am I missing?  ((thank you in advance))  Here's an oversimplified example of the essence:

script_1:

procedure( script_1( lay sch)

let( ()

printf("\nChecking through lay and sch \n Found something or nothing\n printing results here:\n")

printf("\nDone with printing what was found... or not\n")

));let proc

script_2:

procedure( script_2( lay sch)

let( (report_file listofcells lay sch)

report_file=outFile( filenamefromform~>value )

listofcells==(getOrMakeAListOfCells)

foreach( cell listofcells

fprintf(report_file "\n looking for lay and sch to give script_1\n")

fprintf(report_file "Found and sending to script_1\n")

script_1( lay sch)         ;;;;<-- what is the right call here to get script_1 text into the report_file?? CIW is not enough

fprintf(report_file "Done with script_1\n")

);foreach

close(report_file)

(view filenamefromform~>value nil "Report _ File" )

));let proc

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    In script_2 change the call to script_1(lay sch) to the following:

    let(((poport report_file))
      script_1(lay sch)
    )

    This will override the poport variable (using dynamic scoping) to be set to report_file and any printing will go into report_file instead. When the let ends, the previous value of poport will be restored.

    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