• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. low pass filter in viva/calculator

Stats

  • Locked Locked
  • Replies 17
  • Subscribers 128
  • Views 19888
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

low pass filter in viva/calculator

david0526
david0526 over 11 years ago

hello all,

does anyone know if there is a way to apply a low pass filter to simulation data in VIVA (or using the functions in the calculator)?  i need to remove high-frequency switching noise from a waveform, and i couldn't find anything that would do the job in the built-in functions (but i'm finding it hard to believe that such function doesn't exist!).  i'm hoping someone here can suggest something.

thanks in advance,

david

  • Cancel
  • ShawnLogan
    ShawnLogan over 11 years ago

    Dear David,

    A couple of thoughts come to mind...perhaps you have already considered these...

    1. In your schematic, you could include a low pass filter and hence could directly plot the low pass filter output with your unfiltered outputs. A coltage controlled voltage source might be used to prevent any loading of the output under test.

    2. In ViVA's calculator, choose the dft function and take the dft of the signal of interest. Using the clip() function, select the portion of the resulting DFT corresponding to the frequency components you wanted to capture using a low pass filter. Finally, use the fourEval() function to determine the inverse DFT and hence the resulting time domain waveform.

    3. Finally, although someone may have written a skill function to implement an IIR low pass filter, I've occasionally downloaded the time domain version of a waveform (using ViVA - Send To...Table and svae as csv format) or an ocean script) and, using an Excel workbook where I've implemented an IIR based low pass/bandpass/high pass filter, I can vary the low pass filter frequency and compare the filtered and unfiltered waveforms. If you are interested in the workbook, I'll gladly pass it along...but it is very basic and I am sure others have more elaborate versions.

    I hope these help a bit...

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    A couple of other options. One is to use the iinteg function to integrate it (probably not what you want). Another is to use the moving average function here

    Another is to use the svcvsp component from analogLib which allows you to create a Laplace (s-domain) voltage controlled voltage source to define your filter. This is of course then in the simulator rather than post-processing.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • david0526
    david0526 over 11 years ago

    Hi Shawn,

    Thank you very much for the reply.  I'll give these options a shot and see which one works out best.  I would be interested in taking a look at your basic excel file, if that's not too much trouble.

    Again, thank you.

    David

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • david0526
    david0526 over 11 years ago

    Hi Andrew,

    Thank you very much for your reply as well. svcvsp option sounds interesting, I was not aware of it's existence.  I'll give it a shot.

    I also tried to use the SKILL code, but did not get far (I'm a total beginner when it comes to SKILL).  I was able to "load(abMovingAgv.il)" in the CIW window, but could not get it to register in the calculator (i.e., I do not see abMovingAvg in the list of functions).  If you have a simple suggestion I can try to get it to load, I'd be much obliged.

    Once again, thanks for the inputs.

    David

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 11 years ago

    Hi David,

    > I would be interested in taking a look at your basic excel file,

    > if that's not too much trouble.

    Absolutely! I hope it helps and makes sense...I've uploaded a zip file containing the Excel file.

    As I mentioned, the workbook is pretty simple. However, it can be used to compute a lowpass or highpass filtered signal in the time domain. I've added a few instructions to a sample lowpass filter at 5 MHz. The coefficients of the IIR filter are found using Excel's (now Frontline) Solver. The example illustrates the methodology. Let me know if you have any questions.

    Shawn

    Shawn500meg_lpf_080814.zip

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 11 years ago

    HI David,

    I just read your response to Andrew. I think I can help you.

    If you load the SKILL code in the CIW using the load command with a path to the file as shown below:

    load "<path_to_file>/abMovingAgl.il"

    You then need to register the function in the calculator (Andrew includes this in the instructions in the comments header of the file) in the CIW:

    abRegMovingAvgSpecialFunction()

    Once the calculator is open, you can now utilize the function by providing a waveform followed by the period over which to compute the moving average. For example, I have a waveform called "qclkout_phase_lsb" whose x-axis spans 0 to 250 and the calculator entry to plot the moving average up to 200 is:

    abMovingAvg(qclkout_phase_lsb 200)

    The abMovingAvg()  function does not appear in the list of Calculator functions on my machine.

    Shawn

    (Thank you Andrew!)

    "

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Note that after calling abRegMovingAvgSpecialFunction, you'll have to change the cyclic field in the Functional Panel to "Skill User Defined Functions" to see it. If it's on "All" you won't see it. Here's what that panel should look like:

    Note that to use the function (i.e. just type it into the buffer), there's no need to "register" it; the code just needs to be loaded. The registration is just so that you can click on it in the function panel and (dependent upon the function) have a form pop up.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • david0526
    david0526 over 11 years ago

    Shawn, Andrew,

    Thank you both very much, really appreciate your help and inputs.  I'll play around with all these options and see how far I get!

    David

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ashwathmp
    Ashwathmp over 10 years ago

    Hi everyone,

    I used the skill script - 'abMovingAvg.il', and it work perfectly fine in the ADE-L. Thank you Andrew Beckett for uploading this solution.

    For some reason, ADE-XL had trouble finding the function moving average function and would report an error when I run corner simulations. I tried loading the function again in the CIW window with no success.

    I came up with another way to calculate the moving average using the equations in the Calculator tool. Here is the equation - 

    (((iinteg(((VT("/vrfp") - VT("/vrfm")) * IT("/I_rectifier/vrfp"))) - iinteg(lshift(((VT("/vrfp") - VT("/vrfm")) * IT("/I_rectifier/vrfp")) (10 / 9.15e+08)))) * -9.15e+08) / 10)

    Here I'm trying to calculate the input power of my block. '(VT("/vrfp") - VT("/vrfm")' is the differential input voltage. ' IT("/I_rectifier/vrfp")'  is the input current. 

    '(10 / 9.15e+08)' is the time period over which I want the average to be calculated. 

    The waveform from the above equation matches with the waveform generated by the skill code. 

    I wanted to share this equation here hoping it might be useful to someone else. 

    Regards,

    Ashwath

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    Ashwath,

    You need to load the code from your .cdsinit so that the background virtuoso (known as the ICRP) picks it up OK. Otherwise it will not be visible in the background process which performs the calculations after simulation.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
>

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information