Re: [Discuss-gnuradio] usrp_* gains on Mac OS X much greater than on Linux
On Thu, Dec 22, 2005 at 04:55:01PM -0800, John Gilmore wrote: It should be pretty simple for the USRP's FPGA to swap the bytes of 16-bit samples it delivers in USB packets, if instructed in a control register by the host. This would avoid any speed penalty for big-endian hosts. (It's also pretty simple to determine that a simple byte-swap would be a complete cure for the problem, by temporarily doing the swap in software.) John We marshall all control packet data, so the right thing happens with those already. FWIW, the USB is spec'd as little-endian. On the bulk streaming data, we haven't had a working big-endian test case until now. There is a usrp_bytesex.h include file which includes fast implemenations of host_to_usrp_short and usrp_to_host_short. The fix probably ought to go in usrp1_sink_{c,s}::copy_to_usrp_buffer and in usrp1_source_{c,s}::copy_from_usrp_buffer. The AC_C_BIGENDDIAN test will need to be added to configure.ac to define the stuff that the usrp_bytesex.h include needs to work properly. Jon, can you take a shot at this? Eric ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] usrp_* gains on Mac OS X much greater than on Linux
It should be pretty simple for the USRP's FPGA to swap the bytes of 16-bit samples it delivers in USB packets, if instructed in a control register by the host. This would avoid any speed penalty for big-endian hosts. (It's also pretty simple to determine that a simple byte-swap would be a complete cure for the problem, by temporarily doing the swap in software.) John ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] usrp_* gains on Mac OS X much greater than on Linux
On Wednesday 21 December 2005 21:46, Matt Ettus wrote: Jonathan Jacky wrote: I've observed something weird running some USRP programs on Mac OS X: the gains in effect in usrp_siggen, usrp_oscope and usrp_fft seem unreasonably large. I only get reasonable looking output (from usrp_siggen) and input (with usrp_oscope and usrp_fft) with -a100 or less, otherwise the output (or input) saturates or wraps around in a very bizarre way. I think you are running into endianness issues here. That would give you an apparent gain of 256. I would tend to agree; PowerPC is big endian, IIRC. So endian-agnostic routines need to be used at the USRP level as well, it seems. -- Lamar Owen Director of Information Technology Pisgah Astronomical Research Institute 1 PARI Drive Rosman, NC 28772 (828)862-5554 www.pari.edu ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio