• 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 Design
  3. How can I debug pre-run script and monitor it when it is...

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 125
  • Views 9288
  • 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 can I debug pre-run script and monitor it when it is running?

delgsy
delgsy over 3 years ago

I am trying to do calibration using pre-run script.
The code below does not work which is kind of expected because I am still trying to figure this out.
Is it possible to monitor the calibration when the pre-run script is running?
How can I debug it when I am having error?

The measurement expressions here are error free because I used it during calibration using multiple tests and calcVal.
I am trying to use pre-run hoping to make the flow simpler.

The error message:

The code:

;Use let() to avoid creating global variables
(let (CODE_CHOSEN, TRAN_TOT)

;Debug printf statements are written to the Job log

printf("pre run: Hello World!\n")

;Initialize and inherit the test setup from the current point

ocnxlLoadCurrentEnvironment(?noAnalysis nil)

;Define the analysis if different from the main setup

;Sweep the calibration variable

paramAnalysis("VEN_DAC" ?start 0 ?stop 1.2 ?step 1.2

paramAnalysis("CODE" ?start 0 ?stop 2 ?step 1

analysis('dc ?saveOppoint t ?param "vdc" ?start "1m" ?stop "1200m" ?step "1m" )

analysis('tran ?start 0 ?stop 1u ?step 10n )

))

;analysis('dc ?saveOppoint t ?param "vdc" ?start "1m" ?stop "1200m" ?step "1m" )

;analysis( ’tran ?start 0 ?stop 1u ?step 10n )

;Run a simulation

ocnxlRunCalibration()

;Measurement to find the calibrated value

TRAN_TOT = (cross(VT("/VOUT_INV") 0.6 1 "falling" nil nil nil) - cross(VT("/VOUT_INV") 0.6 1 "rising" nil nil nil))

printf("pre run: TRAN_TOT = %f\n" TRAN_TOT)

CODE_CHOSEN = if((TRAN_TOT == nil) "use_untrimmed" if((VAR("TOT_CHOSEN_UNTRIMMED") == nil) VAR("CODE") if((abs((TRAN_TOT - VAR("TOT_TYP"))) < abs((VAR("TOT_CHOSEN_UNTRIMMED") - VAR("TOT_TYP")))) VAR("CODE") "use_untrimmed")))

printf("pre run: CODE_CHOSEN = %f\n" CODE_CHOSEN)

;Add the calibrated result value to the outputs table

ocnxlAddOrUpdateOutput("TRAN_TOT" TRAN_TOT)

ocnxlAddOrUpdateOutput("CODE_CHOSEN" CODE_CHOSEN)

;Update the main simulation environment with the calibrated result

ocnxlUpdatePointVariable("CODE" CODE_CHOSEN)

ocnCloseSession()

)

  • 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