• 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. Multiple asynchronous ADEXL simulations using SKILL

Stats

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

Multiple asynchronous ADEXL simulations using SKILL

frasheed
frasheed over 9 years ago

Hello,

I am writing a code to run simulations from different cellviews. All these simulations are in ADEXL and there tests has already been setup. All I want to is to open each ADEXL view and run the simulation for each test and then extract the simulation results. I have already written a SKILL code to start the simulation but my code exits before the simulations ends. Can anyone guide me how I can make my script to wait till all simulations ends, so that I can extract the simulation data after this point. Thanks

Here is sample code to run simulation

axl_session=axlCreateSession(getCurrentTime())

hsdb=axlSetMainSetupDBLCV(axl_session libName cell "adexl" ?mode "r")

tests=axlGetTests(hsdb)

;; Get enabled tests
test_names=setof( test
cadr(tests)
axlGetEnabled( axlGetTest( hsdb test )));setof
;; Run simulation
printf("RUNNING SIMULATION\n")
simId = axlRunSimulation(?session axl_session)
jobs = axlGetRunStatus(axl_session)

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Rather than waiting for the simulation to finish, the way to do this is to use the ?callback argument of axlRunSimulation. This will then call a function when the simulations have finished, and then that callback can be used to do all your results processing.

    Kind Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • frasheed
    frasheed over 9 years ago

    Hey Andrew, Thanks for your help. I tried the way you mentioned me but I am stuck when I run multiple simulations. Let me share my whole code here

    axl_session=axlCreateSession(getCurrentTime())

    hsdb=axlSetMainSetupDBLCV(axl_session libName cell "adexl" ?mode "r")
    tests=axlGetTests(hsdb)
    ;; Get enabled tests
    test_names=setof( test
    cadr(tests)
    axlGetEnabled( axlGetTest( hsdb test )));setof

    ;; Run simulation
    printf("[INFORMATION]:\t\t RUNNING SIMULATION\n")
    simId = axlRunSimulation(?session axl_session ?callback "compile(axl_session simId)")

    /***************************************************************
    * RESULTS COMPILATION *
    ***************************************************************/
    procedure(compile(axl_session simId)

    printf("[INFORMATION]:\t\t SIMULATION COMPLETED. NOW COMPILING RESULTS\n")
    history = axlGetRunData(axl_session simId)
    rdbPath = axlGetHistoryResults(history)
    rdb = axlReadResDB(rdbPath)
    ;; HELP COMMAND FOR RESULTS
    ;; axlReadResDB

    ;; Extract results
    foreach(point rdb->points()
    printf("Point %d\n" point->id)
    foreach(corner point->corners()
    printf(" Corner %L\n" corner->name)
    foreach(test corner->tests()
    printf(" Test %L\n" test->name)
    foreach(output test->outputs()
    when(output->type=='expr
    ; take your pick
    ;printf(" Output %s = %s\n" output->name output->valueAsString())
    printf(" Output %s = %L\n" output->name output->value)
    )
    )
    )
    )
    )

    );procedure


    This code reads the user file for library and cell name and then open each cell adexl view, run the simulation for the test and then open the results database and show the simulation results. The problem is when I run 2 simulations and my simId variable value is same for both simulations (i.e. simId = 0) which causes an error while opening the results database. for first simulation run I get this 

    INFORMATION]: SIMULATION COMPLETED. NOW COMPILING RESULTS
    *WARNING* argument must be a fixnum, flonum, complex, or strnum
    Point 1
    Corner "nominal"
    Test "test:pmos:1"

    and for the next simulation I get this output

    [INFORMATION]: SIMULATION COMPLETED. NOW COMPILING RESULTS
    Point 1
    Corner "nominal"
    Test "test:pmos:1"
    Output ID (DC) = 0.0002861345

    the second output is correct but first output is wrong. I guess the due to same simId its targeting the different results database. any hint how could I solve this issue

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    I won't be able to look at this until later (possibly tomorrow) because I'm just about to leave the office for a meeting. However, in the meantime can you let me know which subversion of Virtuoso you're using (Help->About)?

    Thanks,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • frasheed
    frasheed over 9 years ago
    Ok, No problem :) BTW I am using Virtuoso Design Environment IC6.1.6.500.10
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • frasheed
    frasheed over 9 years ago

    Hey Andrew,

    did you get a chance to look into it ?. I figured out that "axl_session" variable gets updated for each run and when any simulation finishes it uses the current value of axl_session to browse the results database, rather then the value that was used for callback.

    • 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