N-bit ADC with flash architecture
Mixed-Signal Blockset / ADC / Architectures

An N-bit flash ADC comprises of a resistive ladder that contains 2N resistors and 2N-1 comparators.

The reference voltage of each comparator is 1 least significant bit (LSB) higher than the
one below it in the ladder. As a result, all comparators below a certain point will have input
voltage greater than the reference voltage, and a logic 1 output. All
comparators above that point will have input voltage smaller than the reference voltage, and a
logic 0 output. The output of
2N-1 comparators are passed through a priority
encoder to produce the digital output. This encoding scheme is called thermometer
encoding.
Since the analog input is applied to all the comparators at once, the flash ADC architecture is very fast. But the ADC has low resolution and high power requirements due to a large number of resistors required to implement the architecture.
analog — Analog input signalAnalog input signal, specified as a scalar.
Data Types: double
start — External clock to start conversionExternal clock to start conversion, specified as a scalar. start determines when the analog to digital conversion process starts.
Data Types: double
digital — Converted digital output signalConverted digital output signal, returned as scalar.
Data Types: fixed point | single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean
ready — Determines whether analog to digital conversion is completeDetermines whether the analog to digital conversion is complete, returned as a scalar.
Data Types: double
Number of bits — Number of physical output bits10 (default) | positive real integer in the range [1, 26]Number of physical output bits, specified as a unitless positive real integer in the
range [1, 26]. Number of bits determines the
resolution of the ADC.
Use get_param(gcb,'NBits') to view the current
Number of bits.
Use set_param(gcb,'NBits',value) to set
Number of bits to a specific value.
Data Types: double
Input range (V) — ADC dynamic range[-1 1] (default) | 2-element row vectorADC dynamic range, specified as a 2-element row vector in volts.
Use get_param(gcb,'InputRange') to view the current
Input range (V).
Use set_param(gcb,'InputRange',value) to set
Input range (V) to a specific value.
Data Types: double
Use external start clock — Connect to external start conversion clockSelect to connect to an external start conversion clock. By default, this option is selected. If you deselect this option, a Sampling Clock Source block inside the Flash ADC is used to generate the start conversion clock.
Conversion start frequency (Hz) — Frequency of internal start conversion clock1e6 (default) | positive real scalarFrequency of internal start conversion clock, specified as a positive real scalar in hertz. Conversion start frequency (Hz) determines the rate of the ADC.
This parameter is only available when Use external start clock is not selected.
Use get_param(gcb,'StartFreq') to view the current
value of Conversion start frequency (Hz).
Use set_param(gcb,'StartFreq',value) to set
Conversion start frequency (Hz) to a specific
value.
Data Types: double
RMS aperture jitter (s) — RMS aperture jitter added to the start conversion clock1e-12 (default) | real nonnegative scalarRMS aperture jitter added as an impairment to the start conversion clock, specified as a real nonnegative scalar in seconds. Set RMS aperture jitter value to zero if you want a clean clock signal.
This parameter is only available when Use external start clock is not selected.
Use get_param(gcb,'StartClkJitter') to view the
current value of RMS aperture jitter (s).
Use set_param(gcb,'StartClkJitter',value) to set
RMS aperture jitter (s) to a specific value.
Data Types: double
Edge trigger type — Clock edge type that triggers the output updateRising edge (default) | Falling edge | Either edgeClock edge type that triggers the output update:
Rising edge — the output is updated with the rising
edge of the clock signal.
Falling edge — the output is updated with the
falling edge of the clock signal.
Either edge — the output is updated with both the
rising and the falling edge of the clock signal.
Use get_param(gcb,'Trigger') to view the current
Edge trigger type.
Use set_param(gcb,'Trigger',value) to set
Edge trigger type to a specific value.
Match input scale — Inherit output polarity and data type from inputInherit the output polarity and data type from the analog input signal to the ADC. When this option is selected, it forces the ADC to output a scalar double matched to the input's scale of the ADC.
Output polarity — Defines ADC output polarityAuto (default) | Bipolar | UnipolarDefines the ADC output data polarity.
If Output polarity is set to Auto, the
minimum and maximum values of the output are determined by the polarity of the
Input range.
If Output polarity is set to Bipolar,
the outputs are between -2Nbits-1 and
2Nbits-1-1.
If Output polarity is set to Unipolar,
the outputs are between 0 and
2Nbits-1.
This parameter is only editable when Match input scale option is deselected.
Use get_param(gcb,'OutputPolarity') to view the
current Output polarity.
Use set_param(gcb,'OutputPolarity',value) to set
Output polarity to a specific value.
Output data type — Defines ADC output data typefixdt(1,Nbits) (default) | fixdt(0,Nbits) | double | single | int8 | int16 | int32 | uint8 | uint16 | uint32 | Inherit: Inherit via back propagationDefines ADC output data type.
Unsigned integers and fixed-point types (fixdt(0,Nbits))
are not available when the Output polarity is set to
Bipolar or Auto.
Signed integers and fixed-point types (fixdt(1,Nbits)) are
not available when the Output polarity is set to
Unipolar.
This parameter is only editable when Match input scale option is deselected.
Use get_param(gcb,'OutDataType') to view the current
Output data type.
Use set_param(gcb,'OutDataType',value) to set
Output data type to a specific value.
Enable impairments — Enable impairments in ADC simulationSelect to enable impairments such as offset error and gain error in ADC simulation. By default, this option is deselected.
Offset error — Shifts quantization steps by specific value3 LSB (default) | real scalarShifts quantization steps by specific value, specified as a scalar in %FS, FS, or LSB.
This parameter is only available when Enable impairments is selected in the Impairments tab.
Use get_param(gcb,'OffsetError') to view the current
value of Offset error.
Use set_param(gcb,'OffsetError',value) to set
Offset error to a specific value.
Data Types: double
Gain error — Error on slope of ADC transfer curve2 LSB (default) | real scalarError on the slope of the straight line interpolating ADC transfer curve, specified as a real scalar in %FS, FS, or LSB.
This parameter is only available when Enable impairments is selected in the Impairments tab.
Use get_param(gcb,'GainError') to view the current
value of Gain error.
Use set_param(gcb,'GainError',value) to set
Gain error to a specific value.
Data Types: double
Missing codes — Position of the failed comparators[] (default) | row vector with positive real valuesPosition of the failed comparators, specified as a row vector with positive real values.
This parameter is only available when Enable impairments is selected.
Use get_param(gcb,'Bubbles') to view the current
Missing codes.
Use set_param(gcb,'Bubbles',value) to set
Missing codes to a specific value.
Data Types: double
ADC AC Measurement | ADC DC Measurement | ADC Testbench | Aperture Jitter Measurement | SAR ADC