ad9361_config_proxy RCC Worker

Detail

The version of No-OS used was GitHub commit 8c52aa42e74841e3975a6f33cc5303ed2a670124, which was the latest commit in the Analog Devices-recommended latest 2018_R2 release branch at the time of development.

No-OS features “platform layers” which are .c/.h files which implement hardware-specific SPI register accesses within generic API calls. No-OS includes several platform layers which are all specific to the Analog Devices HDL design. In order to use No-OS with OpenCPI, a new platform layer was added within the ad9361_config_proxy.rcc code which provided OpenCPI-specific functionality for SPI accesses via slave device property read/writes. This new platform layer was implemented via the ad9361_platform.cc, ad9361_platform.h, and parameter.h files.

This worker implements every No-OS API call as a property, with the matching ad9361_get…()/ad9361_set…() API calls collapsed into a single volatile and writable ad9361_config_proxy.rcc property. Each property’s type(s)/data structure(s) map directly to the type(s)/data structure(s) passed as argument(s) to that property’s analogous No-OS function. The only exception to this methodology are:

  • The No-OS ad9361_do_mcs() function is not implemented as a worker property since it performs a multi-chip-sync operation which could not yet be verified.

  • The No-OS ad9361_set_rx_fir_config() / ad9361_get_rx_fir_config() and ad9361_set_tx_fir_config() / ad9361_get_tx_fir_config() functions are implemented as separate rx_fir_config_write/rx_fir_config_read and tx_fir_config_write/tx_fir_config_read properties, respectively, instead of collapsed into a single rx_fir_config and tx_fir_config properties due to the fact that the …get…() calls ignore the …path_clks and _bandwidth struct members, whereas the ..set..() calls do not. Consequently, in an attempt to avoid confusion by the end user, different structs were implemented for the write properties than were for the read properties.

The No-OS API calls often require passing integer values which, according to the No-OS documentation, are intended to correlate with C macros. For example, the No-OS ad9361_set_rx_fir_en_dis() function has a argument of type uint8_t, but the comments indicate its value should be one of the ENABLE or DISABLE ad9361_api.h integer macros:

/**
 * Enable/disable the RX FIR filter.
 * @param phy The AD9361 current state structure.
 * @param en_dis The option (ENABLE, DISABLE).
 *               Accepted values:
 *                ENABLE (1)
 *                DISABLE (0)
 * @return 0 in case of success, negative error code otherwise.
 *
 * Note: This function will/may affect the data path.
 */
int32_t ad9361_set_rx_fir_en_dis (struct ad9361_rf_phy *phy,
                                  uint8_t en_dis)

Because a design decision was made to have a strict one-to-one mapping between No-OS API calls and ad9361_config_proxy.rcc properties, and because No-OS passes integers as arguments instead of forcing strictly enumerated types, this worker likewise uses integer types for properties instead of enumerated ones. To aid in alleviating confusion when using this worker’s properties, many of the No-OS C macros are mapped to parameter properties of this worker and the property descriptions reference the parameter properties which are intended to be used. This way, parameter properties can be read at runtime, and the read values used to set a property. For example, the ad9361_set_rx_fir_en_dis property’s description references the ENABLE and DISABLE parameter properties which have values of 1 and 0, respectively.

In addition to the worker’s properties which map to No-OS API calls, other properties exist which provide further functionality. This includes PLL lock status, low-level PLL divider values which can be used to validate the LO frequencies read by No-OS, fastlock memory management (deletion), the FPGA data mode configuration (LVDS, CMOS, etc) via the LVDS, single_port, swap_ports, half_duplex, data_rate_config properties, and the DATA_CLK_P_rate_Hz.

Note also that this worker’s usage of no-OS not only makes SPI register accesses but also sets the AD9361 RESETB, ENABLE, and TXNRX pins via the Ad9361 config (ad9361_config) and Ad9361 spi (ad9361_spi) workers.

Performance and Resource Utilization

Table 101: Resource Utilization Table for worker: ad9361_config_proxy

Processor Type

Processor Frequency

Run Function Time

TBD

TBD

TBD

Worker Properties

  • digital_rx_block_delay_sec

    • Type: struct

      • Sequence length: 2

      • Members:

        • rf_port:

          • data_type: enum

          • enums: ['RX1', 'RX2']

        • delay_sec:

          • data_type: double

    • Access:

      • Parameter: False

      • Writable: False

      • Initial: False

      • Volatile: True

      • Read back: False

    • Default value: None

Utilization

Utilization reporting is not currently implemented.

References