discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] The format of I/Q sample


From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] The format of I/Q sample
Date: Mon, 15 Aug 2011 13:27:11 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Thunderbird/3.1.11

On 08/15/2011 01:22 PM, xi yang wrote:
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

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 Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]