Data Source QADC (data_src_qadc)

Provides HDL device worker functionality common to all ADC devices. data_src_qadc is an asset in the ocpi.platform.devices component library. Implementations include the data_src_qadc HDL Device Worker (data_src_qadc.hdl). Tested platforms include xsim (Vivado 2017.1).

Design

The data source Quad Analog-to-Digital Converter (QADC) component provides the property and port definitions necessary for the data source QADC HDL device worker, which performs all the generic functionality required to ingest ADC data onto an FPGA.

A block diagram representation of the implementation is given in Figure 4:

Data Source QADC Block Diagram

Figure 4: Data Source QADC Block Diagram

Interface

<ComponentSpec>

  <Property name='ADC_WIDTH_BITS'
            type='ushort'
            parameter='true'
            default='12'
            description='Number of bits in each of the I and Q values received
            from the ADC device.'/>
  <Property name='ADC_INPUT_IS_LSB_OF_OUT_PORT'
            type='bool'
            parameter='true'
            default='false'
            description='Indicates whether ADC data is justified to most
            significant or least significant ADC_WIDTH_BITS of the out port.
            When value is false, sign extension occurs.'/>

  <Property name='clr_overrun_sticky_error'
            type='bool'
            writable='true'
            default='false'
            description='Writing true clears overrun_sticky_error.'/>
  <Property name='overrun_sticky_error'
            type='bool'
            volatile='true'
            description='Sticky bit indication of samples overrun.'/>

  <Property name='samp_count_before_first_samp_drop'
            type='ulong'
            volatile='true'
            description='Number of samples before the first dropped sample.'/>

  <Property name='num_dropped_samps'
            type='ulong'
            volatile='true'
            description='Number of samples dropped.'/>

  <Property name='suppress_sync_opcode'
          type='bool'
          writable='true'
          default='false'
          description='Writing true suppresses the worker from sending sync opcodes'/>

  <DataInterfaceSpec name='out'
                     producer='true'
                     protocol='ComplexShortWithMetadata-prot'/>

</ComponentSpec>

Properties

  • ADC_WIDTH_BITS: Number of bits in each of the I and Q values received from the ADC device.

    • Type: ushort

    • Access:

      • Parameter: True

      • Writable: False

      • Initial: False

      • Volatile: False

    • Default value: 12

  • ADC_INPUT_IS_LSB_OF_OUT_PORT: Indicates whether ADC data is justified to most significant or least significant ADC_WIDTH_BITS of the out port. When value is false, sign extension occurs.

    • Type: bool

    • Access:

      • Parameter: True

      • Writable: False

      • Initial: False

      • Volatile: False

    • Default value: false

  • clr_overrun_sticky_error: Writing true clears overrun_sticky_error.

    • Type: bool

    • Access:

      • Parameter: False

      • Writable: True

      • Initial: False

      • Volatile: False

    • Default value: false

  • overrun_sticky_error: Sticky bit indication of samples overrun.

    • Type: bool

    • Access:

      • Parameter: False

      • Writable: False

      • Initial: False

      • Volatile: True

    • Default value: None

  • samp_count_before_first_samp_drop: Number of samples before the first dropped sample.

    • Type: ulong

    • Access:

      • Parameter: False

      • Writable: False

      • Initial: False

      • Volatile: True

    • Default value: None

  • num_dropped_samps: Number of samples dropped.

    • Type: ulong

    • Access:

      • Parameter: False

      • Writable: False

      • Initial: False

      • Volatile: True

    • Default value: None

  • suppress_sync_opcode: Writing true suppresses the worker from sending sync opcodes.

    • Type: bool

    • Access:

      • Parameter: False

      • Writable: True

      • Initial: False

      • Volatile: False

    • Default value: false

Ports

Inputs:

None.

Outputs:

  • out

    • Protocol: ComplexShortWithMetadata-prot

    • Optional: False

Implementations

  • data_src_qadc (HDL)

    HDL device worker implementation providing common functionality to all ADC device types.

Example Application

To be supplied: a meaningful example for this HDL device worker. Is the test app a candidate?

<?xml version="1.0"?>
<!-- This file is protected by Copyright. Please refer to the COPYRIGHT file
     distributed with this source distribution.

     This file is part of OpenCPI <http://www.opencpi.org>

     OpenCPI is free software: you can redistribute it and/or modify it under
     the terms of the GNU Lesser General Public License as published by the Free
     Software Foundation, either version 3 of the License, or (at your option)
     any later version.

     OpenCPI is distributed in the hope that it will be useful, but WITHOUT ANY
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
     more details.

     You should have received a copy of the GNU Lesser General Public License
     along with this program. If not, see <http://www.gnu.org/licenses/>. -->
<application done="file_write">
  <instance component="ocpi.core.file_read" connect="data_src_qadc">
    <property name="filename" value="input.bin"/>
  </instance>
  <instance component="ocpi.platform.devices.data_src_qadc" connect="file_write">
    <!-- Skeleton application outline, set properties here. Or change this
         example application to do something more real-world appropriate if
         file-read, then component, then file-write is too artifical to be a
         useful example. -->
  </instance>
  <instance component="ocpi.core.file_write">
    <property name="filename" value="output.bin"/>
  </instance>
</application>

Dependencies

The dependencies on other elements in OpenCPI are:

  • None.

Limitations

Limitations of data_src_qadc are:

  • None.

Testing

This component does not have a component unit test suite. However, an application (which is not a unit test) exists for testing purposes. See platform/applications/data_src_adc_ext.test_app.

Component testing not completed.