• 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. Reading and printing log file created for a calibre process...

Stats

  • Replies 1
  • Subscribers 143
  • Views 1271
  • Members are here 0

Reading and printing log file created for a calibre process using skill

CG20240827312
CG20240827312 3 months ago

Hi , iam running a calibredrv process using skill using ipcBeginProcess and storing the output in a log file. I want to print licences in use message if "licences occupied message displays in log file. Iam not able to read the log file fwith my following code as i guess the ipcProcess stops everything else the code tries to read the log file before it starts. 

loc=[path]

changeWorkingDir(loc)

funstr="calibredrv [ctrl file] > out.log 2>&1 cellname.gds "

ipcBeginProcess(funstr)

unless(ipcBeginProcess(funstr)

file =infile("out.log")

while(gets(line file

if(rexMatchp("Warning :All Licence In Use" line) then

print("waiting for licence")

)

)

)

The calibre command works fine only issue is with reading the log file. 

  • Sign in to reply
  • Cancel
  • Aurel B
    Aurel B 1 month ago

    Hi,

    You should try a different approach :
    You are starting a child process and reading its log direcly.
    At the time you read the log, your child process might not even be running yet.

    A solution could be to parse the data as it comes from the process :

    procedure( custom_calibre_run ( run_dir ctrl_file "tt" )
      "Run `calibredrv` in RUN_DIR using CTRL_FILE"
      ;; You can add `ipcWait' here if you need to wait for child to terminate
      ipcBeginProcess(
        lsprintf( "cd %s && calibredrv %s cellname.gds 2>&1 " run_dir ctrl_file)
        ""
        lambda( ( _pid data )
          if( rexMatchp("Warning :All Licence In Use" data) then
            print("waiting for licence")
            ;; Follow up code gan go here
            ;; ...
            ))
        ))
    

    Please note that I haven't tested it.
    It might be safer to reconstruct the data to make sure you are reading proper lines.
    (Even though I am almost sure this should work out of the box)

    Cheers,
    Aurel

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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