Home > Community > Forums > Custom IC Design > Tip of the Week: Create signal sources from sim results

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Tip of the Week: Create signal sources from sim results 

Last post Thu, Dec 21 2006 11:03 AM by archive. 1 replies.
Started by archive 21 Dec 2006 11:03 AM. Topic has 1 replies and 1602 views
Page 1 of 1 (2 items)
Sort Posts:
  • Thu, Dec 21 2006 11:03 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,950
    Tip of the Week: Create signal sources from sim results Reply

    You can easily capture a simulated waveform of any kind and turn it into an ideal signal source for driving a test bench.  Advantages to doing this include:
    • You can get a much more realistic circuit stimulus than what can be created using the standard ideal or PWL sources;
    • Much faster simulation times can be realized by eliminating chunks of "real" circuitry and replacing them with captured signals from the circuitry that was removed.  (For example, you could capture a DAC output and use it to drive a filter and/or other circuitry, eliminating the DAC.)
    Here's the procedure for doing it:
    1. Run the simulation to create the transient waveform you're interested in capturing.
    2. Capture the waveform to the calculator.
    3. Print out the waveform as text, setting the "start" and "stop" times to provide exactly an integer number of cycles (or even just one cycle) of the desired waveform (assuming it is periodic). Using AWD, use the "printvs" function to do this.  For Wavescan, click on the Table button. 
    4. Save the results at a text file.  For AWD, In the Results Display window, click Window-->Print, and click the "File" radio button, fill in path for the text file you want to make.  Click OK.   For Wavescan, click "Save as CSV" to save the file as a .csv (comma delimitted) text file.
    5. Use a text editor to strip out the header lines from the text file you made.  If your time record does not start at zero seconds, use a spreadsheet function (such as Excel) to subtract the starting time from all the times in the file, so it starts with zero seconds.  (Otherwise your ideal function will not start till the start time in the file.) If your file is CSV, strip out the commas and replace them with spaces (can do automatically with find/replace in any text editor).
    6. Insert a vpwlf component (from analogLib) into your circuit.  Fill in the complete path to the text file in the "PWL file name" field.  Fill in the "Period of the PWL" field with the exact length (in time) of the file. 
    7. When you run the sim, the waveform you captured will be replicated exactly.  You can also time scale it if you want using the "Time Scale Factor" field, and amplitude scale it using the "Scale Factor" field, and delay its start using "Delay Time".
    It takes a few minutes to do all this, but definitely can be worth it!
     
    - Hugh


    Originally posted in cdnusers.org by Hugh
    • Post Points: 0
  • Fri, Sep 7 2007 2:45 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,950
    RE: Tip of the Week: Create signal sources from sim results Reply

    If you are only looking for digital waveforms that represent a bit-stream then have a look at spectre -h vsource and search for the "bit" type. It is a real improvement over hand-made pwl as you don't need to care about timing. the type=bit was introduced to 5.1.41 in 2007 and does not, as of today, have a symbol in analogLib, so you would have to make an ascii file and include it connect-by-name via the definition files in ADE->Setup->Simulation Files. Advantage is that you can provide the patterns as variables and have them changed in a parametric run or a corner simulation.

    --
    Svenn


    Originally posted in cdnusers.org by svenn
    • Post Points: 0
Page 1 of 1 (2 items)
Sort Posts:
Started by archive at 21 Dec 2006 11:03 AM. Topic has 1 replies.