Documentation Center

  • Trial Software
  • Product Updates

Xilinx FPGA-Based Radio Processing Errors and Fixes

The ping command times out

Problem

Ping command returns a message indicating it cannot reach the hardware.

Possible Solution

You can try any of the following:

  • Check that the NIC is set up correctly. See Configure Host Computer.

  • Verify Hardware Setup.

  • Check that your firewalls are either disabled or set up to pass data from the 192.168.0.X subnet (for Epiq radios) or 192.168.2.X subnet (for ADI radios).

Xilinx FPGA-based radio is busy

Problem

MATLAB® returns the following warning message from a call to function sdrinfo:

Warning: FPGA radio at address '192.168.2.2' is busy. The radio is already owned by a block, block dialog, or System object. Stop the simulation, close the open dialog, or call the release method of the System object to allow a new owner to be assigned. 

The FPGA-based radio is in use by another MATLAB or Simulink® entity. FPGA-based radios can become busy if any of the following conditions occur:

  • A Simulink simulation is in progress.

  • A Receiver or Transmitter Block mask is open.

  • A locked Receiver or Transmitter System object™ is present.

Possible Solution

You can release the FPGA-based radio by stopping the simulation, closing the block mask, or calling the release method of the System object.

Xilinx FPGA-based radio is not responding

Problem

The function sdrinfo(IPAddress), where IPAddress is the IP address of a Xilinx® FPGA-based radio, returns the following warning message:

Warning: Device at '192.168.2.2' is not responding. Attach a device at the specified address, correct the specified address to match an already attached device, set the host subnet value to match the device subnet value, or continue working in offline mode. Subnet value is the third field of the IP address.

Possible Solution

This warning indicates that your subnet configuration is incorrect. For example, this occurs if the Xilinx FPGA-based radio has an IP address of 192.168.0.2, but the host IP address is on another subnet and has an IP address of 192.168.X.1, where X is a number other than 0.

Correct the host IP address so that it matches the subnet value of the Xilinx FPGA-based radio as described in Configure Host Computer.

Alternatively, there might be an Ethernet connection problem between the host computer and the Xilinx FPGA-based radio. See the possible solutions under Function sdrinfo Fails.

Did not receive expected number of samples in burst reception

Problem

You get an error message stating that the host Did not receive expected number of samples in a burst reception.

This error occurs when the MATLAB or Simulink software does not receive the requested number of samples from the Xilinx FPGA-based radio.

Possible Solutions

The following are known causes of this problem:

  • On Linux® systems, the OS socket buffer size is not large enough for proper communication. Increase the socket size.

  • The Ethernet card cannot provide high-speed communication. You can try Intel® chipsets, which provide high-quality connection in such cases.

  • The firewall or virus protection program on your system is blocking or slowing your connection. Turning off the firewall or virus program can eliminate this problem. However, turning off your firewall can expose your host computer to unauthorized access through the Internet.

  • Some laptops lose their Ethernet settings when the Ethernet connection is interrupted, for example when power cycling the FPGA device. Check the Ethernet connection settings as described in Configure Host Computer.

No data from hardware

Problem

You are not receiving data from the hardware after streaming starts.

Possible Solution

Reestablish Connection.  If you do not have a connection, this might be caused by a bad network interface card (NIC), bad cable, or loss of power. Check the cables and power so that connectivity can be reestablished. Go through the steps in Configure Host Computer to make sure you have a basic connection. If you cannot establish a connection, check your hardware.

Synchronize Software With FPGA Device.  

  • For a Receiver block: Open the block mask and click Synchronize.

  • For a Receiver System object: Use the synchronize method.

Refresh Address Resolution Protocol (ARP) Cache.  An issue with the operating system IP stack can cause this issue, in which the IP address/MAC address binding is refreshed, interfering with the transmission of data from the development board to the host. You can avoid the IP address / MAC address refresh issue by setting a static entry in the ARP cache (the table that holds the address bindings). Find the IP address and MAC address by examining the Hardware Information section of the receiver (Epiq or ADI) block mask.

The following examples assume an ADI radio with the default values of 192.168.2.2 for the IP address and 00-0A-35-02-21-8A for the MAC address.

For Windows®: With system administrator privileges, execute the following in a command shell:

