• 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. Export transient waveform of ADE Explorer Testbench with...

Stats

  • Replies 4
  • Subscribers 148
  • Views 261
  • Members are here 0

Export transient waveform of ADE Explorer Testbench with Ocean

MarkyMark
MarkyMark 7 days ago

Hi there,

I'm currently trying to automate data generation for transient simulation with multi-dimensional sweeps using ADE Explorer testbench. I have a test defined for transient simulation. I was trying to modify the Ocean script (obtained from file => save as ocean script) by a couple additional lines to directly export the waveforms (voltage/current vs time) after the simulations have finished.

To generate the results before (and export them to a csv for all variable permutations) I was using "plot all" then selected all curves, then export and save as a csv. This gives me two columns (one for X = time, one for Y = voltage/current, for a given combination of variables). For large amount of sweep this becomes unpractical, which is why I also why I want to automate it.

I didn't figure out the commands to export specific signals (lets say /OUT and /IN) to a csv like that, does anyone know how to do it?

Regards

This is the basic code I am using (corners and sweeps not included here for simplicity):



;====================Set to Maestro mode assembler =============================
ocnSetXLMode("assembler")

;====================== Tests setup ============================================

;---------- Test "test_tran" -------------
ocnxlBeginTest("tran_prbs_in")
simulator( 'spectre )
design( "lib" "cell" "view")

analysis('tran ?stop "2n" ?errpreset "conservative" ?step "1p"
?maxstep "1p" ?minstep "1p" )

saveOption( 'save "all" )
temp( 27 )
ocnxlOutputSignal( "/IN" ?plot t ?save t)

ocnxlOutputSignal( "/OUT" ?plot t ?save t)

ocnxlEndTest() ; "tran_prbs_in"

;====================== Run command ============================================
ocnxlRun( ?mode 'sweepsAndCorners ?nominalCornerEnabled nil ?allCornersEnabled t ?allSweepsEnabled t)
ocnxlOutputSummary(?exprSummary t ?specSummary t ?detailed t ?wave t)
ocnxlOpenResults()


saveFile = "dummy_filename.csv"

* here I would like some code to export the aforementioned data* :)

;====================== End XL Mode command ===================================
ocnxlEndXLMode("assembler")

  • Cancel
  • Sign in to reply
  • TF202506034656
    TF202506034656 5 days ago

    I'm not too familiar with ocnxl commands but assuming it follows the usual process and you are able to get your "/IN" and "/OUT" as waveform objects (drIsWaveform(VT("/IN") == t) then you can write a quick waveformToCsv script. This is a barebones one I made that should work. I'd add more error checking if I were to use it.

    procedure(waveformToCSV(wave file_path)
    let(( xvec yvec len fp )

    xvec = drGetWaveformXVec(wave)
    yvec = drGetWaveformYVec(wave)

    when( or( null(xvec) null(yvec))
    error("invalid waveforms")
    )

    len = min( drVectorLength(xvec) drVectorLength(yvec))
    fp = outfile(file_path)

    unless(portp(fp)
    error("couldnt open file")
    )

    for( i 0 len-1
    fprintf(fp "%.15g,%.15g\n" drGetElem(xvec i) drGetElem(yvec i)
    )
    close(fp)
    )
    )
    )


    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 5 days ago in reply to TF202506034656

    A simpler approach is probably just to add an output with an expression:

    awvSaveToVCSV(list(expr1 expr2 expr3) "./someFile.vcsv")

    where expr1 expr2 etc could be VT("/sig1") VT("/sig2") etc. You could then set the evalType of this output expression to "all" and it will then save the waveforms across all sweep points into a single ViVA CSV file...

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • TF202506034656
    TF202506034656 5 days ago in reply to Andrew Beckett

    This is definitely easier! I never knew this existed. Out of curiosity, why is a similar procedure not defined under the dr functions? That's where I was looking when I decided to just create my own.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 5 days ago in reply to TF202506034656
    TF202506034656 said:
    Out of curiosity, why is a similar procedure not defined under the dr functions? That's where I was looking when I decided to just create my own

    It's really just about the hierarchy of API layers. The dr functions are quite low-level, and don't really provide general capabilities beyond that.

    Andrew

    • Cancel
    • Vote Up +1 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