• 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. How to print special character like " using sprintf()

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 5183
  • 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

How to print special character like " using sprintf()

RFStuff
RFStuff over 4 years ago

Dear All,

I am trying to use getAsciiWave() in SKIL script. I want to vary the Y-column value.

So, I tried as below:-

ITR4=1

getAsciiWave(sprintf( nil "\"/mxp/ESD/INL_PI_64_CODE_MC.csv\" 1 %d ?xskip 0 ?yskip 0 ?formatFloat nil ?xName \"CODE#\" ?xUnits \"[]\" ?yName \"DELAY\" ?yUnits \"fs\"", ITR4)  )

The problem in above is the special character ". I tried using \ before it. This way sprintf works but it gives \" instead of ".

How this can be overcome ?

Kind Regards,

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

    I'm not sure why you're doing all this messing around with sprintf. The filename isn't changing, and the other arguments can just be passed as variables. So doing

    getAsciiWave("/mxp/ESD/INL_PI_64_CODE_MC.csv" 1 ITR4 ?xskip 0 ?yskip 0 ?formatFloat nil ?xName "CODE#" ?xUnits "[]" ?yName "DELAY" ?yUnits "fs")

    would do the job. Your approach is building a file name with spaces and ?xskip and ?yskip (and quotation marks) built into the string, which is definitely not what you want to do!

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    I'm not sure why you're doing all this messing around with sprintf. The filename isn't changing, and the other arguments can just be passed as variables. So doing

    getAsciiWave("/mxp/ESD/INL_PI_64_CODE_MC.csv" 1 ITR4 ?xskip 0 ?yskip 0 ?formatFloat nil ?xName "CODE#" ?xUnits "[]" ?yName "DELAY" ?yUnits "fs")

    would do the job. Your approach is building a file name with spaces and ?xskip and ?yskip (and quotation marks) built into the string, which is definitely not what you want to do!

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • RFStuff
    RFStuff over 4 years ago in reply to Andrew Beckett

    Thanks a lot Andrew.

    Assigning the filename or any other parameter to a variable does work fine.

    Also one more query:-

    Can we plot using getAsciiWave() for a file of below type:-->

    tx, 2

    rx, 5

    cdr, 6

    The first column is the Xaxis and the second column is the Yaxis.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to RFStuff

    No. It only supports numerical column data.

    It wouldn't be too hard to write some SKILL to read the file and produce the waveform data though (I don't have anything to hand that does this though).

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 4 years ago in reply to Andrew Beckett

    Can we use CCSCreateWaveCSV().

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to RFStuff

    Not unless you rewrite it. It assumes that both columns are numerical.

    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