cmd> arp -s 192.168.2.2 00-0A-35-02-21-8A

To confirm that the operation outcome was as you expected, examine the table and verify the output shows a static entry type:

  cmd> arp -a 192.168.2.2

Interface: 192.168.2.8 --- 0x16
Internet Address      Physical Address      Type
192.168.2.2           00-0a-35-02-21-8a     static

For Linux: As root or via "sudo" privileges, execute the following in a command shell (note that the MAC address delimiter is ":" instead of "-"):

sh> sudo /usr/sbin/arp -s 192.168.2.2 00:0A:35:02:21:8A

To confirm the operation outcome was as you expected, examine the table and verify the output shows a static entry type (so noted by the PERM string):

sh> sudo /usr/sbin/arp -a 192.168.2.2
       
? (192.168.2.2) at 00:0a:35:02:21:8a [ether] PERM on eth3

Unicode conversion error

Problem

The following error can occur when you call any support package function that communicates with the FPGA-based device (after running function sdrsetup):

??? The conversion from a local code page string to unicode changes the number of characters. 
This is not supported.

This error happens due to a mismatch between the localization settings of your computer and the FPGA device.

Possible Solution

Follow the Linux or Windows steps to resolve this problem.

Linux.  

  1. At a command shell, enter one of the following commands to reset the locale to be compatible with the FPGA device:

    setenv LANG C

    Or

    setenv LANG en_US.ISO8859-1
  2. If you are using Ubuntu 9.10 or 10.10, enter the following:

    export LANG=C

    This syntax might also work for other versions of Ubuntu.

Windows.  

  1. Click Start. Select Control Panel > Clock, Language, and Region > Region and Language.

  2. Click the Administrative tab.

  3. Click Change system locale.

  4. Set Current system locale to English (United States).

  5. Click OK until you have exited the Region and Language menu.

  6. Run the function sdrinfo.

    If the function returns the expected IP address, this task is completed. If it does not, start again with Configure Host Computer.

Function sdrinfo Fails

Problem

Radio is not communicating with the host computer. You may get an error similar to the following:

Warning: Cannot create a driver for the specified address.  Either
no connection could be made or the device on the specified address
is not a known SDR radio.  The following error was returned:
 (internal error)
 b:\matlab\toolbox\shared\sdr\sdrf\sdrfdriver\export\include\sdrfdriver\fpga_protocols.hpp:327
 assertion failed
receiveControlResponse transport execution errorFailed to receive a
control packet from the FPGA target. 
> In C:\MATLAB\SupportPackages\R2013b\sdrf\+sdr\+internal\SDRBase2.p>SDRBase2.warnOnError at 933
  In C:\MATLAB\SupportPackages\R2013b\sdrf\+sdr\+internal\SDRBase2.p>SDRBase2.connect at 834
  In C:\MATLAB\SupportPackages\R2013b\sdrf\+sdr\+internal\SDRBase2.p>SDRBase2.infoImpl at 1018
  In pingsdrf at 58
  In sdrinfo at 57 
Warning: A device was found at '192.168.2.5' but it was not a
compatible FPGA radio.
 This could be due to:
 - incompatible versions of host and hardware
 - hardware that is in a bad state and requires power-cycling
 See the documentation for additional diagnostic information. 

Possible Solution

Try these other connection checks to see if you can identify where the communication problem is occurring.

Check Host—Hardware Ethernet Connection.  

  1. Check that the FPGA-based radio is powered on.

  2. Check that the Ethernet cable is plugged into the host computer at one end and is plugged into the FPGA-based radio at the other end.

  3. Check that the Ethernet LEDs are on.

    • If you do not see the Ethernet LEDs lights at one or both ends, check the cable connections at both ends.

    • If the lights still do not come on, try a different Ethernet cable.

  4. If you have multiple Ethernet ports on your host computer, check that the FPGA-based radio is connected to the desired Ethernet port.

  5. Check that the TCP/IPv4 properties of the host Ethernet connection are as shown in Configure Host Computer.

  6. Check that the subnet value of the host and the FPGA-based radio are the same.

  7. Repeat the configuration steps.

