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
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to