The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 8:42pm
Pages: 1
Send Topic Print
Non-uniform sampling in VCO model (Read 1362 times)
TraceTheLoad
New Member
*
Offline



Posts: 5
Oregon State
Non-uniform sampling in VCO model
Aug 26th, 2012, 3:36pm
 
Hi ,

I am trying to model a VCO based ADC using verilogAMS . The speed improvement is quite impressive compared to verilogA. However the VCO model that I tried from verilogAMS library from Designer's Guide seems to have an issue .

// Relevant section of the code
 
 initial out = 0;

   always begin
     vin = V(ps, ns);
     #(0.5e9 / (f0 + kvco * vin))
     out = ~out;
   end
endmodule
// End of code

When I try this model for the ADC , the spectrum has harmonics of the input which is affecting the SNDR performance especially at 12 bit levels . I believe this is due to the non-uniform sampling of the input waveform . The input variation within a VCO period is never taken into account in the model and the value of input is probed at different time instants.

Later I wrote a phase domain model of the VCO with the input sampled at regular intervals and with phase accumulation performed at every sampling instant. The phase also gets wrapped around at every PI and the sampling error is passed into the next cycle which helps in first order noise shaping of the sampling error. Relevant section of the code is attached.

//

initial    

   begin
       phase_int=0;
       tsample=5e-9; // Sampling time << Tvco/2
       VOUT=0;    
   end

always #(1e9*tsample)

       begin
       phase_int=phase_int+2*`M_PI*tsample*(fc+Kvco*V(VCTRL));
           if ( phase_int >`M_PI )
               begin
               VOUT=~VOUT;
               phase_int=phase_int-`M_PI;
               end
       end
endmodule

//

The speed penalty is not much . I have attached the spectrum of output for a fair comparison.

Please comment on this issue.

Thanks,
Praveen
Back to top
 

vco_models_debug.png
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re: Non-uniform sampling in VCO model
Reply #1 - Aug 27th, 2012, 10:24pm
 
Another approach it to simply tighten the time resolution using the `timescale command.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
TraceTheLoad
New Member
*
Offline



Posts: 5
Oregon State
Re: Non-uniform sampling in VCO model
Reply #2 - Aug 29th, 2012, 7:19pm
 
Ken ,

Thank you.

I have used "`timescale 1ns/1fs " for both VCO models . In fact both of the models were simulated on the same test bench keeping all the parameters and tolerances same.

Do you expect the former model to give better accuracy than what I have got ?

Regards,
Praveen
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re: Non-uniform sampling in VCO model
Reply #3 - Aug 29th, 2012, 7:56pm
 
Yeah, I do. But you were getting better than 100dB of resolution even before you started making changes. At this level there are subtle low-level effects that make it hard to know what exactly is happening or how to get the best result.

In the future, you should really include your whole model. Leaving things out generally leads to uncertainty that make your question harder to answer and risk wasting peoples time. In this case, the `timescale is critical to the performance of the module, but you neglected to give it. Including the whole model would only have required a few more lines, but it would have removed considerable uncertainty. If you gave enough to duplicate your simulation (a short netlist), then you open up the possibility of getting really high quality feedback.

-Ken

Back to top
 
 
View Profile WWW   IP Logged
TraceTheLoad
New Member
*
Offline



Posts: 5
Oregon State
Re: Non-uniform sampling in VCO model
Reply #4 - Aug 30th, 2012, 9:11am
 
Ken,

Thank you.

I agree with you that I should have put the whole model to keep the question unambiguous. Will do in future.

Appreciate you help,
Praveen
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.