The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 2:36pm
Pages: 1
Send Topic Print
idt() function in hspice simulator (Read 1296 times)
neoflash
Community Fellow
*****
Offline

Mixed-Signal
Designer

Posts: 397

idt() function in hspice simulator
Oct 23rd, 2010, 11:37pm
 
I used idt() function in hspice simulator for a VCO.

However, I got trouble that sometimes the idt() output result may jump erroneously.

Is there any option that I can help with this issue?
Back to top
 
 
View Profile   IP Logged
Marq Kole
Senior Member
****
Offline

Hmmm. That's
weird...

Posts: 122
Eindhoven, The Netherlands
Re: idt() function in hspice simulator
Reply #1 - Nov 17th, 2010, 6:36am
 
You will need to provide a little more information if you want us to help you.

Anyway, when you mentino VCO I would suggest you have a look at the idtmod() operator instead of the idt() operator.

Cheers,
Marq
Back to top
 
 
View Profile   IP Logged
neoflash
Community Fellow
*****
Offline

Mixed-Signal
Designer

Posts: 397

Re: idt() function in hspice simulator
Reply #2 - Nov 17th, 2010, 11:58am
 
Marq Kole wrote on Nov 17th, 2010, 6:36am:
You will need to provide a little more information if you want us to help you.

Anyway, when you mentino VCO I would suggest you have a look at the idtmod() operator instead of the idt() operator.

Cheers,
Marq



idtmod() works much better and solves the problem. Thanks.
Back to top
 
 
View Profile   IP Logged
neoflash
Community Fellow
*****
Offline

Mixed-Signal
Designer

Posts: 397

Re: idt() function in hspice simulator
Reply #3 - Nov 20th, 2010, 3:28pm
 
finesim doesn't support this special idtmod() function. sucks.
Back to top
 
 
View Profile   IP Logged
Marq Kole
Senior Member
****
Offline

Hmmm. That's
weird...

Posts: 122
Eindhoven, The Netherlands
Re: idt() function in hspice simulator
Reply #4 - Dec 8th, 2010, 8:12am
 
Hi,

That's weird - I'm using finesim 2010.08.00 and the code below runs just fine:

Code:
`include "disciplines.vams"
`include "constants.vams"

module va_vco2 (out, ctrl, ref);

  parameter real amp = 1;
  parameter real minfreq = 1M;
  parameter real gain = 1.2M;

  inout ctrl, out, ref;
  voltage ctrl, out, ref;

  real phase, freq;

  analog begin
    freq = minfreq + gain * V(ctrl, ref);
    phase = `M_TWO_PI * idtmod(freq, 0, 1);

    $bound_step(0.1 / freq);

    V(out, ref) <+ 0.5 * amp * (cos(phase) + 1);
  end

endmodule
 



Are you using a recent version? We have no trouble with the Verilog-A support of finesim.

Cheers,
Marq
Back to top
 
 
View Profile   IP Logged
neoflash
Community Fellow
*****
Offline

Mixed-Signal
Designer

Posts: 397

Re: idt() function in hspice simulator
Reply #5 - Dec 8th, 2010, 12:11pm
 
We are using the most recent version.
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.