The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 20th, 2024, 4:32pm
Pages: 1
Send Topic Print
Variable Freq generator for testbenching (Read 2925 times)
thamiral
New Member
*
Offline



Posts: 7

Variable Freq generator for testbenching
Dec 12th, 2006, 7:22pm
 
Dear all,

Does anyone have any ideas on the best way of creating a variable/run-time-Programmable frequency clock/source for test benching mixed signal circuits using the spectre circuit simulator?

Unfortunately, using the events that verilogA comes with (example the timer event), I was unable to come up with a run-time programmable frequency source and I'd prefer not to have to create a PLL in a CSU mode Smiley...

Thanks,

Sincerely,

Taha
Back to top
 
 
View Profile   IP Logged
thamiral
New Member
*
Offline



Posts: 7

Re: Variable Freq generator for testbenching
Reply #1 - Dec 12th, 2006, 8:31pm
 
Just a quick addition to my previous post... I had forgotten to include my temporary solution...

I am currently using a Vpulse set at a certain frequency along with a verilogA frequency divider (this module counts edges in the Vpulse object based on the voltage value read from a Vpwl source and outputs an edge when the correct number of edges in Vpulse have been encountered)

This temporary solution obviously has a few drawbacks such as being limited to pulses since a sinusoid does not have 'edges'.

Hopefully the members of this forum will be able to suggest a better solution Smiley ....

Sincerely,

Taha
Back to top
 
 
View Profile   IP Logged
achim.graupner
Community Member
***
Offline



Posts: 51

Re: Variable Freq generator for testbenching
Reply #2 - Dec 12th, 2006, 10:14pm
 
Dear thamiral,

I am not sure whether that help, but below a verilogA snip from a VCO:

analog begin
 bound_step(0.02/gain);
 V(fout) <+ amplitude * sin(2*`M_PI*idt(gain*V(vin), 0));
end

the idea behind is that the phase is definded as
phi(t) = amplitude * int( f(t') dt', 0, t)

the output frequency of the circuit is
gain*V(in)
if a constant voltage is applied

Regards,
Achim
Back to top
 
 

Achim Graupner
ZMD AG, Dresden, Silicon Saxony, Germany
View Profile   IP Logged
thamiral
New Member
*
Offline



Posts: 7

Re: Variable Freq generator for testbenching
Reply #3 - Dec 13th, 2006, 5:15am
 
Thanks for your interest in the problem Achim,

Yes I have seen that verilogA snippet from one of the VCO behavioral models that I have encountered. It definately seems like it will do the trick for sinusoids.

I was hoping for a more elegant and effcient method for generating all kinds of waves. Basically a replacement for vsource that could look up frequencies from a lookup table. It seems like a common enough application that I'd assume circuit simulators would allow for Smiley

For now, I guess,  I'll keep using either the VCO snippet you had suggested in conjuction with either my first attempt on the problem or use an analog mux (written in verilogA) and connect it to the sources I need.

Thanks,

Sincerely,

Taha
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.