• 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 Warning Messages from CIW using SKILL

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 18592
  • 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

Reading Warning Messages from CIW using SKILL

KGh94
KGh94 over 7 years ago

Hello,

Is it at all possible to read the warning messages that pop up in CIW? I would like to use those messages for debug purposes.

Something like read(woport)

Best regards,
Karam

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 7 years ago

    Hi Karam,

    One way is to write a macro which redirects the woport temporarily to a string port:

    defmacro(CCFcaptureWarnings (@rest body)
      `let(((tempPort outstring()))
        unwindProtect(
          ;------------------------------------------------------------------
          ; main clause - using dynamic scoping, redirect woport to tempPort
          ; and then invoke the forms passed in as the argument to the
          ; macro
          ;------------------------------------------------------------------
          {
            let(((woport tempPort))
              ,@body
              ; next two lines are to force final warning to be flushed
              warn("")
              getWarn()
            )
            ;----------------------------------------------------------------
            ; return value is the data written to the string port
            ;----------------------------------------------------------------
            getOutstring(tempPort)
          }
          ;------------------------------------------------------------------
          ; always execute the close even if there was an error in
          ; the code above
          ;------------------------------------------------------------------
          close(tempPort)
        )
      )
    )

    This uses dynamic scoping to ensure that woport is returned to its original value. Then you can wrap the code which is generating the warnings as follows, and the return value is the captured warnings:

    a=CCFcaptureWarnings(
      warn("hello\n")
      warn("world\n")
      warn("testing 123\n")
    )

    The variable a contains the text of the warnings.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • KGh94
    KGh94 over 7 years ago in reply to Andrew Beckett

    Hello Andrew,

    Thank you for your quick response, and apologies for my slow reply. The code you provided works if I am the one issuing the warnings. However, I am trying to read the warnings that the tools generate. For example, when the Schematic Editor issues a warning about floating nets. I would like to read the information contained in that warning message using SKILL.

    Any hints would be appreciated.

    Best regards,
    Karam

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to KGh94

    Hi Karam,

    If you call a Cadence SKILL function that generates warnings (e.g. a schematic SKILL function) then the code I provided would also capture the warnings.

    Presumably you want to capture the warnings during the invocation of some schematic editor command? If not, please clearly describe what you're doing and how you'd expect to capture the warnings for this.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • KGh94
    KGh94 over 7 years ago in reply to Andrew Beckett

    Hello Andrew,

    My apologies for the confusion, I'll try to clarify on the purpose.

    myInstance = dbCreateInst(cellView instanceID deviceName x:y orient)         ; creating an instance
    myInstance->width = "100u"                                                   ; set instance width
    CCSinvokeInstCdfCallbacks(myInstance)                                        ; invoke cdf callback

    Then I get a warning message in CIW: *Warning* Width too large

    So the idea would be to somehow get that warning into my SKILL code

    Best regards,
    Karam

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to KGh94

    Hi Karam,

    Assuming that the warning appears in the orange colour in the CIW, then you should just be able to do:

    theWarning=CCFcaptureWarnings(
      CCSinvokeInstCdfCallbacks(myInstance) ; invoke cdf callback
    )

    However, it's possible that the CDF callback code in the PDK you're using is not using warn() to print messages but is just printing a string using printf that happens to have the text "*Warning"" in it (in which case the text would come out in black in the CIW); it's the warning port (woport) that shows in orange normally.

    I've assumed it was the CDF callback that produced the warnings - you could put the whole block of code above inside CCFcaptureWarnings if you wish.

    Regards,

    Andrew.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to KGh94

    Hi Karam,

    Assuming that the warning appears in the orange colour in the CIW, then you should just be able to do:

    theWarning=CCFcaptureWarnings(
      CCSinvokeInstCdfCallbacks(myInstance) ; invoke cdf callback
    )

    However, it's possible that the CDF callback code in the PDK you're using is not using warn() to print messages but is just printing a string using printf that happens to have the text "*Warning"" in it (in which case the text would come out in black in the CIW); it's the warning port (woport) that shows in orange normally.

    I've assumed it was the CDF callback that produced the warnings - you could put the whole block of code above inside CCFcaptureWarnings if you wish.

    Regards,

    Andrew.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
  • KGh94
    KGh94 over 7 years ago in reply to Andrew Beckett

    Wow, it worked. You're a wizard, Andrew!

    Thanks a lot! Smiley

    • 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