The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 3:41pm
Pages: 1
Send Topic Print
phase.vams (Read 1233 times)
as_rf
New Member
*
Offline



Posts: 7

phase.vams
Feb 24th, 2020, 11:33am
 
Hi all,

I have problem compiling the code which is written in Ken Kundert
Designer’s Guide Consulting, Inc.

Code:
`include "/home/asarrafi/phase.vams" // from Listing 2, includes disciplines.vams.


module osc_phase_va(out);

output out;

phase out;

parameter real n = 0 from [0:inf); // white output phase noise at 1 Hz (rad2/Hz)
parameter real fc = 0 from [0:inf); // flicker noise corner frequency (Hz)

analog begin


Theta(out) <+ flicker_noise(n, 2, "wpn")+flicker_noise(n*fc, 3, "fpn");

end

endmodule 



I wrote the listing code and put it in phase.vmas
but cadence does not compile it for some reason and it does not show specific error. Sad
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: phase.vams
Reply #1 - Feb 24th, 2020, 8:24pm
 
Code:
`include "phase.vams" // from Listing 2, includes disciplines.vams.

module osc_phase_va(out);
output out;
phase out;
parameter real n = 0 from [0:inf);   // white output phase noise at 1 Hz (rad2/Hz)
parameter real fc = 0 from [0:inf);  // flicker noise corner frequency (Hz)

analog begin
    Theta(out) <+ flicker_noise(n, 2, "wpn");
    Theta(out) <+ flicker_noise(n*fc, 3, "fpn");
end
endmodule  


You might try splitting the contribution statement into two. Cadence has become quite persnickety about the small-signal stimulus functions.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: phase.vams
Reply #2 - Feb 29th, 2020, 4:20am
 
The original code compiles OK for me, although I didn't know what was in the phase.vams code that was being included (it referred to Listing 2 - not sure which Listing 2 it's talking about; it's not Listing 2 from The Designer's Guide to Verilog AMS). So I simply changed "phase out" to "rotational out" and changed the `include to the more standard `include "disciplines.vams"

This was with SPECTRE 18.1.0.556.isr13 and 19.1.0.237.isr3 (the latest hot fixes of the current and previous release of spectre).

Which version of Spectre are you using? What is in the included file?

It should not be necessary to split up the contributions as Ken suggested; there have certainly been bugs when that was a workaround, but in this case it's either a resolved bug (if that was the problem) or something else. Knowing the version numbers used and the complete code would help with figuring that out...

Thanks,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: phase.vams
Reply #3 - Mar 1st, 2020, 2:31am
 
I just realised that Listing 2 is from https://designers-guide.org/analysis/PLLnoise+jitter.pdf - with the definition there, the code also compiles with Spectre 18.1 and 19.1 (unsurprisingly since the discipline is essentially similar to the standard rotational).

Andrew.
Back to top
 
 
View Profile WWW   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.