main content

effect of metastability impairment in flash adc -凯发k8网页登录

this example shows how to 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.

customize flash adc

extract the inner structure of the flash adc to add customized impairment. add a flash adc block from the mixed-signal blockset™ library to a simulink® canvas. look under the mask to find the flat structure of the adc. copy and paste the complete structure to another new blank canvas.

delete the clock generator block because it is not used to provide the start conversion clock. an external stimuli subsystem is used for that purpose. the flash adc now consists of three major components:

  • flash adc comparators

  • fault aware ones counter

  • output data type

flash adc comparators

an n-bit flash adc uses comparators in parallel. the flash adc comparators subsystem itself is based on matlab® code. before the simulation starts, the comparators calculate the individual reference voltages and store them in a vector. on every specified edge, the input is compared to the references using matlab's ability to compare vectors. this generates thermometer code similar to the real flash adc, without the lag from n individual comparator blocks in the model.

to create a 10- bit adc, set number of bits (nbits) to 10, input range to [-1 1], and inl vector to 0. trigger type is kept at its default value rising edge.

fault aware ones counter

the fault aware ones counter subsystem implements the impairments in the flash adc architecture. real adcs handle conversion from thermometer to binary through logic circuits. this subsystem takes the sum-of-elements of the vector stored by the comparators and applies that sum to a lookup table to simulate missing codes, otherwise known as bubbles.

set the fault aware ones counter parameters: number of bits (nbits) to 10, input range to [-1 1], and bubble codes to []. trigger type is kept at its default value rising edge.

output data type

the output data type subsystem handles conversion from the data type at the output of the fault aware ones counter to the data type specified on the mask of the flash adc.

break the library link between the output data type block and its reference library. set input dynamic range to [-1 1] and bipolar data type to double.

implement metastability probability as an impairment to flash adc

to add metastability impairment, place a triggered subsystem with a matlab function block after the flash adc comparators subsystem. the matlab function block sets thermometer code signals to nans with a probability from a uniform random number generator. the block resets the signals on the next relevant edge which is why a triggered subsystem is used. use this code to implement the metastability impairment subsystem.

%  function y = metastability(u, probability)
%   mult = ones(size(u));
%   mult(rand(size(u)) < probability(1)) = nan; % metastability = nan
%   y = u .* mult;
%  end

provide the metastability probability that you want to implement through a constant block connected to the probability port.

implement measuring metastability probability

to measure metastability impairment, count the number of nans encountered and divide that by the number of total comparator outputs generated during the complete simulation. a simple simulink implementation of metastability probability measurement is:

the inports are:

  • adc output- receives the output digital code generated by the flash adc.

  • ready signal- receives the ready signal which represents the rate at which the digital conversion is taking place. the digital code gets generated at each rising edge of the signals received by 'ready signal' port.

simulation for metastability measurement

the model below combines the customized flash adc with its output connected to the metastability probability measurement system. in the model, you have a 10-bit flash adc with metastability probability of 1e-6 added. the stimuli subsystem generates an analog signal of 100 hz and a start conversion clock with a frequency of 100 mhz. the adc operates at the rate defined by the start conversion clock frequency. a dashboard scope provides the behavior of the probability number over time. a display block shows the current probability being measured by the subsystem. you must run the simulation for a long enough period to see the probability number settled at the desired value, in this case 1e-6.

nbits=10;
model1='flashadc_metastability.slx';
open_system(model1);
open_system([bdroot,'/time scope']);
sim(model1);

effect of metastability on dynamic performance of adc

you can observe the effect of metastability on the dynamic performance of adcs. the model shows two setup of flash adc systems: one with metastability and the other without. a postprocessing block that takes in the impaired digital output and converts the nans to zeros. this is because the digital output with nans cannot be recognized by a spectrum analyzer as valid signal for spectral analysis. attach an adc ac measurement block to observe various performance metrics like snr, enob, noise floor and so on. the simulation results show the ac analysis causes a significant drop in performance for adc with metastability, as shown by the lower enob and higher noise floor.

model2='flashadc_metastability_effect.slx';
open_system(model2);
sim(model2);

see also

| |

related topics

    网站地图