Check OS—FPGA Radio Connection (for Windows).  Check the connection using the ping command and the IP address of the FPGA radio.

  1. Open a command window.

  2. Try to contact the FPGA-based radio using the ping command and the IP address of the radio:

    %ping ipaddress

    ipaddress is the IP address of the FPGA radio, for example, '192.168.2.2'.

      Note:   It is important that you remember to use the IP address of the FPGA radio, not the host IP address.

  3. If you get a response similar to the following, then your connection is successful.

    If you get the message Request timed out, the NIC setup is incorrect. See Configure Host Computer.

Check OS—FPGA Radio Connection (for Linux).  Check the connection using the ping command and the IP address of the FPGA radio.

  1. Open a shell and type the following command:

    %ping ipaddress

    ipaddress is the IP address of the FPGA radio, for example '192.168.0.2'.

      Note:   It is important that you remember to use the IP address of the FPGA radio, not the host IP address.

  2. If you get a response similar to the following, then your connection is successful.

    If you get the message Request timed out, the NIC setup is incorrect. See Configure Host Computer.

sdrinfo fails if NIC IP is configured after executing sdrload

Problem

When you run sdrload and then configure the host (NIC) IP, a subsequent call to sdrinfo fails.

Possible Solution

Configure the host (NIC) IP before executing sdrload. See Hardware Setup Instructions.

Getting Overruns or Underruns

Problem

Model is not running in real time.

Possible Solution

If your model is not running in real time, you can try one of the following:

  • Use burst mode. See Burst-Mode Buffering.

  • Use vector-based processing.

  • Accelerate with code generation.

Send function becomes blocking when data packet is bigger than threshold

Problem

On Windows, the FastSendDatagramThreshold registry is set to 1024 by default.

Possible Solution

You must increase the UDP Fast Track Threshold. You can follow these instructions:

  1. With administrative privileges active, double-click on the reg file fastsenddatagramthreshold_update.reg, located in <supportpackageroot>/SupportPackages/<R20XX>/sdrf/sdrf, where <R20XX> is the release you are working with. You can also right-click on the reg file and select Merge.

    If you want to see the change before you apply it, you can right-click the reg file and select Edit.

  2. Reboot your computer for this change to take effect.

    Note:   You can use function sdrfroot to find the SDR support package root:

    >> sdrfroot
    
    ans =
    
    C:\MATLAB\SupportPackages\R2013b\sdrf

    In this example, <supportpackageroot> is C:\MATLAB\SupportPackages\R2013b\.

Receiver buffer overflow for high data (>3M sample) rate and/or underflow in Transmitter burst mode at high rate

Problem

On Linux, the socket buffer size is set to 128 KB by default. The Xilinx FPGA-based Radio software works optimally with a 1 MB socket buffer.

Possible Solution

Increase the size of the socket buffer by executing (root) the bash file located in <supportpackageroot>/SupportPackages/<R20XX>/sdrf/sdrf (where <R20XX> is the release you are working with):

./socketbuffersizelimit_update.sh

    Note:   You can use function sdrfroot to find the SDR support package root:

    >> sdrfroot
    
    ans =
    
    C:\MATLAB\SupportPackages\R2013b\sdrf

    In this example, <supportpackageroot> is C:\MATLAB\SupportPackages\R2013b\.

The device on the specified address is not a known SDR radio

Problem

A call to sdrinfo or other function that specifies a device address returns an error that the device is not known or that it cannot talk to the radio.

Possible Solution

Try these other connection checks to see if you can identify where the communication problem is occurring.

Check Host—Hardware Ethernet Connection.  

  1. Check that the FPGA-based radio is powered on.

  2. Check that the Ethernet cable is plugged into the host computer at one end and is plugged into the FPGA-based radio at the other end.

  3. Check that the Ethernet LEDs are on.

    • If you do not see the Ethernet LEDs lights at one or both ends, check the cable connections at both ends.

    • If the lights still do not come on, try a different Ethernet cable.

  4. If you have multiple Ethernet ports on your host computer, check that the FPGA-based radio is connected to the desired Ethernet port.

  5. Check that the TCP/IPv4 properties of the host Ethernet connection are as shown in Configure Host Computer.

  6. Check that the subnet value of the host and the FPGA-based radio are the same.

  7. Repeat the configuration steps.

Was this topic helpful?