The Designer's Guide Community Forum https://designers-guide.org/forum/YaBB.pl Simulators >> Circuit Simulators >> Is it possible to view the source code of a SpectreRF function? https://designers-guide.org/forum/YaBB.pl?num=1619778721 Message started by StevenH on Apr 30th, 2021, 3:32am

 Title: Is it possible to view the source code of a SpectreRF function? Post by StevenH on Apr 30th, 2021, 3:32am There is a function in SpectreRF called "pn", it takes as an argument the results of a noise analysis and outputs the phase noise data at a given frequency (for example, pn('hbnoise)). Is it possible to view the SKILL source code of this function to see how it's implemented? I'm more interested in the formula/convention that's used to define the phase noise (measured in dBc/Hz) rather than the code itself.Say I do a PM noise analysis, and let's call the phase modulation magnitude spectrum outputted A in (V/sqrt(Hz)). Which mathematical formula does pn apply on A? Is it 10log(A^2/power(harmonic(1))? or 10log(A^2/harmonic(1)^2)? or is it something else?

 Title: Re: Is it possible to view the source code of a SpectreRF function? Post by Andrew Beckett on Dec 29th, 2021, 7:44am No you can't see the source for it, but it's computing:db20(getData("out" "pnoise_pm") / (harmonic(v("pos" ?result "pss")-v("neg" ?result "pss") harmNum) / sqrt(2)))where "pnoise_pm" is whatever the noise analysis was and "pss" is whatever the large-signal analysis was, and the "pos" and "neg" are the specified positive and negative output nodes for the pnoise analysis (if the negative node isn't specified, it defaults to ground).The 'out" is the normal output noise from the analysis (it's always called "out"), so is in V/sqrt(Hz)Andrew