The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 7th, 2020, 2:42am
Pages: 1
Send Topic Print
To plot kinematic position value in spectre/ADE (Read 189 times)
DGB
New Member
*
Offline



Posts: 4
Amsterdam
To plot kinematic position value in spectre/ADE
May 26th, 2020, 10:40pm
 
Dear Ken & Andrew,
Hope this finds you in good health in truly extraordinary times the world is going through. I have a very specific question on plotting/saving kinematic values in verilog-a/verilog-ams.
Let's say I have a verilog-a model for a MEMS accelerometer like/similar to https://designers-guide.org/verilog-ams/mems-models/RF_MEMS_CAPACITOR.va
How do I plot/save the kinematic position value in spectre? (position value z in the code above)
My tries include : save all ahdl variables in spectre/ADE, tried browsing the results psf, tried calculator without much success.
The position value is important to visualize distortions or any other anomalies in closed-loop.
Thanks in advance,
Best regards,
DGB
Back to top
 
 
View Profile   IP Logged
DGB
New Member
*
Offline



Posts: 4
Amsterdam
Re: To plot kinematic position value in spectre/ADE
Reply #1 - May 27th, 2020, 12:55pm
 
All,
One of the options is to declare them as ports in the module statement and then I can visualize position and velocity nodes. But the question remains Smiley...if not declared as a port, how do i save/plot an internal kinematic value?
TIA,
Best,
/d
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2276
Silicon Valley
Re: To plot kinematic position value in spectre/ADE
Reply #2 - May 28th, 2020, 9:09am
 
Sorry, I'm afraid I am not that familiar with the limitations in ADE concerning non-electrical signals. I would expect that you would be able to find all signals in the results browser. Even if for some reason you could not find non-electrical signals, which would surprise me, you should be able to copy the value into a variable and see the variable in the results browser.

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



Posts: 1986
Massachusetts, USA
Re: To plot kinematic position value in spectre/ADE
Reply #3 - Jun 2nd, 2020, 8:50am
 
As Ken says, copying the value to a variable is the most likely solution. My impression is that internal nodes, even electrical ones, are not available for plotting in most simulators.
A number of simulators support the attributes in VAMS LRM 2.2 for declaring "operating point values" (some will give you all the variables when you "save all" but only give you the op-pt variables if you've declared at least one). The way to do this is to use the "desc" and/or "units" attributes:

(* desc="position", units="m" *) real z_pos;

Do this outside the analog block, eg right after
real A, b, C, C ...

Then, inside the analog block,
   z_pos = Pos(z);
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
DGB
New Member
*
Offline



Posts: 4
Amsterdam
Re: To plot kinematic position value in spectre/ADE
Reply #4 - Jun 3rd, 2020, 12:20am
 
@Ken and @Geoffrey,
Thanks for the prompt responses. I appreciate it.
@Geoffrey,
It works! Cool Nice...Thanks for the tip...
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

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

Posts: 1734
Bracknell, UK
Re: To plot kinematic position value in spectre/ADE
Reply #5 - Jun 7th, 2020, 7:09am
 
There's no ADE limitation regarding non-electrical signals. The issue is that Spectre does not save them if you have save=selected or save=allpub (in ADE on Outputs->Save All). If you change it to save=all (not allpub), you can then plot these internal signals with no problem (albeit via the results browser). They will even be plotted with the right units on the graph...

If you really don't want to save "all" signals, you can workaround the fact that there's no ADE way of referencing internal signals by using Outputs->Save All, go to the "Save by Subckt" tab, and entering the instance name of the RF_MEMS_CAPACTOR (e.g /I0) - then in the rightmost column where it says User Options type the spectre hierarchical name you wish to to save, e.g. I0.z (so this will be using dot as the hierarchy separator, not /). Bit clunky, and there ought to be an easier way, but better than nothing.

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
DGB
New Member
*
Offline



Posts: 4
Amsterdam
Re: To plot kinematic position value in spectre/ADE
Reply #6 - Jun 8th, 2020, 4:07am
 
Cheers Andrew, Thanks a lot Smiley
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2020 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.