• 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. Plotting stb/xf simulation results coming from different...

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 143
  • Views 1078
  • 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

Plotting stb/xf simulation results coming from different result folders via SKILL

unSkilled
unSkilled over 6 years ago

IC6.1.7-64b.500.13

Hi all,

I have some Monte Carlo simulation results distributed in several folders and I want to recursively go through them and plot in ViVA. For this I have created the ocean script below. It allows me to access most of the simulation results the way I intend to, however, it does not work for stb (gain, phase) or for xf results. Could you point me to what I'm doing wrong or a workaround to my approach?

list_of_folders = pcreMatchList("MC" getDirFiles(root_folder)); root_folder has previously being defined

;for creating histograms is necessary to artificially generate a waveform and use histogram2D function. vectors to
;store measurement data or dcOp points are needed within the for loop for later processing.

;definition of vectors to be used

xaxis = drCreateVec('double 300) ; vector containing the sample number

dc_vref_lownoise_1v2 = drCreateVec('double 300)
dc_ibias1uA = drCreateVec('double 300)
ppm_vref_lownoise_1v2 = drCreateVec('double 300)
ppm_ibias1uA = drCreateVec('double 300)
dcGain = drCreateVec('double 300)
pm = drCreateVec('double 300)
gm = drCreateVec('double 300)
ugf = drCreateVec('double 300)
widebandNoise = drCreateVec('double 300)


for(i 0 9
mc_folder = strcat(root_folder "/" nth(i list_of_folders) "/psf")
resultsDir(mc_folder); Define the directory where to check for results

;extract the data to be presented as a family of plots. This data can be directly obtained from the results folder

tran_vref_lownoise_1v2 = v("a_vref_lownoise_1v2" ?result 'tran ?resultsDir mc_folder)
plot(tran_vref_lownoise_1v2)

temp_vref_lownoise_1v2 = v("a_vref_lownoise_1v2" ?result 'dc ?resultsDir mc_folder)
plot(temp_vref_lownoise_1v2)

tran_ibias1uA = i("/IPRB1/PLUS" ?result "tran" ?resultsDir mc_folder)
plot(tran_ibias1uA)

temp_ibias1uA = i("/IPRB1/PLUS" ?result "dc" ?resultsDir mc_folder)
plot(temp_ibias1uA)

tran_vrefhdreg_1v2 = v("/a_vref_hd_hdreghv_1v2" ?result "tran" ?resultsDir mc_folder)
plot(tran_vrefhdreg_1v2)

temp_vrefhdreg_1v2 = v("/a_vref_hd_hdregflash_1v2" ?result "dc" ?resultsDir mc_folder)
plot(temp_vrefhdreg_1v2)

dB20 = dB20(mag(getData("loopGain" ?result "stb" ?resultsDir mc_folder))) ;doesn't work
plot(dB20)

phase = phaseDegUnwrapped(getData("loopGain" ?result "stb" ?resultsDir mc_folder)) ;doesn't work
plot(phase)

outputNoise = getData("out" ?result "noise" ?resultsDir mc_folder) ;WORKS! :)
plot(outputNoise)

psrr = db(getData("/V0" ?result "xf")) ;doesn't work
plot(psrr)

;HISTOGRAM VECTORS
drSetElem(xaxis i i)
; low noise 1.2V reference
yaxis = value(v("a_vref_lownoise_1v2" ?result 'dcOp ?resultsDir mc_folder) 0)
drSetElem(dc_vref_lownoise_1v2 i yaxis)

; 1.0 uA bias current
yaxis = value(i("/IPRB1/PLUS" ?result "dcOp" ?resultsDir mc_folder) 0)
drSetElem(dc_ibias1uA i yaxis)
)
;CREATE AND PLOT THE HISTOGRAMS

newWindow()
theWave=drCreateWaveform(xaxis dc_vref_lownoise_1v2)
theHistogram = histogram2D(theWave 10 "standard" t t)
plot(theHistogram)

newWindow()
theWave=drCreateWaveform(xaxis dc_ibias1uA)
theHistogram = histogram2D(theWave 10 "standard" t t)
plot(theHistogram)

Thanks in advance,

  • 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