Home > Community > Forums > Custom IC SKILL > redirecting the log from CIW to file for forms with nested procedures

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 redirecting the log from CIW to file for forms with nested procedures 

Last post Wed, Jan 2 2013 5:23 AM by Andrew Beckett. 1 replies.
Started by Chikoo 05 Sep 2012 10:10 PM. Topic has 1 replies and 939 views
Page 1 of 1 (2 items)
Sort Posts:
  • Wed, Sep 5 2012 10:10 PM

    • Chikoo
    • Not Ranked
    • Joined on Wed, Oct 12 2011
    • Posts 7
    • Points 110
    redirecting the log from CIW to file for forms with nested procedures Reply

    Hi,

    Is there a way to redirect the log from CIW to a log file when you have multiple procedures that are being called.

    I have seen the command hiStartLog() and hiEndLog() which will allow you to send all log data to an additional second file for a sinlge function.As there are multiple callbacks(nested functions) in case of forms etc  the same cannot be used in that case.

    Is there any other option to save the log?

    Thanks ,

    Chikva.

    • Post Points: 20
  • Wed, Jan 2 2013 5:23 AM

    Re: redirecting the log from CIW to file for forms with nested procedures Reply

     I don't really see why you can't use hiStartLog or hiEndLog for this purpose. Another alternative is to redefine the poport, errport and woport variables to write to a different file (but this must be used with caution).

    A couple of SKILL++ code files which might help:

    /* abRedirectOutput.ils
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Aug 12, 1998 
    Modified   Dec 22, 2011 
    By         A.D.Beckett
    
    Call using abRedirectOutput(t) or abRedirectOutput(nil)
    to turn printing to CIW on or off.
    
    Note, this is SKILL++, so requires file to end in .ils
    
    ***************************************************
    
    SCCS Info: @(#) abRedirectOutput.ils 12/22/11.11:08:13 1.3
    
    */
    
    /* going to define abRedirectOutput */
    (define abRedirectOutput nil)
    
    /* private variable containing port to /dev/null */
    (let (nullport)
    
    (procedure (redirect on)
      (if on
          (progn
           (unless nullport
                   (setq nullport (outfile "/dev/null")))
           (setq poport nullport)
           )
          (progn
           (setq poport (inSkill stdout))
           (close nullport)
           (setq nullport nil)
           )
          )
      on)
    
    /* export it */
    (setq abRedirectOutput redirect)
    )
      
    And the other:

     

    /* abPoPortPush.ils
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Jan 20, 1999 
    Modified   
    By         
    
    Defines two functions abPoPortPush(port) and abPoPortPop()
    which allow the current poport to be replaced by a new value,
    and restored afterwards. Implemented internally as a stack,
    so the calls can be nested.
    
    This is SKILL++ code, so must keep the .ils extension
    
    ***************************************************
    
    SCCS Info: @(#) abPoPortPush.ils 01/20/99.08:23:43 1.1
    
    */
    
    /* make the normal output port accessible */
    (importSkillVar poport)
    
    /* predeclare exported functions - don't have to do this really */
    (define abPoPortPush nil)
    (define abPoPortPop nil)
    
    (let (portStack)
      (defun portPush (port)
             (setq portStack (cons poport portStack))
             (setq poport port)
             )
      (defun portPop ()
             (when portStack
                   (setq poport (prog1 (car portStack) 
                                       (setq portStack (cdr portStack))))
                   ))
      /* export the functions */
      (setq abPoPortPush portPush)
      (setq abPoPortPop portPop)
      )
    

     

     

    • Post Points: 5
Page 1 of 1 (2 items)
Sort Posts:
Started by Chikoo at 05 Sep 2012 10:10 PM. Topic has 1 replies.