Main Content

Measure Offset and Gain Error of Binary Weighted DAC

This example shows how to find the offset and gain errors of a binary weighted DAC block.

Open the model dac_dc_error. The model consists of a Binary Weighted DAC block and a DAC Testbench.

model = 'dac_dc_error';

The parameters under the General tab of the Binary Weighted DAC are kept at their default values. The impairments are enabled in the Impairments tab, and the value of the offset error and gain error are set to 2 LSB and 1 LSB, respectively.

In the DAC Testbench block, the Measurement option is set to DC. In the Setup tab, the Autofill setup parameter button is used to automatically propagate the setup parameters from the DAC block. In the Target Metric tab, the Autofill target metric button is used to automatically set the target offset and gain errors from the DAC block. All other parameters are kept at their default values.

Run the simulation for 7.68e-04 s. The measured offset and gain errors are 2.00 LSB and 1.00 LSB, respectively.

The DAC transfer curve matches the best linear fit method. Using best fit method, maximum INL is -3.3e-4 LSB and maximum DNL is 4.6e-4 LSB.