chlai
Junior Member
![* *](https://designers-guide.org/forum/Templates/Forum/default/starblue.gif)
Offline
![](https://designers-guide.org/forum/avatars/fredflinstone.gif)
Save the earth~
Posts: 13
Taipei, Taiwan
|
Hi Ken, (Orz)
Thanks very much for your advice, again. I tried to modify the modulus number, but it still not converged. Then I tried to delelte the idt() or idtmod(), to make phase_nonlin constant, but it still not converged, either.
I am sorry that I didn't specify the simulation siuation to you. Part of the verilogA code of VCO is described below: [/color]
module VCO_bhvmdl(vtune, vref, vout, voutb); input vtune, vref; output vout, voutb; electrical vtune, vref, vout, voutb; parameter real amp = 150m; parameter real fc = 864K; parameter real Kvco = 227K; parameter real Vcomm = 1; real wc; // center freq in rad/s
real phase_lin; // wc*time component of phase real phase_nonlin; // the idt(k*f(t)) of phase
integer num_cycles; // number of cycles in linear phase component
real inst_freq; // instanteous frequency analog begin
@ ( initial_step ) begin wc = 2 * `PI * fc; end
// // linear portion is calculated so that it remains in the +/- 2`PI range // This is to ensure it's value doesn't get too large and cause rounding // problems for calculation of the phase. // phase_lin = wc * $abstime; num_cycles = phase_lin / (2*`PI); phase_lin = phase_lin - num_cycles * 2 * `PI;
phase_nonlin = 2 * `PI * Kvco * idtmod( V(vtune, vref), 0, 1 ); // phase_nonlin = 0; V(vout) <+ Vcomm + amp * sin (phase_lin + phase_nonlin); V(voutb) <+ Vcomm + amp * sin (phase_lin + phase_nonlin + `PI); // // ensure that modulator output recalculated soon. // inst_freq = fc + Kvco * V(vtune, vref); $bound_step (0.02 / inst_freq); end endmodule [color=Black]
The VCO has differential input, and I tied them together to ground. So this vco oscillates only 864KHz without any noise.
In transient simulation, the vco oscillates perfect at 864KHz, and no time delay. However in PSS analysis, no matter what value I set in tstab (1us, 5us, 20us, 100us), it cannot work.
The simulation file is described below: [/color] simulator lang=spectre global 0 include "/.../artist/ahdlLib/quantity.spectre"
I0 (0 0 out outb) VCO_bhvmdl ic out=1.01 outb=1 simulatorOptions options reltol=1e-5 vabstol=1e-8 iabstol=1e-13 temp=27 \ tnom=27 scalem=1.0 scale=1.0 gmin=1e-12 rforce=1 maxnotes=5 maxwarns=5 \ digits=5 cols=80 pivrel=1e-3 ckptclock=1800 \ sensfile="../psf/sens.output" tran tran stop=10u write="spectre.ic" writefinal="spectre.fc" \ annotate=status maxiters=5 finalTimeOP info what=oppoint where=rawfile pss ( out outb ) pss fund=864K harms=10 + errpreset=conservative tstab=10u saveinit=yes method=gear2only + tstabmethod=gear2only annotate=status pnoise ( out outb ) pnoise sweeptype=relative relharmnum=1 + start=10 stop=100M dec=10 maxsideband=4 annotate=status modelParameter info what=models where=rawfile element info what=inst where=rawfile outputParameter info what=output where=rawfile designParamVals info what=parameters where=rawfile saveOptions options save=allpub [color=Black]
Thank you very much for your kindly help. Sincerely yours, Daniel Lai
|