The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> To plot kinematic position value in spectre/ADE
https://designers-guide.org/forum/YaBB.pl?num=1590558019

Message started by DGB on May 26th, 2020, 10:40pm

Title: To plot kinematic position value in spectre/ADE
Post by DGB on 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

Title: Re: To plot kinematic position value in spectre/ADE
Post by DGB on 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 :)...if not declared as a port, how do i save/plot an internal kinematic value?
TIA,
Best,
/d

Title: Re: To plot kinematic position value in spectre/ADE
Post by Ken Kundert on 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

Title: Re: To plot kinematic position value in spectre/ADE
Post by Geoffrey_Coram on 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);

Title: Re: To plot kinematic position value in spectre/ADE
Post by DGB on Jun 3rd, 2020, 12:20am

@Ken and @Geoffrey,
Thanks for the prompt responses. I appreciate it.
@Geoffrey,
It works! 8-) Nice...Thanks for the tip...

Title: Re: To plot kinematic position value in spectre/ADE
Post by Andrew Beckett on 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.

Title: Re: To plot kinematic position value in spectre/ADE
Post by DGB on Jun 8th, 2020, 4:07am

Cheers Andrew, Thanks a lot :)

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.