# Measurements and Testbenches

Analyze different foundation blocks and system-level models of mixed-signal systems using measurement blocks and testbenches. You can validate a block from the Mixed-Signal Blockset™ library, or you can validate your own customized blocks.

For PLL, use the measurement blocks to analyze performance metrics such as phase noise, reference and fractional spurs, aperture jitter, timing impairments, and lock time. Use block-specific testbenches to validate your customized blocks.

For ADC, use the measurement blocks to analyze key performance metrics such as aperture jitter, SNR, SINAD, noise floor, offset error, and gain error.

Use a system-level testbench to validate your PLL and ADC models.

## Apps

Mixed Signal Analyzer | Analyze circuit simulation data (Since R2021a) |

## Blocks

### PLL

Lock Time Measurement | Measure time a PLL takes to reach target frequency within given tolerance |

Phase Noise Measurement | Compute phase noise at specific frequency offset vectors |

PFD and Charge Pump Testbench | Generic test environment for phase/frequency detectors and charge pumps |

VCO Testbench | Validate voltage controlled oscillator (VCO) by measuring phase noise metrics or VCO characteristics |

PLL Testbench | Validate PLL system by measuring operating frequency, lock time, and phase noise |

### ADC

ADC AC Measurement | Measure AC performance metrics of ADC output |

ADC DC Measurement | Measure DC performance metrics of ADC output |

ADC Testbench | Measures DC and AC performance metrics of ADC output |

### DAC

DAC DC Measurement | Measure DC performance metrics of DAC output (Since R2020a) |

DAC AC Measurement | Measure AC performance metrics of DAC output (Since R2020a) |

DAC Testbench | Measure DC and AC performance metrics of DAC output (Since R2020a) |

### Jitter, Timing, and Visualization

Clock Jitter Measurement | Measure jitter in periodic signals (Since R2021a) |

Aperture Jitter Measurement | Measure aperture jitter of periodic signals |

Timing Measurement | Measure period, frequency, duty cycle, rise time, fall time, and delay of a
signal (Since R2020b) |

Eye Diagram Scope | Display eye diagram of time-domain signal (Since R2023b) |

Eye Measurement | Calculate metrics from eye diagram (Since R2024a) |

## Functions

### PLL

`phaseNoiseMeasure` | Measure and plot phase noise profile of time or frequency-domain signal (Since R2020a) |

`phaseNoiseToJitter` | Measure RMS phase jitter from phase noise data (Since R2020b) |

### Data Converter

`inldnl` | Integral nonlinearity (INL) and differential nonlinearity (DNL) of data
converters (Since R2020a) |

`calibrateADC` | Remove offset and gain errors from ADC output (Since R2023a) |

`calibrateDAC` | Compensate DAC input for offset and gain errors (Since R2023a) |

### Timing Functions

`timeDomainSignal2RiseTime` | Measure rise time of time domain signal (Since R2020b) |

`timeDomainSignal2FallTime` | Measure fall time of time domain signal (Since R2020b) |

`timeDomainSignal2DutyCycle` | Measure duty cycle of time-domain signal (Since R2020b) |

### Eye Measurement

`eyeHeight` | Measure vertical eye opening (Since R2024a) |

`eyeWidth` | Measure horizontal eye opening (Since R2024a) |

`eyeArea` | Measure eye area (Since R2024a) |

`eyeAmplitude` | Measure eye amplitude (Since R2024a) |

`eyeLevels` | Measure symbol level statistics from eye diagram (Since R2024a) |

`eyeCenter` | Measure eye center point (Since R2024a) |

`eyeCrossing` | Measure eye crossing points (Since R2024a) |

`risetime` | Measure rise time from eye diagram (Since R2024a) |

`falltime` | Measure fall time from eye diagram (Since R2024a) |

`vec` | Measure vertical eye closure (Since R2024a) |

`com` | Measure channel operating margin (Since R2024a) |

`eyeLinearity` | Measure eye linearity (Since R2024a) |

`upperContour` | Measure upper contour of eye diagram (Since R2024a) |

`lowerContour` | Measure lower contour of eye diagram (Since R2024a) |

`closedContour` | Measure closed contour of eye diagram (Since R2024a) |

`margin` | Calculate margins of eye contour from mask (Since R2024a) |

`plot` | Plot eye diagram, eye contour, or eye mask object (Since R2024a) |

`bathtub` | Plot bathtub curves (Since R2024a) |

`slice` | Extract slice from eye diagram (Since R2024a) |

### Jitter

`jitter` | Measure jitter metrics from waveforms (Since R2024b) |

`jitterTotal` | Measure total jitter metric from waveform (Since R2024b) |

`jitterRandom` | Measure random jitter from waveform (Since R2024b) |

`jitterDeterministic` | Measure deterministic jitter from waveform (Since R2024b) |

`jitterDataDependent` | Measure data-dependent jitter from waveform (Since R2024b) |

`jitterDutyCycle` | Measure jitter correlated with duty cycle distortion (Since R2024b) |

`jitterIntersymbol` | Measure jitter correlated with intersymbol interference (Since R2024b) |

