• 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 34983
  • 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
Reply
  • 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
Children
  • 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
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to mirtaji65

    Dear mirtaji65,

    I am confused.

    1. You changed the function applied to /net055 from the dnl() function to the inl() function? The dnl() and in() functions provide different results. I thought you wanted to view the dnl() function output - amd I incorrect?

    2. When you changed to the inl() function, you set the ?mode to user, but then set the value of ?threshold to 0. Your waveform does not cross 0.

    I am not sure you have an understanding of what the dnl() or inl() functions provide and their arguments. I am attached a section of the ViVa manual with the dnl() function and two examples of its use for you to study. I hope this helps.

    Shawn

    dnl_examples_viva_manual_ICADVM20.1_121120.pdf

    • Cancel
    • Vote Up +1 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

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