Home
  • Products
  • Solutions
  • Support
  • Company

This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  • Products
  • Solutions
  • Support
  • Company
Community Custom IC SKILL How to obtain the PSF directory for each sweep point using...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 137
  • Views 2111
  • 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 obtain the PSF directory for each sweep point using Skill or Ocean?

dontpanic
dontpanic 7 months ago

Hi! I normally run matlab post-processing scripts on my testbenches, and would take advantage of the "axlCurrentResultsPath" function to get the PSF directory of each individual point in sweeps (my testbenches usually dump the simulation data of interest in that directory). In fact, I often would use the following 1-line script to define an output "pointPsfDir" in my Maestro views, which is then used by other outputs for doing further processing:

%===============================================================================
% pointPsfDir.m
%===============================================================================
axlResult = axlCurrentResultsPath();

How can I achieve the same *without resorting to Matlab* (I need to cut down Matlab usage as much as possible)?

I tried using the Ocean script below (I initially wanted to do this with a Skill function but was unable to achieve what ocnxlGetPointId() does) to the exact same purpose (i.e. define an output in my Maestro views with the PSF directory of each individual sweep point), but despite it working for 1-point simulations (i.e. the "Nominal" corner), it doesn't work when running sweeps (which I normally define as corners in my Maestro views):

;===============================================================================
; simInfo.ocn
;===============================================================================

    session = axlGetWindowSession()
    sessionDB = axlGetMainSetupDB(session)
    testName = nth(0 setof(testName cadr(axlGetTests(sessionDB)) axlGetEnabled(axlGetTest(sessionDB testName)) ))
    historyID = axlGetHistoryEntry(sessionDB axlGetHistoryName(axlGetCurrentHistory(session)))
    cornerName = axlGetCornerNameForCurrentPointInRun()
    designPointId = ocnxlGetPointId()

    pointPsfDir = axlGetPointPsfDir(historyID testName ?cornerName cornerName ?designPointId designPointId)
    axlOutputResult(pointPsfDir "pointPsfDir")
    axlAddOutputs('("pointPsfDir"))

For example, I get these errors in the CIW when running a 3-point sweep defined as a corner named "TB__VDD":

ERROR (ASSEMBLER-2224): Could not find point id for corner name : TB__VDD_0 and design point : nil pair
Ensure that the corner name and design point are correct and then retry.

ERROR (ASSEMBLER-2709): Evaluation of output 'pointPsfDir' returned 'nil' for test:'debug'.
Ensure that the definition of output is correct.

ERROR (ASSEMBLER-2224): Could not find point id for corner name : TB__VDD_1 and design point : nil pair
Ensure that the corner name and design point are correct and then retry.

ERROR (ASSEMBLER-2709): Evaluation of output 'pointPsfDir' returned 'nil' for test:'debug'.
Ensure that the definition of output is correct.

ERROR (ASSEMBLER-2224): Could not find point id for corner name : TB__VDD_2 and design point : nil pair
Ensure that the corner name and design point are correct and then retry.

ERROR (ASSEMBLER-2709): Evaluation of output 'pointPsfDir' returned 'nil' for test:'debug'.
Ensure that the definition of output is correct.

Thanks in advance for any help!

KR, Jorge.

  • Cancel
  • dontpanic
    dontpanic 7 months ago

    Well, after lots of debugging it seems I got an Ocean script that kind of works (see below). For some reason, when running sweeps the outputs that depend on the value of "pointPsfDir" never get properly evaluated upon running the simulation, requiring always output re-evaluation with the "full" option.

    I would still be grateful for any feedback on (1) code improvements, or (2) a way of doing it with a Skill function (so as not to need to define Ocean outputs in Maestro).

    KR, Jorge.

    P.S. Also there seems to be some sort of "caching" of the script, because changes in it don't seem to immediately reflect in the executed behavior (e.g. after commenting the debug printf()'s, the text is still printed to the CIW) ...if this is the case, is there a way do disable caching it altogether?

    ;===============================================================================
    ; simInfo.ocn
    ;===============================================================================

        session = axlGetWindowSession()
        sessionDB = axlGetMainSetupDB(session)
        testName = nth(0 setof(testName cadr(axlGetTests(sessionDB)) axlGetEnabled(axlGetTest(sessionDB testName)) ))
        historyID = axlGetHistoryEntry(sessionDB axlGetHistoryName(axlGetCurrentHistory(session)))
        cornerName = axlGetCornerNameForCurrentPointInRun()
        designPointId = ocnxlGetPointId()

        if( cornerName==nil then

    ;        printf("D: Single-point sim detected =========================================\n")
            pointPsfDir = axlGetPointPsfDir(historyID testName ?cornerName cornerName ?designPointId designPointId)

        else

    ;        printf("D: Sweep detected =========================================\n")
            printf("cornerName: %s\n" cornerName)

            rexCompile(".*_")
            designPointIdStr = rexReplace(cornerName "" 0)
            printf("designPointIdStr: %s\n" designPointIdStr)
        
            rexCompile(sprintf(nil "_%s" designPointIdStr))
            cornerNameRoot = rexReplace(cornerName "" 0)
            printf("cornerNameRoot: %s\n" cornerNameRoot)

    ;        pointPsfDir = axlGetPointPsfDir(historyID testName ?cornerName cornerName ?designPointId designPointId); ; doesn't work :(
            pointPsfDir = axlGetPointPsfDir(historyID testName ?cornerName cornerName ?designPointId 1)

        )


        axlOutputResult(pointPsfDir "pointPsfDir")

        ; Actual outputs
        axlAddOutputs('("pointPsfDir"))





    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dontpanic
    dontpanic 6 months ago in reply to dontpanic

    Nevermind--the above script will break as soon as more than 1 test is enabled. As it seems there's no way to determine the test being run using Skill/Ocean, I guess I'm stuck with using a Matlab for the time being...

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • henker
    henker 6 months ago in reply to dontpanic

    I'm using the following to do some "per simulation" post processing (stripped out from actual code, so handle with care)

    ;====================================================================
    ;; Maestro (assembler/explorer) pointSimulationCompleted trigger
    ;; is triggered multiple times
    ;====================================================================
    procedure( Mae_pointSimulationCompleted(session history testName dataPoint)
    ;printf("pointSimulationCompleted %L %L %L %L\n" session history testName dataPoint)
    	let( (psfDir)
    		; axlGetHistoryResultsDir(history) get the overall result dir
    		; netlist and psf are in <ResultsDir>/<dataPoint>/<testName>/
    		psfDir = sprintf(nil "%s/%d/%s/psf" axlGetHistoryResultsDir(history) dataPoint testName)
    		printf("PSF location for the current run is %s\n" psfDir)
    		t
    	)
    )
    
    
    ;====================================================================
    ;; Maestro (assembler/explorer) trigger initialisation
    ;====================================================================
    procedure( Mae_InitTrigger(session_name)
    
    	; register pointSimulationCompleted callback
    	; (executed after single simulation point is finished)
    	axlSessionConnect(session_name "pointSimulationCompleted" 'Mae_pointSimulationCompleted )
    
    ); procedure
    ;====================================================================
    
    
    ;====================================================================
    ; Explorer/Assembler Trigger
    ; Register a callback to connect the triggers on session start
    axlSessionRegisterCreationCallback('Mae_InitTrigger)

    The caching is done with starting explorer/assembler, the session gets all data on startup prob. to be able to run standalone and not being disturbed while running the simulation. So if you change something on the code, you have to restart the simulator session.

    • 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