`jitterPeriodic` | Measure periodic jitter from waveform (Since R2024b) |

`jitterSinusoidal` | Measure sinusoidal jitter from waveform (Since R2024b) |

`timingError` | Measure timing error from waveform (Since R2024b) |

`timeIntervalError` | Measure time interval error (Since R2024b) |

### Mixed-Signal Analyzer

`adeinfo2msa` | Extract simulation data from Cadence to Mixed Signal Analyzer app (Since R2022b) |

`msaSessionUpdate` | Update saved session of Mixed Signal Analyzer app (Since R2023a) |

`adeGet` | Extract simulation parameters and variables from Cadence Maestro (Since R2023b) |

`adeSet` | Set simulation parameters and variables in Cadence ADE Maestro (Since R2023b) |

`adeSim` | Run simulation as setup in the Cadence ADE Maestro view (Since R2023b) |

## Objects

### Mixed-Signal Analyzer

`adeDataReader` | Read adeInfo object and extract metrics for visualization and analysis (Since R2024b) |

`trendChart` | Plot trend analysis charts (Since R2024b) |

### Optimization

`msbOptimizer` | Optimize device parameters to set up simulation environment (Since R2024b) |

### Eye Measurements

`eyeDiagramSI` | Create eye diagram from time-domain data (Since R2024a) |

`eyeContour` | Contour of eye opening from eye diagram (Since R2024a) |

`eyeMask` | Shape and size mask of eye opening (Since R2024a) |

## Featured Examples

### Phase Noise at PLL Output

Predict the phase noise at the output of a phase-locked loop (PLL), simulate the PLL using the PLL Testbench, and compare the simulation results to theoretical predictions.

### Effect of Metastability Impairment in Flash ADC

Customize a flash Analog to Digital Converter (ADC) by adding the metastability probability as an impairment. You can measure the metastability probability impairment to validate your implementation. The example also shows the effect of metastability on the dynamic performance of the flash ADC. When the digital output from a comparator is ambiguous (neither zero nor one), the output is defined as metastable. The ambiguous output is expressed as `NaN`

. This example model uses a MATLAB function block to add the metastability impairment to a flash ADC architecture. Another subsystem reports the metastability probability on the fly.

### Measuring Offset and Gain Errors in ADC

How offset error and gain error are calculated and how each affects the transfer curve of an ADC. Offset error and gain error characterize part of the linearity error in an ADC.

### ADC Linearity Measurement Using Histogram

Statistical measurement of ADC Linearity is popular in physical systems due to its noise tolerance and relative simplicity of implementation in a physical environment. This example covers problems inherent to statistical linearity measurements and some possible solutions for implementing these measurements in Simulink®.

### AC Metrics of Fourth Order Delta Sigma ADC

Model a fourth order delta sigma ADC and measure its AC metrics. The ADC AC Measurement block from the Mixed-Signal Blockset™ is used to measure the AC performance of the ADC. AC measurements are essential to measure the metrics like SNR and ENOB inform the designer whether optimal performance is being achieved by the design. If not, the designer can tweak the design parameters to make the better.

### Third Order Delta Sigma ADC

Model a 3rd order Delta Sigma ADC and measure its performance using the ADC AC Measurement block. This ADC model consists of a behavioral model of a delta sigma ADC that uses a 3rd order feedforward modulator. The ADC input sample rate is 64 MHz and after decimating filters, the output sample rate is 1 MHz.

### Optimize Transistor Sizes of Analog Circuit for Best Performance

Optimize transistor sizes of an analog circuit using Mixed-Signal Blockset™, Cadence Virtuoso ADE - MATLAB Integration Option, and Global Optimization Toolbox. This example shows you how to design an optimally sized single-stage CMOS operational transconductance amplifier (OTA). Transistor size optimization helps you save chip area while also meeting the given performance specifications. To run the optimization workflow, launch a MATLAB® session launched from Cadence® after running a nominal simulation. This example considers these OTA performance specifications:

### LDO Circuit Analysis Using Mixed Signal Analyzer

Plot trend charts while analyzing a Low Drop-Out (LDO) voltage regulator circuit using the Mixed Signal Analyzer app.

### Optimize Transistor Sizes Of Low Dropout Regulator

Use msbOptimizer from Mixed-Signal Blockset™ to optimize transistor sizes of opamp and MOSFET of the Low Dropout Regulator (LDO) for given performance specification. LDOs are widely used in power supply systems and they track a reference voltage with varying load currents.

### Optimize Eye Height In SerDes System Model

Optimize performance metrics of a Simulink model using an optimization feature called msbOptimizer from the Mixed-Signal Blockset™. msbOptimizer uses a solver called surrogateopt from Global Optimization Toolbox™ for optimization. Any Simulink model can be optimized for best performance using the steps mentioned here. In this example, you will optimize eye metrics of a SerDes system. Eye metrics are an indication of the signal's quality and reliability and hence important parameters for serial communication.

## MATLAB 명령

다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.

명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

## How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

### Americas

- América Latina (Español)
- Canada (English)
- United States (English)

### Europe

- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)

- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)