The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 17th, 2024, 9:04pm
Pages: 1
Send Topic Print
idtmod in wreal VAMS (Read 1780 times)
deba
Community Member
***
Offline



Posts: 84

idtmod in wreal VAMS
Sep 28th, 2018, 2:01am
 
Hi,

I am trying to model the VCO in VAMS wreal. There are no electrical signals only digital and wreal signals.

Is it possible to use idtmod(modulo 2*pi integrator) the same way as used in verilog-A.

Thanks
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: idtmod in wreal VAMS
Reply #1 - Sep 30th, 2018, 11:55pm
 
One would not use idtmod to write an event driven VCO. The idtmod operator is implemented in the continuous kernel, which would slow the simulation. It is pretty easy to write a event driven VCO model without it. Just do something like the following:
Code:
module vco (out, in);
parameter real kvco = 1e9;
output out;
input in;
wreal in;
reg out = 0;
real freq, half_period = 100e-12;

always #half_period begin
    freq = kvco * in;
    half_period = 0.5/freq;
    out = ~out;
end
endmodule
 

Back to top
 
 
View Profile WWW   IP Logged
deba
Community Member
***
Offline



Posts: 84

Re: idtmod in wreal VAMS
Reply #2 - Oct 1st, 2018, 12:46am
 
Hi Ken,

Thanks for your reply. I am using a similar approach.  A follow up question.

The same event driven can be used instead of idtmod for modelling VCO. Does modelling the VCO in VAMS electrical idtmod more accurate than the event driven VCO model? Event driven the resolution is limited to 1 fs. Using idtmod what level of resolution can be achieved?

I have to model a very low jitter PLL.(<200 fs).

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