wiki:WARPLab/MEX

Version 1 (modified by welsh, 11 years ago) (diff)

--

WARPLab MEX Compliation

In order to provide better performance, some WARPLab functionality has been moved in to MEX. Please refer to the How-To Compile MEX guide in order to understand the MEX compilation setup and procedure.


WARPLab MEX UDP Transport

Versions: WARPLab 7.3.0 and later

By default, WARPLab will use built-in java routines for performing network I/O. However, this has some performance limitations as can be seen by our Read IQ / Write IQ performance benchmarks. Therefore, we have developed a custom WARPLab MEX UDP transport in order to provide a high performance transport for data transfer operations. The WARPLab MEX UDP transport can provide dramatically faster performance while leaving the usage of WARPLab otherwise identical.

To install the WARPLab MEX UDP Transport, please perform the following steps:

NOTE: Make sure you are downloading the WARPLab 7.3.0 (or later) release, or your repository is updated to the WARPLab 7.3.0 (or later) release. In order to use this transport on your system, you must compile the wl_mex_udp_transport mex function (see How-To Compile MEX for more information).

  1. Locate the WARPLab MEX UDP Transport source in one of the following locations:
    1. <Unpacked WARPLab Reference Design Directory>\M_Code_Reference\mex\
    2. /ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/mex
    3. svn co http://warpproject.org/svn/WARP/ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/mex
  2. TBD -
  3. Verify wl_mex_udp_transport is recognized by running wl_mex_udp_transport('version'); on the MATLAB command line. The output should print the version number. For example:
    >> wl_mex_udp_transport('version');
    Loaded wl_mex_udp_transport version 1.0.0a 
    WARPLab MEX UDP Transport v1.0.0a (compiled Aug 21 2013 09:46:30)
    Copyright 2013, Mango Communications. All rights reserved.
    Distributed under the WARP license:  http://warpproject.org/license  
    
  4. Re-run the wl_setup function in M_Code_Reference. One prompt will be to select which type of transport you want to use. If you have added a compatible, compiled wl_mex_udp_transport to your path, the script will list it as an option you can select.

NOTE: simply re-running 'wl_setup' and selecting java is sufficient for switching back to the built-in java routines. You do not need to explicitly remove wl_mex_udp_transport from your MATLAB path.


pnet Toolbox

NOTE: The PNET toolbox will not be supported in WARPLab 7.4.0 or later.

By default, WARPLab will use built-in java routines for performing network I/O. pnet, a custom UDP mex toolbox for matlab, is also supported, but the latest version is required. pnet can offer modestly higher performance than the built-in java routines, but the usage of WARPLab is otherwise identical. Note: these performance gains are negligible for jumbo frame packets near 9000 bytes on length. If you want to use pnet, please perform the following steps:

  1. Install the updated pnet IP/UDP toolbox for MATLAB
    1. Checkout the source from /PlatformSupport/pnet (or svn co http://warpproject.org/svn/WARP/PlatformSupport/pnet)
      • The repository contains a compiled binary for Windows 7 64-bit
      • For other platforms, compile the pnet mex function
    2. Add the pnet folder to your MATLAB path. The pnet folder should contain pnet.m and th pnet.mex binary (i.e. pnet.mexw64)
    3. Verify pnet is recognized by running pnet('version'); on the MATLAB command line. The output should print the version number.
    4. Re-run the wl_setup function in M_Code_Reference. The final prompt will be to select which type of transport you want to use. If you have added a compatible, compiled pnet to your path, the script will list it as an option you can select. Note: simply re-running 'wl_setup' and selecting java is sufficient for switching back to the built-in java routines. You do not need to explicitly remove pnet from your MATLAB path.