• 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. Open Simulation Output Text Files When Maestro Simulation...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 144
  • Views 8150
  • 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

Open Simulation Output Text Files When Maestro Simulation is Completed

sts
sts over 2 years ago

Hi,

The PDK that I am currently using creates some additional output files with SOA (Safe Operating Area) warnings but these warnings not printed at spectre.out file which I got used at another process. So to control existence of any warning I need to check manually these files at related libraryName/cellName/historyName simulation folder. This is both an inefficient way of doing job and it is easy to forget this check which may have painful consequences.

I am able to get path of these output files when simulation finished using axlGetSessionLibName(), axlGetSessionCellName(), axlGetHistoryName() functions. So my strategy is writing a SKILL code that will be loaded at .cdsinit and when any simulation run and completed this code will be triggered. Then the code will get path of these additional output files and will open the files with text editor. However, I couldn't succeed to trigger completion of a maestro simulation which is where I need your help. 

Thanks.

Sedat Sener

  • Cancel
  • sts
    sts over 2 years ago

    Sorry, I forgot to say tool versions at above. I use ICADVM20.1-64b version of Virtuoso and 21.1.0.751 version of Spectre.

    Also, I want share 3 different solution method that I encountered for the above problem. All of them propesed by Andrew Beckett at different years. However, I couldnt achieve to apply any of them.

    Method-1 at 2004

    https://www.thecadforums.com/threads/analog-artist-want-to-trigger-a-skill-function.33351/

    It is nice trick I think but I have no previous experience with custom calculator functions so after I gave some time I searched for other solutions.

    Method-2 at 2008

    https://groups.google.com/g/comp.cad.cadence/c/Xby6PfJI07A 

    This method exceeds my shell script knowledge so I skipped it for a while.

    Method-3 at 2015

    https://community.cadence.com/cadence_technology_forums/f/custom-ic-design/31028/ade-l---run-script-automatically-after-simulation-is-finished

    Actually this is the method I want to apply most which uses asiRegCallBackOnSimComp() function. However despite of I use below example from Cadence Help with both trying asiRegCallBackOnSimComp(), asiRegCallBackOnSimCompForDist() functions it doesnt print anything.

    session = asiGetCurrentSession()
    procedure(myDistributedCallbackFunc(session status)
    printf("Session:%L \n Status:%L \n " session status)
    )
    asiRegCallBackOnSimCompForDist(session 'myDistributedCallbackFunc)

    Thanks in advance.

    Sedat Sener 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 2 years ago in reply to sts

    Dear sts,

    sts said:
    However despite of I use below example from Cadence Help with both trying asiRegCallBackOnSimComp(), asiRegCallBackOnSimCompForDist() functions it doesnt print anything.

    I am not sure if you were running a dsitributed job, but the asiRegCallBackOnSimCompForDist() function is for distributed jons. If you are not running a distributed job the function is asiRegCallBackOnSimComp(). In addition, in th example provided i the mae SKILL Reference Manual for the latter, the call back function, myfunc,  is defined as follows:

    asiRegCallBackOnSimComp(asiGetCurrentSession 'myfunc)

    (defmethod myfunc (session status)
    ....
    )

    Have you tried using defmethod()  for your callback function?

    Secondly, another possibility that came to mind was to add an ocean script as an output with your SKILL code in the ocean script. When the simulation completes, Assembler will run the ocean script.

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sts
    sts over 2 years ago in reply to ShawnLogan

    Thanks Shawn for your answer.

    Answer to your first question I didnt try defmethod. Actually I didnt try to use asiRegCallBackOnSimComp function again, after I posted this question. I was researching for writing some shell script to call instead spectre as suggested above in method-2 (in my second post). Then, I encountered with ADE SKILL Reference Session Functions and in there particularly with axlSessionRegisterCreationCallback function. It comes with 6 examples and using these I wrote below code.

     

    ;Author Sedat Sener
    ;Language SKILL
    ;Revision No v3
    ;Date Created August 16, 2023
    ;Description: This code opens simulation related output files after simulation is completed


    (defun ADE_runFinishedConclusion_Trigger_v3 (ADEsession @optional ADEsession1 ADEsession2 ADEsession3)
    history = axlGetHistoryName(axlGetCurrentHistory(ADEsession)) ;gets interactive name
    lib = axlGetSessionLibName(ADEsession) ;gets library name
    cell = axlGetSessionCellName(ADEsession) ;gets cell name
    view = axlGetSessionViewName(ADEsession) ;gets cellview (maestro in my case)
    test = caadr(axlGetTests(axlGetMainSetupDB(ADEsession))) ;gets name of first test
    printf("\nHistory Name: %s\nLibrary Name: %s\nCell Name: %s\nSimulator Name: %s\nTest Name: %s\n" history lib cell view test)

    VWD = getWorkingDir() ;Virtuoso Working Directory
    potfo = sprintf(nil "%s/simulations/%s/%s/maestro/results/maestro/%s/1/%s/netlist/nameofoutputfile" VWD lib cell history test) ;path of text file output for single run
    printf("%s" potfo)
    potfofo = sprintf(nil "gedit %s &" potfo) ;path of text file output for open
    system(potfofo) ;opens text file with gedit text editor
    hiViewTextFile(potfo ?fixedFont t) ;opens text file with Virtuoso text window
    ) ;end of defun

    (axlSessionRegisterCreationCallback (lambda (session) (axlSessionConnect session "runFinishedConclusion" 'ADE_runFinishedConclusion_Trigger_v3)))

    Which is for right now only for single run ("1" in potfo variable at above code indicates 1st corner). If corner simulation is intented to run, some loop should be added. When this code loaded at .cdsinit it will be run for all simulations.

    However, my biggest exploration is in order to callback to be active, ADE session (Assembler, Explorer, etc) requires to be opened after callback is defined. I didnt try again but I think this is probably same reason why I couldnt succeed to run asiRegCallBackOnSimComp function.

    Also thanks for your second suggestion I might not look at it right now but I will keep it in mind.

    Best regards,

    Sedat Sener

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to sts

    Sedat,

    Using the runFinishedConclusion signal is the right way to do this - using the "asi" functions are really intended for ADE L/OCEAN and not really appropriate for ADE XL, Explorer or Assembler.

    So your code should work. I didn't understand what you meant by:

    sts said:
    However, my biggest exploration is in order to callback to be active, ADE session (Assembler, Explorer, etc) requires to be opened after callback is defined.

    If you are saying that using the code above, then nothing will happen for any currently open maestro views, then that's correct - because you are connecting the signal within axlSessionRegisterCreationCallback - and that only gets fired when the ADE session is opened.

    If you have an already running ADE session, you can add the signal using:

    axlSessionConnect(axlGetWindowSession() "runFinishedConclusion" 'ADE_runFinishedConclusion_Trigger_v3)

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sts
    sts over 2 years ago in reply to Andrew Beckett

    Thanks for reply

    Yes, Indeed code works. Sorry for the ambiguity in my post. I added load for the code at .cdsinit and after each simulation completed ADE_runFinishedConclusion_Trigger_v3 function triggered properly.

    Andrew Beckett said:
    If you are saying that using the code above, then nothing will happen for any currently open maestro views, then that's correct

    Yes, I meant that actually. Knowing axlSessionConnect/axlSessionDisconnect could save my life:D While iterating above code, I closed and relaunched virtuoso many times. 

    Best regards.
    Sedat

    • 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