The format of I/Q sample

Hi, all

I want to use fpga to do FFT before the data are transmitted to usb.

In FFT module, I used float point numbers to be its input. According
to the IEEE Floating-Point Standard, a float point number is
represented by 32 bits (bits 0 through 22 form the mantissa, bits 23
through 30 form the exponent, and bit 31 is the sign bit). However, in
GNU Radio, the UHD drive sends 16bits I, and 16bits Q.

Are I and Q float point numbers? How do the 16bits represent a float
number? Any suggestion about the I/Q’s format is appreciated!

Thanks,
Yooxi

On Mon, Aug 15, 2011 at 12:48 AM, xi yang [email protected] wrote:

Are I and Q float point numbers? How do the 16bits represent a float number?
Any suggestion about the I/Q’s format is appreciated!

Thanks,
Yooxi

The interface to the USRP is defined to take floating point numbers.
It will perform the conversion to the 16-bit shorts that are sent over
the wire for you. Also remember that the output of the FFT is a
vector, so you’ll want to use the gr_vector_to_stream block to convert
it back to a stream of floating point samples.

Tom

Hi, Tom,

Thanks a lot for your prompt reply!
Do you mean on the Transmitting side?
I want to know how 32-bit floating point number is converted to 16bits
or
from 16bits to 32bits.
Where can I find the file that performs this conversion?

We are actually working on the Receiving side.
Before we move I/Q samples from rx_buffer to USB, we want to do FFT and
deliver the FFT results instead of the raw I/Q samples to the host.
For my FPGA FFT module, I use 32bits floating point numbers as input.
So I want to know how the I/Q samples are represented by 16bits so that
I
can convert them to 32bits.
In 32bits representation, bits 0 through 22 form the mantissa, bits 23
through 30 form the exponent, and bit 31 is the sign bit.
In 16bits, do we simply cut 16bits of the mantissa?
Then bits 0 through 6 form the mantissa, bits7 through 14 form the
exponent,and bit 15 is the sign bit. Is that right?
It’s better if we can have a look at the conversion file.

Thanks,
Yooxi

2011/8/15 Tom R. [email protected]

On 08/15/2011 01:22 PM, xi yang wrote:

and deliver the FFT results instead of the raw I/Q samples to the host.
Yooxi

The host interface uses 16-bit integers for I and Q. They’re only
represented as floating-point numbers within a Gnu Radio flow-graph.

Internally in the FPGA, everything is integers, starting with 12-bit
integers from the ADC (on the USRP1), then through the CIC decimators
and DDC, they become larger, but what is finally injected into the
host is 16-bit (integer) I and 16-bit (integer) Q.
Standard twos-complement representation for the integers, I don’t
happen to recall off the top of my head whether they’re “big endian”
or “little endian”.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

Hi, Marcus,

Thanks a lot for your quick reply!
Then start from where, the integers become floating point numbers?
I’d like to see how they are converted.

Thanks,
Yooxi

Marcus D. Leech wrote:

We are actually working on the Receiving side.
It’s better if we can have a look at the conversion file.
Standard twos-complement representation for the integers, I don’t
Principal Investigator


View this message in context:
http://old.nabble.com/The-format-of-I-Q-sample-tp32262153p32266070.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Hi, Marcus,

Thanks a lot for your quick reply!
Then start from where, the integers become floating point numbers?
I’d like to see how they are converted.

Thanks,
Yooxi

They are never floating-point numbers inside the FPGA or on the host
interface. For UHD, they get scaled and converted
inside the appropriate files. I can’t tell you which specific file,
but the UHD source code is available, and I’m sure Josh
could tell you where the conversion between host-transport-format and
gnuradio-format happens with UHD/gr-uhd.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

Hi, Marcus,

Thanks a lot!
We will look into the UHD source code.

Best regards,
Yooxi

Marcus D. Leech wrote:

They are never floating-point numbers inside the FPGA or on the host
http://www.sbrac.org


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page


View this message in context:
http://old.nabble.com/The-format-of-I-Q-sample-tp32262153p32266153.html
Sent from the GnuRadio mailing list archive at Nabble.com.