From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview FPGA square signal

Dear all,

 

     I am using USRP 2954R and Labview FPGA. I am triying to square the I and Q parts of the received signal in order to implement an AM demodulator onto FPGA. The output of each ADC from any Rx channel is in I16 format (-32768 to 32767). The squared signal does not yield anything close to the expected form (all positive values), and looks very much like noise.

     Does anyone have more details upon the format of the RF0/Rx/I signal? is it signed two's complement format?

     Another weird thing is that I would expect that the squared value of a 16bit number to occupy 32bits, but the Labview help still shows 16 bit integer (see picture). Is it truncated somehow?

square_labviewfpga.png

Thank you!

   

0 Kudos
Message 1 of 5
(3,087 Views)

Hi Mihai_Liviu

 

A couple of thoughts here:

First, it's always a good idea to verify your algorithms on the host side first. Using some known data, does the algorithm do what you expect? This is the first step to make sure your math is doing what you expect, and gives you more flexibility in understanding what datatypes you need for which of your variables.

Then, you create the code using the same logic, but for the FPGA. I would recommend using our High Throughput Math functions, since they allow you to control exactly what fixed point configurations you want for the inputs and outputs of the function, as well as have built in terminals for handshaking. For example, you could use the High Throughput Multiply.

You can also use the examples specified at the bottom of the link above to see these functions in use!

 

Hope this help!

 

Ashley G.
Senior Applications Engineer | RF & Wireless Communications
0 Kudos
Message 2 of 5
(3,032 Views)

Hi Mihai_Liviu,

 

 

The I and Q signal that you are reading is the direct output of the ADCs (which are 14 bit ADCs, btw). Not sure why they are I16s and not U16s, but I wouldn't expect to get a negative value for I or Q. 

0 Kudos
Message 3 of 5
(3,030 Views)

Thank you smashly_gee!

I have found out about the High Throughput Math a few days later. Testing the operations on the host helped me found out about the numerical formats needed.

0 Kudos
Message 4 of 5
(3,016 Views)

Hi muffin.vi,

    Indeed, the ADC output 14bit values, but the labview numerical format is I16. One bit is surely for sign, 14 bits for data, and one bit is incertain?

The ADC output negative values for sign determination of the I or Q signal (it can be both positive or negative with respect to 0, as it's a real-world signal).

0 Kudos
Message 5 of 5
(3,014 Views)