• 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. CALCULATOR DNL/ INL DAC

Stats

  • Locked Locked
  • Replies 14
  • Subscribers 125
  • Views 34988
  • 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

CALCULATOR DNL/ INL DAC

mirtaji65
mirtaji65 over 4 years ago

Hi

I'm designing a 4 bit DAC.I have completed the schematic and The output waveform of the block is as follows

I want measure INL error and I use INL function in calculator I try this expression

dnl(v("/net055" ?result "tran") 6.251e-5  ?mode "auto"  ?crossType "rising" ?delay 0.0 ?method "end" ?units "abs" ?nbsamples 16)

and it could't It does not work properly  the output waveform is as follows

Where is the problem? 

 is my method to use this function currect ?

THANKS

  • Cancel
Parents
  • ShawnLogan
    ShawnLogan over 4 years ago

    Dear mirtaji65,

    It appears you did not remove the transient in the beginning of your waveform from "/net055". Hence, I think it will be included in the integration used to determine the threshold option you chose of "auto".  This will not, I believe, provide the threshold you intended. As defined in the manual:

    Auto Threshold Value = integral of the waveform divided by the X range.

    You have the "delay" set to 0, and hence this transient is considered part of your data. You might either clip the waveform before taking the dnl and or increase the value of delay beyond the transient.

    Did either of those thoughts occur to you mirtaji65?

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mirtaji65
    mirtaji65 over 4 years ago in reply to ShawnLogan

    Thanks for the reply

    lets check together

    firs i changed wave form name:

    a)     inl(VT("/net055") 62.25u  ?mode "auto"  ?crossType "falling" ?delay 0 ?units "abs" ?nbsamples 16)

    The result of the waveform as before  

    isn't sampling signal  The amount of output signal increase is actual total for example  62.5u=1v/(16 for 4 bit)

    b) i don't know what really it mean and What  value should I put?

    Threshold--Threshold value against which the frequency is to be calculated. You need to specify the threshold value only if the mode is auto

    c) i choose dealy=.5us half of sample period

    Delay--Delay time after which the sampling begins.

    inl(VT("/net055") 62.5u  ?mode "user" ?threshold 0  ?crossType "rising" ?delay .5u ?units "abs" ?nbsamples 16)

    all of the resualt as the same 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mirtaji65
    mirtaji65 over 4 years ago in reply to ShawnLogan
    Dear Shawnlogan
    Thank you very much for your answer I want to use INL function in the first post I copied wrong expesion DNL instead of INL function from calculator Of course, I also use DNL function after that.The example you sent for me helped me a lot. may you check to see i understoor the concept of Sampling signal and threshod Sampling signal:It is the sampling time that the converter (óDAC) receives data from theinput signal In this example you sent for me sample time converter=10uS Threshold: in fact the same amount of LSB value =(full range)/2^n-1 n=resolution delay:Wait from the beginning of each sampling of the converter to the value of ö delay time, then get the value from plot? or Ignore a value at the beginning of the waveform Only once at the beginning of the waveform


    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mirtaji65
    mirtaji65 over 4 years ago in reply to mirtaji65

    I think I could use to get this Another way by calculator
    I have a ramp signal at the input of the circuit that produces the output
    ramp=>ideal ADC=>DAC
    i can use this expression to get INL waveform
    abs(VT("/net035")-VT("/net055"))/62.5)
    "/net035"=ramp
    "/net055"=output
    62.5=ideal step size=>1/2^4
    And the following waveform is obtained

    is it correct?

    And the result  of function of dnl is as follows

    inl(vtime('tran "/net055") 1u  ?mode "auto"  ?crossType "rising" ?delay 0 ?units "abs" ?nbsamples 16)

    inl(vtime('tran "/net055") 1u  ?mode "user" ?threshold 62.5u  ?crossType "rising" ?delay 0 ?units "abs" ?nbsamples 16)

    with or without threshold are the same

    Please guide me  how can i resolve this problem

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to mirtaji65

    Dear mirtaji65,

    mirtaji65 said:
    Please guide me  how can i resolve this problem

    I finally had time to respond. I put together a test bench with a piecewise linear source to model your DAC and created a "noisy" version of your DAC's output voltage versus time. I ran the simulation and created plots of its output voltage, DNL, and INL (the latter two expressed in LSB). I also saved the output expressions in a comma-separated variable file. The input text file used for the simulation and a view of the test bench are included. Download the attached compressed file into a directory and you will find pnd and pdf versions of the output voltage, DNL, and INL. You should be able to use the expressions with a clipped version of your output waveform.

    Shawn

    m2minl_inverted_noisy_sml_121520.zip

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mirtaji65
    mirtaji65 over 4 years ago in reply to ShawnLogan

    Dear Shawnlogan
    Thank you for your help
    I implemented the test bench circuit exactly And the file that contained the sawtooth waveform "m2minl_inverted_noisy.txt" load in the vpwlf source

    The sawtooth waveform was similar to your waveform

    but INL waveform It is completely different from your waveform this expression is

    inl(v("/vout" ?result "tran") 1e-06  ?mode "auto"  ?crossType "rising" ?delay 5e-07 ?units "lsb" ?nbsamples nil)

    And your waveform is as follows

    Why are the  inl not similar?

    Thank you for your help my friend

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to mirtaji65

    Dear mirtagi65,

    mirtaji65 said:
    Why are the  inl not similar?

    I suspect the number of samples computed for your waveform may not be the same. Did you try setting ?nbsamples to the desired value?

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mirtaji65
    mirtaji65 over 4 years ago in reply to ShawnLogan

    Dear Shawnlogan

    I think my output waveform of the function is correct
    As you can see in the figure below
    only at 7us of waveform that The sampling point is below the ideal waveform And elsewhere at the top the ideal waveform

    When I read the function guide, I realized that the X-axis is the waveform of the function in terms of time, while our waveform is the X-axis in terms of voltage.

    How can  change  x-axis  waveform of the INL function in terms of time instead of voltage?

    INL=(V(sample point)-(sample point*LSB))/LSB

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to mirtaji65

    Dear mirtaji65,

    mirtaji65 said:
    How can  change  x-axis  waveform of the INL function in terms of time instead of voltage?

    I am not sure what version of the manual you are referring to, but if you examine the latest version of the ViVa function manual (Nov. 2020), it clearly states the x-axis units are the same as the y-axis units of the waveform for which you are computing the INL. In all of your examples, your y-axis units are voltage. Hence, the x-axis of the inl() waveform is voltage - not time. The argument you circled in red refers to whether the inl() output is expressed in "absolute" units or in "LSB". It does not refer to the x-axis of the inl() output function.

    The examples in the Nov 2020 manual all show this behavior. If you want to change the x-axis plotted, I believe you will need to use the YvsY() function and create the time axis as a waveform. After creating the time axis as a separate waveform, right-click the X-axis and choose YvsY. The YvsY form appears and you can select the INL waveform as axis the newly created time axis as the second waveform.

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mirtaji65
    mirtaji65 over 4 years ago in reply to ShawnLogan

    I made a waveform for testing

    The result of the dnl function is as follows
    Which is the X-axis and the Y-axis are in terms of voltage

    The result of the dnl function in mathlab is as follows
    Which is the X-axis in terms of time and the Y-axis are in terms of voltage

    As is clear from the signal of the value (0v to 1.8v) after that (1.8v to 0v) after that (0 to 3.2)

    And because one axis is in terms of voltage and the other is time, the waveform is not the same.

    you can't use the YvsY() function
    i use dc signal 0v as the time axis as a waveform (/net011)
    when i plot two out put in simulation Draws them in the subwindows form

    I can use YvsY for (/net11) and (/net05)  Because both of the in same windows and choose select trace 

    i can not plot inl and (/net11) in same window that YvsY

    What should I do to solve the problem?

    In your opinion, it is not better to write a program VHDL or verilog

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to mirtaji65

    Dear mirtaji65,

    mirtaji65 said:
    What should I do to solve the problem?

    I hope the following solves your latest problem. I have included the specific steps I followed and the resulting plots of INL versus voltage and the new plot of INL versus Time.

    Shawn

    Fullscreen example_plot_inl_vs_time.txt Download
    1. Create time values:
    
    value(v("/vout" ?result "tran") 0.5e-06  ?period 1e-06 ?xName "time"  )
    
    Place in Calculator Table (Tools->Table)
    
    2. Create inl values:
    
    value(inl(v("/vout" ?result "tran") 1e-06  ?mode "auto"  ?crossType "rising" ?delay 0.5e-06 ?units "abs" ?nbsamples nil) 0.5e-06 ?period 1e-06 ?xName "time")
    
    Append to table (See below for comma-separated variable file I created)
    
    3. Save table as a comma-separated variable file with <filename> (i.e. nl_xval_inl.csv)
    
    3.Create new waveform:
    
    getAsciiWave("Full path to saved file inl_xval_inl.csv"> 1 4 ?xskip 1 ?yskip 1 ?formatFloat nil ?xName "Time" ?xUnits "sec" ?yName "inl" ?yUnits "LSB" )
    
    4. Plot new waveform
    
    5. Enjoy!
    
    Example "inl_xval_inl.csv"
    
    time (s),xval(value(v("/vout" ?result "tran") 0.5e-06  ?period 1e-06 ?xName "time"  )) (s),V (V),inl
    500.00000E-9,500.00000E-9,24.961888E-3,0.0000000
    1.5000000E-6,1.5000000E-6,72.934183E-3,-37.478530E-3
    2.5000000E-6,2.5000000E-6,123.74225E-3,-18.059857E-3
    3.5000000E-6,3.5000000E-6,175.35193E-3,17.442537E-3
    4.5000000E-6,4.5000000E-6,223.30014E-3,-20.519130E-3
    5.5000000E-6,5.5000000E-6,276.42237E-3,45.331194E-3
    6.5000000E-6,6.5000000E-6,323.72824E-3,-5.5186424E-3
    7.5000000E-6,7.5000000E-6,374.44416E-3,12.051288E-3
    8.5000000E-6,8.5000000E-6,425.94798E-3,45.429609E-3
    9.5000000E-6,9.5000000E-6,474.45422E-3,18.664130E-3
    10.500000E-6,10.500000E-6,524.10157E-3,14.794140E-3
    11.500000E-6,11.500000E-6,576.87473E-3,73.640760E-3
    12.500000E-6,12.500000E-6,622.86814E-3,-3.5422922E-3
    13.500000E-6,13.500000E-6,675.23440E-3,47.140060E-3
    14.500000E-6,14.500000E-6,722.63109E-3,-1.8875072E-3
    15.500000E-6,15.500000E-6,772.56539E-3,-555.11151E-18
    
    sml 1/4/2021

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mirtaji65
    mirtaji65 over 4 years ago in reply to ShawnLogan

    Dear Shawnlogan

    Your solution for converting X-axis from voltage to time works exactly.

    But why do I have to sample the waveform by use <<value function>>  when i want to use INL and DNL function ,why delay of INL function doesn't work itself,

    Is this a software bug?

    ver virtuoso :6.17.77

    This method is not suitable if I want to use the analysis parameter

    But your method of  converting X-axis from voltage to time  was great

    thanks my friend

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • mirtaji65
    mirtaji65 over 4 years ago in reply to ShawnLogan

    Dear Shawnlogan

    Your solution for converting X-axis from voltage to time works exactly.

    But why do I have to sample the waveform by use <<value function>>  when i want to use INL and DNL function ,why delay of INL function doesn't work itself,

    Is this a software bug?

    ver virtuoso :6.17.77

    This method is not suitable if I want to use the analysis parameter

    But your method of  converting X-axis from voltage to time  was great

    thanks my friend

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to mirtaji65

    Dear mirtaji65,

    > Your solution for converting X-axis from voltage to time works exactly.

    Great! Thank you for letting us know!

    mirtaji65 said:

    But why do I have to sample the waveform by use <<value function>>  when i want to use INL and DNL function ,why delay of INL function doesn't work itself,

    Is this a software bug?

    First, I do not work for Cadence and hence cannot really respond to your comment about the behavior of INL. However, the INL function, as it is documented, does not provide the x-axis as a function of time (which is what I assume you want). Hence, the "workaround" using the value() function.

    mirtaji65 said:
    This method is not suitable if I want to use the analysis parameter

    Sorry, I don't understand exactly what you mean by this comment! You can use this methodology in an Explorer/Assembler expression through the use of an ocean script. This is documented at URL:

    https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000000nXTvEAM&pageName=ArticleContent

    and

    https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000000nXS2EAM&pageName=ArticleContent

    Hence, you may define the steps in an ocean script and add the ocean script as an Explorer/Assembler output.

    I hope this helps mirtaji65,

    Shawn

    • 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