# Clarification regarding Sample width in USRP

**URL:** <https://www.ruby-forum.com/t/clarification-regarding-sample-width-in-usrp/239507>\
**Category:** GNU Radio\
**Created:** [March 2, 2014, 5:01am UTC](https://www.ruby-forum.com/t/clarification-regarding-sample-width-in-usrp/239507 "2014-03-02T05:01:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [March 2, 2014, 5:01am UTC](https://www.ruby-forum.com/t/clarification-regarding-sample-width-in-usrp/239507/1 "2014-03-02T05:01:52Z")

</div>

Hello Everyone,

From little bit of googling I understood that there are different sample  
width possible in USRP. If my understanding is correct, we can use 16/8  
bit  
sample width.

But my usrp block in GNU Radio lists complex float32 and complex int16,  
and  
VITA word 32 as the types.

How can we relate this with the 16/8 bit sample width?

From my understanding the complex data type in GNU Radio uses  
interleaved  
float32. So does the driver on the host machine convert the incoming  
data  
from its sample width to the one we want to the upstream blocks?

---

<div class="post-metadata">

**Author:** ![Manu\_T\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea5d25/32.png) [@Manu\_T\_S](https://www.ruby-forum.com/u/Manu_T_S)\
**Post date:** [March 2, 2014, 5:04am UTC](https://www.ruby-forum.com/t/clarification-regarding-sample-width-in-usrp/239507/2 "2014-03-02T05:04:13Z")

</div>

On 03/01/2014 11:00 PM, Manu T S wrote:

> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)  
> You’re looking for the “wire format” parameter in the UHD source/sink.

UHD converts the wire-format into the floating-point format used within  
Gnu Radio.

---

<div class="post-metadata">

**Author:** ![Manu\_T\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea5d25/32.png) [@Manu\_T\_S](https://www.ruby-forum.com/u/Manu_T_S)\
**Post date:** [March 2, 2014, 4:07pm UTC](https://www.ruby-forum.com/t/clarification-regarding-sample-width-in-usrp/239507/3 "2014-03-02T16:07:52Z")

</div>

On 03/02/2014 06:04 AM, Manu T S wrote:

> Marcus,
> 
> Thanks..
> 
> Few more things.
> 
> Is it correct to assume that In the wiretype, complex intx(x = 16 or 8)  
> means that each I sample is represented by x bits, and Q sample is  
> represented by x bits?

Yes, e.g. sc16 → 16 bits for I and Q, respectively == 32 bits / sample.

> What does the input type and output type in usrp sink and usrp source  
> respectively, in GNU radio companion convey?

This is the type used in the flow graph. You usually want complex float  
32, which is the standard GR complex type. Complex int 16 would be the  
same as sc16 for the wire format (i.e., we don’t convert).

M

---

<div class="post-metadata">

**Author:** ![Manu\_T\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea5d25/32.png) [@Manu\_T\_S](https://www.ruby-forum.com/u/Manu_T_S)\
**Post date:** [March 2, 2014, 6:05am UTC](https://www.ruby-forum.com/t/clarification-regarding-sample-width-in-usrp/239507/4 "2014-03-02T06:05:58Z")

</div>

Marcus,

Thanks…

Few more things.

Is it correct to assume that In the wiretype, complex intx(x = 16 or 8)  
means that each I sample is represented by x bits, and Q sample is  
represented by x bits?

What does the input type and output type in usrp sink and usrp source  
respectively, in GNU radio companion convey?

Manu
