[USRP-users] Re: Frequency Switch with USRP B200

2022-07-09 Thread Dustin Widmann via USRP-users
Are you certain you're connected to a USB 3.0 port / with a USB 3.0 cable? (the maximum practical sample rate for  USB 2.0 is around 3.75 MHz assuming complex float samples). Do you also see the same problems if you run benchmark_rate from UHD examples? -Dustin On 7/7/22 01:37, ouzan...@hotma

[USRP-users] Re: How use convert class in UHD to convert complex float to complex sint16?

2022-07-09 Thread Marcus D. Leech
On 2022-07-09 15:39, frie...@free.fr wrote: on that data.   MOST machines these days are little-endian (x86, etc). except for the JVM and all the Android applications which are big-endian hence ! I am not sure x86-based PCs account for "most machines" today, although they are arguably the most

[USRP-users] Re: How use convert class in UHD to convert complex float to complex sint16?

2022-07-09 Thread friedtj
> on that data.   MOST machines these days are little-endian (x86, etc).   except for the JVM and all the Android applications which are big-endian hence ! I am not sure x86-based PCs account for "most machines" today, although they are arguably the most supported GNU Radio running environme

[USRP-users] Re: How use convert class in UHD to convert complex float to complex sint16?

2022-07-09 Thread Marcus D. Leech
On 2022-07-09 13:22, Nikos Balkanas wrote: Hi sp, Where did you figure out that gnuradio is little endian? I searched their source code. In a few places like pmt_serialize.h they use big endian. In wavfile.cc they use different code for big or little endian. decided on gr configuration...GR_IS

[USRP-users] Re: How use convert class in UHD to convert complex float to complex sint16?

2022-07-09 Thread Nikos Balkanas
Hi sp, Where did you figure out that gnuradio is little endian? I searched their source code. In a few places like pmt_serialize.h they use big endian. In wavfile.cc they use different code for big or little endian. decided on gr configuration...GR_IS_BIG_ENDIAN In other places they note that th

[USRP-users] Re: How use convert class in UHD to convert complex float to complex sint16?

2022-07-09 Thread sp
Ok, thanks for the clarification. On Sat, Jul 9, 2022 at 9:15 PM Marcus D. Leech wrote: > On 2022-07-09 12:40, sp wrote: > > Marcus D. Leech thanks very much. Your description is very useful for me. > But I am not a communication engineer, I am a software developer, Can you > introduce me to a

[USRP-users] Re: How use convert class in UHD to convert complex float to complex sint16?

2022-07-09 Thread Marcus D. Leech
On 2022-07-09 12:40, sp wrote: Marcus D. Leech  thanks very much. Your description is very useful for me. But I am not a communication engineer, I am a software developer, Can you introduce me to a reference book that discusses scaling in radio hardware? But, with your description, I think I s

[USRP-users] Re: How use convert class in UHD to convert complex float to complex sint16?

2022-07-09 Thread sp
Marcus D. Leech thanks very much. Your description is very useful for me. But I am not a communication engineer, I am a software developer, Can you introduce me to a reference book that discusses scaling in radio hardware? But, with your description, I think I should follow your method... simple P

[USRP-users] Re: How use convert class in UHD to convert complex float to complex sint16?

2022-07-09 Thread Marcus D. Leech
On 2022-07-09 12:01, sp wrote: I assume this already does ceil or floor, so your data needs to be already in the right scale:) But all of my problems are related to scaling...  want to use the converted class in USRP that can solve my scaling problem and I am sure that my data is conve

[USRP-users] Re: How use convert class in UHD to convert complex float to complex sint16?

2022-07-09 Thread sp
> > I assume this already does ceil or floor, so your data needs to be > already in the right scale:) > But all of my problems are related to scaling... want to use the converted class in USRP that can solve my scaling problem and I am sure that my data is converted correctly.. So I want to use on

[USRP-users] Re: How use convert class in UHD to convert complex float to complex sint16?

2022-07-09 Thread Nikos Balkanas
Nice:) On Sat, Jul 9, 2022 at 6:33 PM Marcus D. Leech wrote: > > On 2022-07-09 11:02, Nikos Balkanas wrote: > > Correction> These functions work on integers. > > > > So they go as: > > int16 data = htobe16(le32toh(int32 data)) > > Or the associate functions, > > htonl, htons > > > > So you need t

[USRP-users] Re: How use convert class in UHD to convert complex float to complex sint16?

2022-07-09 Thread Marcus D. Leech
On 2022-07-09 11:02, Nikos Balkanas wrote: Correction> These functions work on integers. So they go as: int16 data = htobe16(le32toh(int32 data)) Or the associate functions, htonl, htons So you need to already have converted your floats to ints... If in doubt, test them first on a single data..

[USRP-users] Re: How use convert class in UHD to convert complex float to complex sint16?

2022-07-09 Thread Nikos Balkanas
Correction> These functions work on integers. So they go as: int16 data = htobe16(le32toh(int32 data)) Or the associate functions, htonl, htons So you need to already have converted your floats to ints... If in doubt, test them first on a single data... Sorry about the confusion. Nikos On Sat,

[USRP-users] Re: How use convert class in UHD to convert complex float to complex sint16?

2022-07-09 Thread Nikos Balkanas
Hi, I don't know about gnuradio classes:( Maybe you should ask them... But in C, I would use le32toh, I assume gnuradio is in little endian. and then htobe16 to get for uhd: uint16 data = htobe16(le32toh(float 32 data)) I assume this already does ceil or floor, so your data needs to be already in

[USRP-users] How use convert class in UHD to convert complex float to complex sint16?

2022-07-09 Thread sp
I know that data in USRP on FPGA is in format big-endian sint16, but in Gnuradio data is in format complex float 32... I found these links The conversion encompasses several elements. The most obvious is that of the data type: Most FPGAs use integer data types, the most common being complex 16-bit