Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
resources:tools-software:rf-microwave-toolbox [10 Mar 2022 14:37] – created Srikanth Pagadarairesources:tools-software:rf-microwave-toolbox [27 Feb 2023 23:47] (current) – Updated page to replace references to Longspeak with Stingray. Srikanth Pagadarai
Line 1: Line 1:
 ===== Analog Devices RF Microwave Toolbox For MATLAB and Simulink ===== ===== Analog Devices RF Microwave Toolbox For MATLAB and Simulink =====
  
-ADI maintains a set of tools to model, interface, and target with ADI RF and microwave devices within MATLAB and Simulink. These are combined into single Toolbox which contains a set of Board Support Packages (BSP). The list of supported boards is provided [[/resources/eval/user-guides/matlab_bsp#supported_boards|below]].+ADI maintains a set of tools to interface with ADI RF and microwave devices within MATLAB and Simulink. These are combined into single Toolbox which contains a set of Board Support Packages (BSP). The list of supported boards is provided [[/resources/eval/user-guides/matlab_bsp#supported_boards|below]].
  
 +==== Quick Start with Toolbox ====
 +
 +The current stable Toolbox can be downloaded from the [[https://github.com/analogdevicesinc/RFMicrowaveToolbox/releases|RF Microwave Toolbox GitHub Release Page]]. Download the latest mltbx file then open that file within MATLAB. Opening the file will automatically install the Toolbox, adding the necessary components to your MATLAB path. The "Analog Devices, Inc. RF Microwave Toolbox" will appear in your [[mw>help/matlab/matlab_env/manage-your-add-ons.html|Add-Ons Explore]] within MATLAB.
 +
 +<WRAP round download>
 +  * [[https://github.com/analogdevicesinc/RFMicrowaveToolbox/releases|Analog Devices Inc, RF Microwave Toolbox Release Page]]
 +</WRAP>
 +
 +To interface and stream data with hardware will require installation of [[resources:eval:user-guides:ad-fmcdaq2-ebz:software:linux:applications:libiio|libiio]] and one of two Hardware Support Packages from MathWorks. The libiio library can be obtained on the [[http://github.com/analogdevicesinc/libiio|Github]] page of the project.
 +== Libiio Installers==
 +<WRAP round download>
 +  * [[https://github.com/analogdevicesinc/libiio/releases|Installers and source for latest stable build]]
 +  * [[https://ci.appveyor.com/project/analogdevicesinc/libiio/build/artifacts?branch=master|Installer for latest nighty build (Windows 32-bit / 64-bit)]] (may be unstable / buggy)
 +</WRAP>
 +
 +Installation of either:
 +<WRAP round download>
 +  * [[mw>help/supportpkg/xilinxzynqbasedradio/index.html|Communications Toolbox Support Package for Xilinx Zynq-Based Radio]]
 +  * [[mw>help/supportpkg/plutoradio/index.html|Communications Toolbox Support Package for Analog Devices ADALM-Pluto Radio]]
 +</WRAP>
 +
 +<note important>Skip the Zynq SDR or ADALM-PLUTO post-installation steps. They are not used. The FPGA carrier board SD card images are available on the [[:resources:tools-software:linux-software:kuiper-linux |AD-FMC-SDCARD for Zynq & Altera SoC Quick Start Guide page]].</note>
 +
 +is required to use the streaming system objects or blocks. These support packages provide the necessary libIIO MATLAB bindings used by ADI's system objects.
 +
 +=== Building the Toolbox Manually ===
 +
 +The toolbox can only be built under Linux or with Cygwin on a Windows platform. Conveniently, the entire process is automated with a Makefile located in the CI/scripts folder of the repository. The following is required on the system before the build process can be run:
 +  * A supported MATLAB version installed in the default location (/usr/local/MATLAB)
 +  * A supported Vivado version installed in the default location (/opt/Xilinx)
 +  * Packages: git zip unzip tar make wget sed
 +
 +<note warning>You should only manually build the toolbox if you require a custom branch or no toolbox installer is available</note>
 +
 +First clone the repo and move into it:
 +<code>
 +git clone https://github.com/analogdevicesinc/RFMicrowaveToolbox.git
 +cd RFMicrowaveToolbox
 +</code>
 +To build the toolbox run the following:
 +<code>
 +make -C CI/scripts build
 +</code>
 +To create a installable tlbx file run:
 +<code>
 +make -C CI/scripts gen_tlbx
 +</code>
 +==== Device Control and Data Streaming ====
 +
 +Device interfaces which provide control and data streaming are implemented with MATLAB System Objects and Simulink Blocks. These System Objects can be access under the "adi" namespace in MATLAB and are followed by their part number or board name and finally Tx or Rx:
 +<code>
 +adi.<Part or Board Name>.<Tx or Rx>
 +</code> 
 +For example, to instantiate a Stingray object to control the X-Band Development Platform it can be created as follows:
 +<code>
 +bf = adi.Stingray;
 +</code>
 +The Stingray Evaluation board contains an ADXUD1AEBZ, ADF4371 and LTC2314. Therefore, it uses the objects corresponding to these devices along with ADAR100x, a genric ADAR1000 superclass under the hood. Similarly, ADALM-PHASER class is also derived from low level objects based on their parts.
 +
 +For example usage of certain objects, it can be useful to inspect their related test code which exercises initiations in different configurations.  The available code is available in the GitHub repo folder [[https://github.com/analogdevicesinc/RFMicrowaveToolbox/tree/master/test|here]], where object tests have the naming convention <Object>Tests.m.
 +
 +To get a list of currently available objects with the BSP installed simply run:
 +<code>
 +help adi
 +</code>
 +To get more information on a given object run:
 +<code>
 +help adi.<Part or Board Name>
 +</code>
 +or
 +<code>
 +doc adi.<Part or Board Name>
 +</code>
 +
 +=== Common Attributes ===
 +
 +There are some common attributes that need to be set for system objects and parts.
 +
 +  * ''uri'' Context address of IIO device.
 +    * IP with usage ''bf.uri = 'ip:192.168.2.1' ''
 +
 +=== Extending Interfaces ===
 +
 +If a driver attribute or setting is not available in the standard objects it can be easily extended to cover more IIO attributes. See this [[resources:eval:user-guides:matlab_bsp_extend|guide]].
 +
 +==== Examples ====
 +
 +Examples for streaming data and targeting FPGAs are listed within the Toolbox documentation itself. To view run the following with MATLAB:
 +<code>
 +doc adi
 +</code>
 +
 +==== Help & Support ====
 +
 +<WRAP round help 80%>
 +  * Questions? [[ez>sw-interface-tools|Ask Help & Support]].
 +</WRAP>
resources/tools-software/rf-microwave-toolbox.txt · Last modified: 27 Feb 2023 23:47 by Srikanth Pagadarai