On 8/25/20 11:03 AM, Snehasish Kar via USRP-users wrote: > We are trying to implement some filters in rfnoc, we wanted to use fixed > point numbers. As per my knowledge, I and Q are I16 bits individually > and IQ combined I32 bits. We wanted to convert them into fixed > point numbers. But I am concerned about the host UHD driver's > interpretation of the data. Do we need to keep a stage at the last where > we are converting from fixed point back to integer I32?
Out of the box, UHD can handle the following fixed point types: - sc16 (I+Q, each 16 bits) - sc12 (I+Q, each 12 bits, packed) - s16 (real, 16 bits) - s8 (real, 8 bits) - u8 (unsigned real, 8 bits. Usually used for arbitrary data, packets, etc.) You can add more types, but it's awkward and not super well documented. If you do want to add types, check the convert subsystem. Now, I don't understand what you mean by "convert to fixed point", b/c you're already at fixed point. But let's assume you're trying to convert to a different, specific fixed point representation, then you can keep using sc16 (for complex) or s16 (for real) or the corresponding 8-bit versions. Nothing in UHD will actually touch the data, other than some unpacking and endianness swapping, if necessary. This is different if you've configured your host to use floating point (fc32). Then, UHD will convert your fixed point to floating point before returning your buffer. --M _______________________________________________ USRP-users mailing list USRP-users@lists.ettus.com http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com