question about getAsciiWave command

Discussion in 'Cadence' started by madhero, Jun 16, 2008.

  1. madhero

    madhero Guest

    Hi All,

    I used getAsciiWave command to draw a waveform from text file, but
    when I use the following command:

    plot(getAsciiWave("test.txt" 1 2 ?xskip 1 ?yskip 1))

    What I want to do is to skip the first line in the file (contains the
    headers), if the first line only contains letters and numbers, it
    worked fine. But if it contains some symbol like ` or (, it will
    return syntax error. Isn't the ?xskip and ?yskip supposed to
    completely ignore the first line? Thanks.

    Regards,

    Weifeng
     
    madhero, Jun 16, 2008
    #1
  2. madhero

    madhero Guest

    The error I met is because of the "`". Because I also need to use this
    file to draw graphs in Saber Scope, I don't want to modify the file.

    The file is like that:

    Vds`V Ids_Vgs_8V`A
    0.00E+00 2.00E-02
    2.00E-01 4.00E-02
    4.00E-01 6.00E-02
    7.00E-01 6.00E-02
    9.50E-01 8.00E-02
    1.30E+00 8.00E-02
    1.55E+00 8.00E-02
    1.85E+00 8.00E-02
    2.15E+00 1.00E-01
    2.45E+00 1.00E-01
    2.75E+00 1.00E-01
    3.05E+00 1.20E-01
    3.30E+00 1.00E-01
    3.65E+00 1.00E-01
    3.90E+00 1.20E-01
    4.20E+00 1.20E-01
     
    madhero, Jun 17, 2008
    #2
  3. madhero

    madhero Guest

    I have another question, how to mark the units (such as volts) using
    getAsciiWave or plot command? Thanks
     
    madhero, Jun 17, 2008
    #3
  4. madhero wrote, on 06/17/08 00:12:
    Because of the way that getAsciiWave parses the file, the title line does need
    to be parsed by the SKILL parser. So it's a limitation - it parses the whole
    file into a list, and then skips the first few entries. It doesn't read the
    lines dumbly in and then parse the ones it needs. If you want this behaviour
    changing, you'd need to contact customer support to get an enhancement request
    to change this.

    As for changing the units, see my sourcelink solution number 11265350

    Put simply, you can do:

    wave3=getAsciiWave("temp1" 1 2)
    drGetWaveformXVec(wave3)~>units="V"
    drGetWaveformXVec(wave3)~>name="Vds"
    drGetWaveformYVec(wave3)~>units="A"

    for example.

    Regards,

    Andrew.
     
    Andrew Beckett, Jun 18, 2008
    #4
  5. madhero

    madhero Guest

    Thank you! I will write a small program to delete the lines. Your
    answer about changing the units helped me a lot, thanks again.

    Regards,

    Weifeng
     
    madhero, Jun 19, 2008
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.